Using RoboFlock’s Topics

To see a list of available interfaces, use the following command:

ros2 interface list | grep "/msg/"

To get details about a specific interface, use the following command:

ros2 interface show [interface name]

Optionally, if you want to copy the output to your clipboard, make sure xclip is installed and use the following command:

ros2 interface show [interface name] | xclip -selection clipboard

All messages share a header element, which consists of the time the message was created (in both seconds and nanoseconds) and of a frame ID, which is how the navigation system keeps track of where each component is in 3D space, tying the incoming data to the appropriate transformations. The following sections describe the key components of each message type used by RoboFlock. Irrelevant components (e.g., z-axis information) are excluded.

Ultrasonic Sensors

sensor_msgs/msg/Range

float32 field_of_view   # the size of the arc that the distance reading is
                        # valid for [rad]
                        # the object causing the range reading may have
                        # been anywhere within -field_of_view/2 and
                        # field_of_view/2 at the measured range.
                        # 0 angle corresponds to the x-axis of the sensor.

float32 min_range       # minimum range value [m]
float32 max_range       # maximum range value [m]

float32 range           # range data [m]
                        # (Note: values < range_min or > range_max should be discarded)

LiDAR

sensor_msgs/msg/LaserScan

float32 angle_min            # start angle of the scan [rad]
float32 angle_max            # end angle of the scan [rad]
float32 angle_increment      # angular distance between measurements [rad]

float32 time_increment       # time between measurements [seconds] - if your scanner
                            # is moving, this will be used in interpolating position
                            # of 3d points
float32 scan_time            # time between scans [seconds]

float32 range_min            # minimum range value [m]
float32 range_max            # maximum range value [m]

float32[] ranges             # range data [m]
                            # (Note: values < range_min or > range_max should be discarded)

Accelerometer

sensor_msgs/msg/Imu

geometry_msgs/Quaternion orientation
        float64 x 0
        float64 y 0
        float64 w 1

geometry_msgs/Vector3 angular_velocity
        float64 x
        float64 y

geometry_msgs/Vector3 linear_acceleration
        float64 x
        float64 y

Motors

geometry_msgs/msg/Twist

# This expresses velocity in free space broken into its linear and angular parts.
Vector3  linear
    float64 x
    float64 y
Vector3  angular
    float64 x
    float64 y