Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
carma_cooperative_perception::PositionOffsetXYZ Struct Reference

#include <j3224_types.hpp>

Collaboration diagram for carma_cooperative_perception::PositionOffsetXYZ:
Collaboration graph

Static Public Member Functions

static auto from_msg (const j3224_v2x_msgs::msg::PositionOffsetXYZ &msg) -> PositionOffsetXYZ
 
static auto from_msg (const carma_v2x_msgs::msg::PositionOffsetXYZ &msg) -> PositionOffsetXYZ
 

Public Attributes

units::length::decimeter_t offset_x {0.0}
 
units::length::decimeter_t offset_y {0.0}
 
std::optional< units::length::decimeter_t > offset_z
 

Detailed Description

Definition at line 28 of file j3224_types.hpp.

Member Function Documentation

◆ from_msg() [1/2]

auto carma_cooperative_perception::PositionOffsetXYZ::from_msg ( const carma_v2x_msgs::msg::PositionOffsetXYZ &  msg) -> PositionOffsetXYZ
static

Definition at line 33 of file j3224_types.cpp.

35{
36 PositionOffsetXYZ offset{
37 units::length::meter_t{static_cast<double>(msg.offset_x.object_distance)},
38 units::length::meter_t{static_cast<double>(msg.offset_y.object_distance)}, std::nullopt};
39
40 if (msg.presence_vector & msg.HAS_OFFSET_Z) {
41 offset.offset_z = units::length::meter_t{static_cast<double>(msg.offset_z.object_distance)};
42 }
43
44 return offset;
45}

References offset_z.

◆ from_msg() [2/2]

auto carma_cooperative_perception::PositionOffsetXYZ::from_msg ( const j3224_v2x_msgs::msg::PositionOffsetXYZ &  msg) -> PositionOffsetXYZ
static

Definition at line 19 of file j3224_types.cpp.

21{
22 PositionOffsetXYZ offset{
23 units::length::decimeter_t{static_cast<double>(msg.offset_x.object_distance)},
24 units::length::decimeter_t{static_cast<double>(msg.offset_y.object_distance)}, std::nullopt};
25
26 if (msg.presence_vector & msg.HAS_OFFSET_Z) {
27 offset.offset_z = units::length::decimeter_t{static_cast<double>(msg.offset_z.object_distance)};
28 }
29
30 return offset;
31}

References offset_z.

Referenced by carma_cooperative_perception::to_detection_list_msg().

Here is the caller graph for this function:

Member Data Documentation

◆ offset_x

units::length::decimeter_t carma_cooperative_perception::PositionOffsetXYZ::offset_x {0.0}

Definition at line 30 of file j3224_types.hpp.

◆ offset_y

units::length::decimeter_t carma_cooperative_perception::PositionOffsetXYZ::offset_y {0.0}

Definition at line 31 of file j3224_types.hpp.

◆ offset_z

std::optional<units::length::decimeter_t> carma_cooperative_perception::PositionOffsetXYZ::offset_z

Definition at line 32 of file j3224_types.hpp.

Referenced by from_msg().


The documentation for this struct was generated from the following files: