chrono::ros::ChROSGPSHandler Class Reference
Description
This handler is responsible for interfacing a ChGPSSensor to ROS. Will publish sensor_msgs::msg::NavSatFix.
#include <ChROSGPSHandler.h>
Inheritance diagram for chrono::ros::ChROSGPSHandler:

Collaboration diagram for chrono::ros::ChROSGPSHandler:

Public Member Functions | |
| ChROSGPSHandler (std::shared_ptr< chrono::sensor::ChGPSSensor > gps, const std::string &topic_name) | |
| Constructor. More... | |
| ChROSGPSHandler (double update_rate, std::shared_ptr< chrono::sensor::ChGPSSensor > gps, const std::string &topic_name) | |
| Full constructor. Takes a ChGPSSensor, update rate, and topic name. | |
| virtual bool | Initialize (std::shared_ptr< ChROSInterface > interface) override |
| Initializes the handler. | |
| virtual ipc::MessageType | GetMessageType () const override |
| Get the message type of this handler. | |
| virtual std::vector< uint8_t > | GetSerializedData (double time) override |
| Get the serialized data for the handler. | |
Public Member Functions inherited from chrono::ros::ChROSHandler | |
| virtual | ~ChROSHandler ()=default |
| Destructor for the ChROSHandler. | |
| const double | GetUpdateRate () const |
| Get the period which this handler operates at. | |
| const uint64_t | GetTickCount () const |
| Get the number of times Tick() has been called. | |
| virtual bool | IsPublisher () const |
| Check if this handler is a publisher (data flows from Chrono to ROS) Default is true. More... | |
| virtual void | PublishFromSerialized (const std::vector< uint8_t > &data, std::shared_ptr< ChROSInterface > interface) |
| Publish data to ROS from serialized bytes. More... | |
| virtual void | ApplyFromSerialized (const std::vector< uint8_t > &data) |
| Apply data to Chrono from serialized bytes. More... | |
| virtual void | SubscribeAndForward (std::shared_ptr< ChROSInterface > interface, std::function< void(const std::vector< uint8_t > &)> callback) |
| Setup subscriber in subprocess to send data back to main process. More... | |
| virtual void | HandleIncomingMessage (const ipc::Message &msg) |
| Handle incoming IPC message from ROS subscriber (bidirectional communication). More... | |
| virtual bool | SupportsIncomingMessages () const |
| Returns true if this handler processes incoming IPC messages. More... | |
Additional Inherited Members | |
Public Types inherited from chrono::ros::ChROSHandler | |
| typedef chrono::ros::ipc::MessageType | MessageType |
| Get the message type of this handler. More... | |
Protected Member Functions inherited from chrono::ros::ChROSHandler | |
| ChROSHandler (double update_rate) | |
| Constructor for the ChROSHandler. More... | |
| void | IncrementTickCount () |
| Increment the tick count. | |
Constructor & Destructor Documentation
◆ ChROSGPSHandler()
| chrono::ros::ChROSGPSHandler::ChROSGPSHandler | ( | std::shared_ptr< chrono::sensor::ChGPSSensor > | gps, |
| const std::string & | topic_name | ||
| ) |
Constructor.
The update rate is set to gps->GetUpdateRate(). The update rate corresponds to the sensor's update rate.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_ros/handlers/sensor/ChROSGPSHandler.h
- /builds/uwsbel/chrono/src/chrono_ros/handlers/sensor/ChROSGPSHandler.cpp
Public Member Functions inherited from