Fixposition SDK 0.0.0-heads/main-0-g90a51ff
Collection of c++ libraries and apps for use with Fixposition products
Loading...
Searching...
No Matches
fpsdk::ros2::utils Namespace Reference

ROS2 utilities. More...

Functions

void RedirectLoggingToRosConsole (const char *logger_name="fpsdk_ros2")
 Redirect fp:common::logging to ROS console.
 
rclcpp::Time ConvTime (const fpsdk::common::time::Time &time)
 Convert to ROS time (atomic -> POSIX)
 
fpsdk::common::time::Time ConvTime (const rclcpp::Time &time)
 Convert from ROS time (POSIX -> atomic)
 

Detailed Description

ROS2 utilities.

Function Documentation

◆ RedirectLoggingToRosConsole()

void fpsdk::ros2::utils::RedirectLoggingToRosConsole ( const char * logger_name = "fpsdk_ros2")

Redirect fp:common::logging to ROS console.

This configures the fpsdk::common::logging facility to output via the ROS console. This does not configure the ROS console (logger level, logger name, etc.).

The mapping of fpsdk::common::logging::LoggingLevel to rclcpp levels is as follows:

  • TRACE and DEBUG --> DEBUG
  • INFO and NOTICE --> INFO
  • WARNING --> WARN
  • ERROR --> ERROR
  • FATAL --> FATAL
Parameters
[in]logger_nameThe name of the logger. The recommended value is node->get_logger().get_name()

◆ ConvTime() [1/2]

rclcpp::Time fpsdk::ros2::utils::ConvTime ( const fpsdk::common::time::Time & time)

Convert to ROS time (atomic -> POSIX)

Parameters
[in]timeThe Time object (atomic)
Returns
the ROS time object (POSIX)

◆ ConvTime() [2/2]

fpsdk::common::time::Time fpsdk::ros2::utils::ConvTime ( const rclcpp::Time & time)

Convert from ROS time (POSIX -> atomic)

Parameters
[in]timeThe ROS time object (POSIX)
Returns
the Time object (atomic)