|
| RealtimePublisher (PublisherSharedPtr publisher) |
| Constructor for the realtime publisher.
|
|
| ~RealtimePublisher () |
| Destructor.
|
|
void | stop () |
| Stop the realtime publisher from sending out more ROS messages.
|
|
bool | trylock () |
| Try to get the data lock from realtime.
|
|
void | unlockAndPublish () |
| Unlock the msg_ variable.
|
|
void | lock () |
| Get the data lock form non-realtime.
|
|
void | unlock () |
| Unlocks the data without publishing anything.
|
|
|
Msg | msg_ |
| The msg_ variable contains the data that will get published on the ROS topic.
|
|
◆ RealtimePublisher()
Constructor for the realtime publisher.
- Parameters
-
publisher | the publisher to wrap |
◆ lock()
Get the data lock form non-realtime.
To publish data from the realtime loop, you need to run trylock to attempt to get unique access to the msg_ variable. Trylock returns true if the lock was aquired, and false if it failed to get the lock.
◆ trylock()
Try to get the data lock from realtime.
To publish data from the realtime loop, you need to run trylock to attempt to get unique access to the msg_ variable. Trylock returns true if the lock was aquired, and false if it failed to get the lock.
◆ unlockAndPublish()
Unlock the msg_ variable.
After a successful trylock and after the data is written to the mgs_ variable, the lock has to be released for the message to get published on the specified topic.
The documentation for this class was generated from the following file: