chrono::ros::ChROSHandlerUtilities Class Reference

Description

Utility class with static functions that may be useful for ROS handlers.

#include <ChROSHandlerUtilities.h>

Static Public Member Functions

static builtin_interfaces::msg::Time GetROSTimestamp (double elapsed_time_s)
 Constructs a builtin_interfaces::msg::Time (helpful for std_msgs::msg::Header::stamp) msg from the current simulation time. More...
 
static double GetChronoTime (const builtin_interfaces::msg::Time &time)
 Converts a builtin_interfaces::msg::Time to a chrono time. More...
 
template<typename... Args>
static std::string BuildRelativeTopicName (Args &&... args)
 Constructs a relative topic name given variable number of inputs. More...
 
static bool CheckROSTopicName (std::shared_ptr< ChROSInterface > interface, const std::string &topic_name)
 Checks the passed topic name is resolvable. More...
 

Member Function Documentation

◆ BuildRelativeTopicName()

template<typename... Args>
static std::string chrono::ros::ChROSHandlerUtilities::BuildRelativeTopicName ( Args &&...  args)
inlinestatic

Constructs a relative topic name given variable number of inputs.

A relative topic name, when used to construct a ROS entity (publisher, subscription, etc.), is resolved to map to the node namespace. Using a relative topic name is recommended as then all topics attached to the node are prepended with a like namespace. Usage: BuildRelativeTopicName("sensing", "camera", "front", "rgb") constructs "~/sensing/camera/front/rgb"

◆ CheckROSTopicName()

bool chrono::ros::ChROSHandlerUtilities::CheckROSTopicName ( std::shared_ptr< ChROSInterface interface,
const std::string &  topic_name 
)
static

Checks the passed topic name is resolvable.

Refer to the ROS documentation for information regarding what defines a qualified topic name.

◆ GetChronoTime()

double chrono::ros::ChROSHandlerUtilities::GetChronoTime ( const builtin_interfaces::msg::Time &  time)
static

Converts a builtin_interfaces::msg::Time to a chrono time.

Parameters
timethe builtin_interfaces::msg::Time to convert

◆ GetROSTimestamp()

builtin_interfaces::msg::Time chrono::ros::ChROSHandlerUtilities::GetROSTimestamp ( double  elapsed_time_s)
static

Constructs a builtin_interfaces::msg::Time (helpful for std_msgs::msg::Header::stamp) msg from the current simulation time.

Parameters
elapsed_time_sthe current elapsed simulation time in seconds

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_ros/handlers/ChROSHandlerUtilities.h
  • /builds/uwsbel/chrono/src/chrono_ros/handlers/ChROSHandlerUtilities.cpp