This week I completed the following tasks:

  • Created a launch file for the exercise
  • Created a lidar controller python script
  • Tested and debugged the controller
  • Created two separate versions of the car: original and lighter (top lidar and front camera only)

Lidar Controller

This ROS 2 Python node subscribes to a LiDAR point cloud topic (/waymo/lidar/points) and publishes velocity commands (/cmd_vel) to control the car. It processes incoming PointCloud2 messages, calculates the minimum distance to obstacles (ignoring vertical height), and adjusts the vehicle’s forward speed accordingly. If an obstacle is detected within a safe distance (4 meters), it reduces speed to 4 m/s, otherwise, it moves at a speed of 40 m/s. The node logs the minimum distance and corresponding speed for debugging and monitoring purposes.

Two versions of the car

Original:

This version has :

  • One front camera on bumper
  • Two side view cameras
  • One 360 degree top lidar

Lighter version:

This version has :

  • One front view camera
  • One 120 degree top lidar

Video demonstration

Click on it