CARLA
Loading...
Searching...
No Matches
LibCarla
source
carla
ros2
subscribers
AckermannControlConversion.h
Go to the documentation of this file.
1
// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2
// de Barcelona (UAB).
3
//
4
// This work is licensed under the terms of the MIT license.
5
// For a copy, see <https://opensource.org/licenses/MIT>.
6
7
#pragma once
8
9
#include "
carla/ros2/ROS2CallbackData.h
"
10
11
namespace
carla
{
12
namespace
ros2 {
13
14
// Converts the five scalar fields of a ROS ackermann_msgs/AckermannDriveStamped
15
// message payload into the CARLA AckermannControl POD. The wire-side
16
// AckermannDriveStamped FastDDS type is decomposed in AckermannControlSubscriber.cpp;
17
// this seam exists so the numeric mapping can be exercised by a unit test that does
18
// not link FastDDS.
19
inline
AckermannControl
FromAckermannDrive
(
20
float
steering_angle,
21
float
steering_angle_velocity,
22
float
speed,
23
float
acceleration,
24
float
jerk) {
25
AckermannControl
control{};
26
control.
steer
= steering_angle;
27
control.steer_speed = steering_angle_velocity;
28
control.speed = speed;
29
control.acceleration = acceleration;
30
control.jerk = jerk;
31
return
control;
32
}
33
34
}
// namespace ros2
35
}
// namespace carla
ROS2CallbackData.h
carla::ros2::FromAckermannDrive
AckermannControl FromAckermannDrive(float steering_angle, float steering_angle_velocity, float speed, float acceleration, float jerk)
Definition
AckermannControlConversion.h:19
carla
This file contains definitions of common data structures used in traffic manager.
Definition
SignComponent.h:21
carla::ros2::AckermannControl
Definition
ROS2CallbackData.h:28
carla::ros2::AckermannControl::steer
float steer
Definition
ROS2CallbackData.h:29
Generated by
1.9.8