RPLidar A1M8 Setup and Use
These instructions are for an SLAMTEC RPLIDAR A1M8. This unit is used on the TurtleBot4 and can be added to the Unitree Go2.
The collision avoidance and path checking code pre-computes 9 different paths, 4 to the left, one straight ahead, 4 to the right, and one to the back. For each of the 9 possible paths, the code checks whether the path approaches any detected object to within half_width_robot
. If not, the path is considered to be a valid choice and the motion system can execute that path.
The code assumes that any unpredictable barriers (e.g. humans crossing the path of the robot) will be avoided using separate code within the action
driver, such as by issuing a “STOP” command when an object is detected in front of the robot.
Run rptest.py
(located in system_hw_test
) to determine the sensor_mounting_angle
and the angles_blanked
. These values depend on how you mounted the sensor and the radial position of any fixed obstructions, such as mounting brackets.
sensor_mounting_angle
: The sensor_mounting_angle
refers to the angle between the LIDAR sensor’s scanning plane and the horizontal plane of your robot or platform. The sensor_mounting_angle
can be read physically from the LIDAR. Refer to the following image for guidance:angles_blanked
: The angles_blanked
array can be used to prevent fixed obstructions in the field of view of the LIDAR from producing erroneous object avoidance messages.Determine the serial port the sensor is using:
Then, run
By default, the TurtleBot4 is configured to use the RPLidar A1M8. You can verify this by running:
To see the raw LIDAR data, provide the robot’s URID (such as OM742d35Cc6634
) and run:
Typically, this command would be executed on your laptop, connected to the TurtleBot4 via Zenoh.
Configure the .json5
as needed: