Project Chrono: chrono::ros::ChROSHandlerUtilities Class Reference

Static Public Member Functions | List of all members
chrono::ros::ChROSHandlerUtilities Class Reference
ROS module » ROS Handlers

## 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.
static double | GetChronoTime (const builtin_interfaces::msg::Time &time)
| Converts a builtin_interfaces::msg::Time to a chrono time.
template<typename... Args>
static std::string | BuildRelativeTopicName (Args &&... args)
| Constructs a relative topic name given variable number of inputs.
static bool | CheckROSTopicName (std::shared_ptr< ChROSInterface > interface, const std::string &topic_name)
| Checks the passed topic name is resolvable.

## Member Function Documentation

## ◆ BuildRelativeTopicName()

template<typename... Args>

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

  time | the 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_s | the current elapsed simulation time in seconds

The documentation for this class was generated from the following files:

- D:/W/B/src/chrono-9.0.1/src/chrono_ros/handlers/ChROSHandlerUtilities.h
- D:/W/B/src/chrono-9.0.1/src/chrono_ros/handlers/ChROSHandlerUtilities.cpp