mc_rtc::ROSBridge Struct Reference

Allows to access ROS functionalities within mc_rtc without explicit ROS dependencies. More...

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

Static Public Member Functions

static NodeHandlePtr get_node_handle ()
 Get a ros::NodeHandle/rclcpp::Node. More...
 
static void set_publisher_timestep (double timestep)
 
static void init_robot_publisher (const std::string &publisher, double dt, const mc_rbdyn::Robot &robot, bool use_real=false)
 
static void update_robot_publisher (const std::string &publisher, double dt, const mc_rbdyn::Robot &robot)
 
static void stop_robot_publisher (const std::string &publisher)
 
static void shutdown ()
 Stop ROS. More...
 

Detailed Description

Allows to access ROS functionalities within mc_rtc without explicit ROS dependencies.

Member Function Documentation

◆ get_node_handle()

static NodeHandlePtr mc_rtc::ROSBridge::get_node_handle ( )
static

Get a ros::NodeHandle/rclcpp::Node.

This function will return a nullptr if ROS is not available

Returns
A shared_ptr to a ros::NodeHandle/rclcpp::Node

◆ init_robot_publisher()

static void mc_rtc::ROSBridge::init_robot_publisher ( const std::string &  publisher,
double  dt,
const mc_rbdyn::Robot robot,
bool  use_real = false 
)
static

Update the robot publisher state

Parameters
publisherName of the publisher
dtController timestep
robotWhich robot to publish
use_realUse the real URDF rather than the default one

◆ set_publisher_timestep()

static void mc_rtc::ROSBridge::set_publisher_timestep ( double  timestep)
static

Set publisher timestep

Parameters
timestepUpdate timestep in ms

◆ shutdown()

static void mc_rtc::ROSBridge::shutdown ( )
static

Stop ROS.

◆ stop_robot_publisher()

static void mc_rtc::ROSBridge::stop_robot_publisher ( const std::string &  publisher)
static

Stop the publication of a robot

Parameters
publisherName of the publisher

◆ update_robot_publisher()

static void mc_rtc::ROSBridge::update_robot_publisher ( const std::string &  publisher,
double  dt,
const mc_rbdyn::Robot robot 
)
static

Update the robot publisher state

Parameters
publisherName of the publisher
dtController timestep
robotWhich robot to publish

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