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.
j3224_types.hpp
Go to the documentation of this file.
1// Copyright 2023 Leidos
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef CARMA_COOPERATIVE_PERCEPTION__J3224_TYPES_HPP_
16#define CARMA_COOPERATIVE_PERCEPTION__J3224_TYPES_HPP_
17
18#include <units.h>
19
20#include <carma_v2x_msgs/msg/measurement_time_offset.hpp>
21#include <carma_v2x_msgs/msg/position_offset_xyz.hpp>
22#include <j3224_v2x_msgs/msg/measurement_time_offset.hpp>
23#include <j3224_v2x_msgs/msg/position_offset_xyz.hpp>
24#include <optional>
25
27{
29{
30 units::length::decimeter_t offset_x{0.0};
31 units::length::decimeter_t offset_y{0.0};
32 std::optional<units::length::decimeter_t> offset_z;
33
34 [[nodiscard]] static auto from_msg(const j3224_v2x_msgs::msg::PositionOffsetXYZ & msg)
36
37 [[nodiscard]] static auto from_msg(const carma_v2x_msgs::msg::PositionOffsetXYZ & msg)
39};
40
42{
43 units::time::millisecond_t measurement_time_offset;
44
45 [[nodiscard]] static auto from_msg(const j3224_v2x_msgs::msg::MeasurementTimeOffset & msg)
47
48 [[nodiscard]] static auto from_msg(const carma_v2x_msgs::msg::MeasurementTimeOffset & msg)
50};
51
52} // namespace carma_cooperative_perception
53
54#endif // CARMA_COOPERATIVE_PERCEPTION__J3224_TYPES_HPP_
static auto from_msg(const j3224_v2x_msgs::msg::MeasurementTimeOffset &msg) -> MeasurementTimeOffset
Definition: j3224_types.cpp:47
static auto from_msg(const j3224_v2x_msgs::msg::PositionOffsetXYZ &msg) -> PositionOffsetXYZ
Definition: j3224_types.cpp:19
std::optional< units::length::decimeter_t > offset_z
Definition: j3224_types.hpp:32