CARLA
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
carla::ros2::AutowareVehicleStatusPublisher Class Reference

#include <AutowareVehicleStatusPublisher.h>

+ Inheritance diagram for carla::ros2::AutowareVehicleStatusPublisher:

Classes

class  Impl
 

Public Member Functions

 AutowareVehicleStatusPublisher ()
 
 AutowareVehicleStatusPublisher (const AutowareVehicleStatusPublisher &)=delete
 
AutowareVehicleStatusPublisher & operator= (const AutowareVehicleStatusPublisher &)=delete
 
bool Publish () override
 BasePublisher interface; publishes with the last stamp given to the two-argument overload (0,0 before the first call).
 
bool Publish (std::int32_t seconds, std::uint32_t nanoseconds)
 Stamp all six pending reports with (seconds, nanoseconds) and publish them at once — all reports share the same frequency, matching AWSIM.
 
void SetControlMode (ControlMode mode)
 
void SetGear (Gear gear)
 
void SetHazardLights (bool hazard_lights_enabled)
 
void SetSteering (float steering_tire_angle)
 
void SetTurnIndicators (TurnIndicatorsStatus status)
 
void SetVelocity (float longitudinal_velocity, float lateral_velocity, float heading_rate)
 
 ~AutowareVehicleStatusPublisher () override
 
- Public Member Functions inherited from carla::ros2::BasePublisher
 BasePublisher ()=default
 
 BasePublisher (BasePublisher &&)=delete
 
 BasePublisher (const BasePublisher &)=delete
 
 BasePublisher (std::string base_topic_name)
 
 BasePublisher (std::string base_topic_name, std::string frame_id)
 
 BasePublisher (void *actor, std::string base_topic_name, std::string frame_id)
 
void * GetActor () const noexcept
 
const std::string & GetBaseTopicName () const noexcept
 
const std::string & GetFrameId () const noexcept
 
BasePublisher & operator= (BasePublisher &&)=delete
 
BasePublisher & operator= (const BasePublisher &)=delete
 
virtual ~BasePublisher ()=default
 

Private Attributes

std::shared_ptr< Impl > _impl
 
std::uint32_t _nanoseconds {0}
 
std::int32_t _seconds {0}
 

Additional Inherited Members

- Protected Attributes inherited from carla::ros2::BasePublisher
void * _actor {nullptr}
 
std::string _base_topic_name
 
std::string _frame_id
 

Detailed Description

Definition at line 77 of file AutowareVehicleStatusPublisher.h.

Constructor & Destructor Documentation

◆ AutowareVehicleStatusPublisher() [1/2]

carla::ros2::AutowareVehicleStatusPublisher::AutowareVehicleStatusPublisher ( )

◆ ~AutowareVehicleStatusPublisher()

carla::ros2::AutowareVehicleStatusPublisher::~AutowareVehicleStatusPublisher ( )
overridedefault

◆ AutowareVehicleStatusPublisher() [2/2]

carla::ros2::AutowareVehicleStatusPublisher::AutowareVehicleStatusPublisher ( const AutowareVehicleStatusPublisher &  )
delete

Member Function Documentation

◆ operator=()

AutowareVehicleStatusPublisher & carla::ros2::AutowareVehicleStatusPublisher::operator= ( const AutowareVehicleStatusPublisher &  )
delete

◆ Publish() [1/2]

bool carla::ros2::AutowareVehicleStatusPublisher::Publish ( )
overridevirtual

BasePublisher interface; publishes with the last stamp given to the two-argument overload (0,0 before the first call).

Implements carla::ros2::BasePublisher.

Definition at line 170 of file AutowareVehicleStatusPublisher.cpp.

References _impl, _nanoseconds, and _seconds.

Referenced by Publish().

◆ Publish() [2/2]

bool carla::ros2::AutowareVehicleStatusPublisher::Publish ( std::int32_t  seconds,
std::uint32_t  nanoseconds 
)

Stamp all six pending reports with (seconds, nanoseconds) and publish them at once — all reports share the same frequency, matching AWSIM.

Definition at line 163 of file AutowareVehicleStatusPublisher.cpp.

References _nanoseconds, _seconds, and Publish().

◆ SetControlMode()

void carla::ros2::AutowareVehicleStatusPublisher::SetControlMode ( ControlMode  mode)

◆ SetGear()

void carla::ros2::AutowareVehicleStatusPublisher::SetGear ( Gear  gear)

◆ SetHazardLights()

void carla::ros2::AutowareVehicleStatusPublisher::SetHazardLights ( bool  hazard_lights_enabled)

◆ SetSteering()

void carla::ros2::AutowareVehicleStatusPublisher::SetSteering ( float  steering_tire_angle)
Parameters
steering_tire_angleCARLA-side steering value; the inverse compensation LUT (GetSteeringOutput) is applied before publishing so Autoware sees the actual tire angle.

Definition at line 73 of file AutowareVehicleStatusPublisher.cpp.

References _impl, and carla::ros2::autoware_steering_compensation::GetSteeringOutput().

◆ SetTurnIndicators()

void carla::ros2::AutowareVehicleStatusPublisher::SetTurnIndicators ( TurnIndicatorsStatus  status)

◆ SetVelocity()

void carla::ros2::AutowareVehicleStatusPublisher::SetVelocity ( float  longitudinal_velocity,
float  lateral_velocity,
float  heading_rate 
)

Definition at line 63 of file AutowareVehicleStatusPublisher.cpp.

References _impl.

Member Data Documentation

◆ _impl

std::shared_ptr<Impl> carla::ros2::AutowareVehicleStatusPublisher::_impl
private

◆ _nanoseconds

std::uint32_t carla::ros2::AutowareVehicleStatusPublisher::_nanoseconds {0}
private

Definition at line 107 of file AutowareVehicleStatusPublisher.h.

Referenced by Publish(), and Publish().

◆ _seconds

std::int32_t carla::ros2::AutowareVehicleStatusPublisher::_seconds {0}
private

Definition at line 106 of file AutowareVehicleStatusPublisher.h.

Referenced by Publish(), and Publish().


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