Description
This handler is responsible for publishing state information about a ChBody.
This handler creates three publishers for the pose, twist (linear/angular velocity), and accel (linear/angular acceleration) topics.
#include <ChROSBodyHandler.h>


Public Member Functions | |
| ChROSBodyHandler (double update_rate, std::shared_ptr< ChBody > body, const std::string &topic="~/") | |
| Constructor. More... | |
| virtual bool | Initialize (std::shared_ptr< ChROSInterface > interface) override |
| Initializes the handler. This creates the three publishers for the pose, twist, and accel topics. | |
Public Member Functions inherited from chrono::ros::ChROSHandler | |
| 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 |
| Simply calls PublishPose, PublishTwist, and PublishAccel. More... | |
Protected Member Functions inherited from chrono::ros::ChROSHandler | |
| ChROSHandler (double update_rate) | |
| Constructor for the ChROSHandler. More... | |
Constructor & Destructor Documentation
◆ ChROSBodyHandler()
| chrono::ros::ChROSBodyHandler::ChROSBodyHandler | ( | double | update_rate, |
| std::shared_ptr< ChBody > | body, | ||
| const std::string & | topic = "~/" |
||
| ) |
Constructor.
The based topic is concatenated before the individual topic names. This handler will publish to the topics: <topic>/pose <topic>/twist <topic>/accel where <topic> is the passed in topic argument. If the no topic is passed, the topics will be: ~/pose ~/twist ~/accel
Member Function Documentation
◆ Tick()
|
overrideprotectedvirtual |
Simply calls PublishPose, PublishTwist, and PublishAccel.
- Parameters
-
time The time at which the current state of the simulation is.
Implements chrono::ros::ChROSHandler.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_ros/handlers/ChROSBodyHandler.h
- /builds/uwsbel/chrono/src/chrono_ros/handlers/ChROSBodyHandler.cpp
Public Member Functions inherited from