Skip to content

Lidar Node

Lidar Data Acquisition

Topic

Topic Name Description
/lidar/livox_front Front lidar
/lidar/livox_back Rear lidar

Message Type

sensor_msgs::msg::PointCloud2

Field Type Description
header std_msgs/Header Message header, contains timestamp and coordinate frame information
height uint32 Point cloud height (if the point cloud is organized, otherwise 1)
width uint32 Point cloud width (number of points)
fields PointField[] Describes the field structure of each point in the point cloud
is_bigendian bool Data byte order (true indicates big-endian)
point_step uint32 Number of bytes occupied by a single point
row_step uint32 Number of bytes occupied by one row of data
data uint8[] Raw binary data of the point cloud
is_dense bool If true, indicates all points contain valid data

PointField

Field Type Description
name string Field name (e.g.: "x", "y", "z", "rgb", etc.)
offset uint32 Byte offset of the field within the point data
datatype uint8 Data type (1 indicates INT8, 2 indicates UINT8, 3 indicates INT16, 4 indicates UINT16, 5 indicates INT32, 6 indicates UINT32, 7 indicates FLOAT32, 8 indicates FLOAT64)
count uint32 Number of elements in this field

Launching the ROS2 Forwarding Node

1. Launch with Default Configuration

source ~/.cache/agibot/app/gdk/scripts/ros_env.sh gdk_lidar
ros2 launch gdk_lidar lidar.launch.py
This will launch all default Lidar topics: - /lidar/livox_front - /lidar/livox_back

2. Custom Lidar Topics

source ~/.cache/agibot/app/gdk/scripts/ros_env.sh gdk_lidar

# Launch only specific Lidar topics
#ros2 launch gdk_lidar lidar.launch.py lidar_topics:="/lidar/livox_back,/lidar/livox_front"

# Launch a single Lidar topic
#ros2 launch gdk_lidar lidar.launch.py lidar_topics:="/lidar/livox_back"