Module ros2_client::builtin_interfaces

source ·
Expand description

Some builtin interfaces for ROS2 communication Defines message types Duration and Time. See builtin_interfaces

The name “builtin_interfaces” is not very descriptive, but that is how it is in ROS.

Type “Time” in ROS 2 can mean either

  • builtin_interfaces::msg::Time, which is the message type over the wire, or
  • rclcpp::Time, which is a wrapper for rcl_time_point_value_t (in RCL), which again is a typedef for rcutils_time_point_value_t, which is in package rclutils and is a typedef for int64_t. Comment specifies this to be “A single point in time, measured in nanoseconds since the Unix epoch.” This type is used for time-related computations.

This module defines the over-the wire Time and Duration types. The module ros_time defines types intended for computaiton and in-memory representation.

As the over-the wire time representation uses signed 32-bit integer for seconds since the unix epoch, it is susceptible to the Year 2038 problem.

This implementation uses 64-bit nanosecond count in memory, which will not overflow until the year 2262, but the serialization will saturate in 2038.

Structs§

  • Over-the wire representation of Duration, i.e. difference between two timestamps.
  • Over-the wire representation of a timestamp.