23 void *vehicle, std::string base_topic_name, std::string frame_id)
26 if (!
_impl->Init(this->GetBaseTopicName() +
"/ackermann_control_cmd")) {
27 log_error(
"AckermannControlSubscriber failed to initialize on base topic",
35 auto message =
_impl->GetMessage();
37 message.drive.steering_angle,
38 message.drive.steering_angle_velocity,
40 message.drive.acceleration,
45 if (
_impl->HasNewMessage()) {
~AckermannControlSubscriber() override
ROS2CallbackData GetMessage() override
AckermannControlSubscriber(void *vehicle, std::string base_topic_name, std::string frame_id)
std::shared_ptr< SubscriberImpl< AckermannControlTraits > > _impl
void ProcessMessages(ActorCallback callback) override
const std::string & GetBaseTopicName() const noexcept
void * GetActor() const noexcept
std::function< void(void *actor, ROS2CallbackData data)> ActorCallback
AckermannControl FromAckermannDrive(float steering_angle, float steering_angle_velocity, float speed, float acceleration, float jerk)
std::variant< VehicleControl, AckermannControl, VehicleAccelerationControl > ROS2CallbackData
This file contains definitions of common data structures used in traffic manager.
static void log_error(Args &&... args)