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 | ~ChROSHandler ()=default |
Destructor for the ChROSHandler. | |
virtual void | Update (double time, double step) final |
Updates the internal clock and checks if a tick should occur. More... | |
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. | |
Protected Member Functions | |
virtual void | Tick (double time) override |
Derived class must implement this function. More... | |
![]() | |
ChROSHandler (double update_rate) | |
Constructor for the ChROSHandler. More... | |
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.
Member Function Documentation
◆ Tick()
|
overrideprotectedvirtual |
Derived class must implement this function.
- Parameters
-
time the current simulation time
Implements chrono::ros::ChROSHandler.
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