mc_rtc::RobotPublisher Struct Reference

This structure is able to publish a Robot's state to ROS. More...

#include </home/runner/work/mc_rtc/mc_rtc/plugins/ROS/include/mc_rtc_ros/ros.h>

Public Member Functions

 RobotPublisher (const std::string &prefix, double rate, double dt)
 
 ~RobotPublisher ()
 Destructor. More...
 
void init (const mc_rbdyn::Robot &robot, bool use_real=false)
 Initialize the publisher. More...
 
void update (double dt, const mc_rbdyn::Robot &robot)
 Update the publisher. More...
 
void set_rate (double rate)
 Reset the publishing rate. More...
 

Detailed Description

This structure is able to publish a Robot's state to ROS.

When writing a controller inside mc_rtc controller framework, one is not expect to use this class. However, this is useful to have when building tools around the framework.

Constructor & Destructor Documentation

◆ RobotPublisher()

mc_rtc::RobotPublisher::RobotPublisher ( const std::string &  prefix,
double  rate,
double  dt 
)

Constructor

If ROSBridge::get_node_handle returns a nullptr then this object does nothing.

Parameters
prefixTF prefix
ratePublishing rate
dtControl rate

◆ ~RobotPublisher()

mc_rtc::RobotPublisher::~RobotPublisher ( )

Destructor.

Member Function Documentation

◆ init()

void mc_rtc::RobotPublisher::init ( const mc_rbdyn::Robot robot,
bool  use_real = false 
)

Initialize the publisher.

◆ set_rate()

void mc_rtc::RobotPublisher::set_rate ( double  rate)

Reset the publishing rate.

◆ update()

void mc_rtc::RobotPublisher::update ( double  dt,
const mc_rbdyn::Robot robot 
)

Update the publisher.


The documentation for this struct was generated from the following file: