ROS2 types and utils.
More...
◆ RedirectLoggingToRosConsole()
| void fpsdk::common::ros2::RedirectLoggingToRosConsole |
( |
const char * | logger_name = "fpsdk_common" | ) |
|
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_name | The name of the logger. The recommended value is node->get_logger().get_name() |
◆ ConvTime() [1/2]
| rclcpp::Time fpsdk::common::ros2::ConvTime |
( |
const fpsdk::common::time::Time & | time, |
|
|
rcl_clock_type_t | clock_type = RCL_ROS_TIME ) |
Convert to ROS time (atomic -> POSIX).
- Parameters
-
| [in] | time | The Time object (atomic) |
| [in] | clock_type | The clock to use (to assume) |
- Returns
- the ROS time object (POSIX)
◆ ConvTime() [2/2]
Convert from ROS time (POSIX -> atomic).
- Parameters
-
| [in] | time | The ROS time object (POSIX) |
- Returns
- the Time object (atomic)
◆ Ros1ToRos2()
template<typename Ros1MsgT, typename Ros2MsgT>
| void fpsdk::common::ros2::Ros1ToRos2 |
( |
Ros1MsgT & | ros1, |
|
|
Ros2MsgT & | ros2 ) |
Convert ROS1 message to ROS2 message.
Several conversions in this form are implemented. See the source code for details.
- Template Parameters
-
| Ros1MsgT | ROS1 message type |
| Ros2MsgT | ROS2 message type |
- Parameters
-
| [in] | ros1 | ROS1 message |
| [out] | ros2 | ROS2 message |