ROS Vehicle Handlers

Description

Collaboration diagram for ROS Vehicle Handlers:

Classes

class  chrono::ros::ChROSDriverInputsHandler
 This handler is responsible for interfacing a ChDriver to ROS. More...
 

Functions

 chrono::ros::ChROSDriverInputsHandler::ChROSDriverInputsHandler (std::shared_ptr< chrono::vehicle::ChDriver > driver, const std::string &topic_name)
 Convenience constructor. More...
 
 chrono::ros::ChROSDriverInputsHandler::ChROSDriverInputsHandler (double update_rate, std::shared_ptr< chrono::vehicle::ChDriver > driver, const std::string &topic_name)
 Constructor for the ChROSDriverInputsHandler class. More...
 
virtual bool chrono::ros::ChROSDriverInputsHandler::Initialize (std::shared_ptr< ChROSInterface > interface) override
 Initializes the handler. More...
 
virtual void chrono::ros::ChROSDriverInputsHandler::Tick (double time) override
 Updates the driver with stored inputs data from Callback.
 

Function Documentation

◆ ChROSDriverInputsHandler() [1/2]

chrono::ros::ChROSDriverInputsHandler::ChROSDriverInputsHandler ( double  update_rate,
std::shared_ptr< chrono::vehicle::ChDriver driver,
const std::string &  topic_name 
)

Constructor for the ChROSDriverInputsHandler class.

Takes a ChDriver. A subscriber will listen for data, store received data, and update the driver only during the Ticks.

◆ ChROSDriverInputsHandler() [2/2]

chrono::ros::ChROSDriverInputsHandler::ChROSDriverInputsHandler ( std::shared_ptr< chrono::vehicle::ChDriver driver,
const std::string &  topic_name 
)

Convenience constructor.

Will set the update rate to 0, which means the Tick() function will update on each update call.

◆ Initialize()

bool chrono::ros::ChROSDriverInputsHandler::Initialize ( std::shared_ptr< ChROSInterface interface)
overridevirtual

Initializes the handler.

Creates a subscriber of chrono_ros_interfaces::msg::DriverInputs on topic "~/input/driver_inputs".

Implements chrono::ros::ChROSHandler.