LiDAR CBFs
Built a ROS 2, Gazebo, and RViz simulation workflow for testing LiDAR-based control barrier functions on a Unitree Go2 quadruped robot. I used LiDAR point data to construct local safe sets around obstacles, then filtered a go-to-goal velocity command so the robot could continue toward its objective while remaining collision-free. The project demonstrates robotics simulation, perception-informed control, and safety-critical autonomy.
Overview
This research project explored how LiDAR-based control barrier functions can help an autonomous robot move toward a goal while avoiding collisions with nearby obstacles. I worked in ROS 2, Gazebo, and RViz to simulate a Unitree Go2 quadruped robot equipped with a LiDAR sensor.
The baseline controller was intentionally simple: a go-to-goal command pointed the robot directly toward its target. The safety layer then used LiDAR point data to construct a local safe set around the robot and adjust the commanded velocity when the direct path would violate obstacle constraints.
In the videos below, the red points represent LiDAR returns, the green lines represent the computed safe set, the red arrow represents the desired go-to-goal velocity, and the green arrow represents the LiDAR CBF safety adjustment.
Research Goal
The goal was to test whether local LiDAR data could be used directly in a safety-critical control loop. Instead of relying on a fully known map, the robot used nearby sensor returns to estimate what motion directions were safe at each instant.
This made the project a useful test case for autonomy in cluttered or changing environments, where the robot needs to keep moving toward a goal but cannot assume that obstacles are fixed, perfectly modeled, or known ahead of time.
Key Contributions
- Built a ROS 2 simulation workflow for a Unitree Go2 robot with LiDAR sensing
- Created Gazebo obstacle environments with both static and dynamic hazards
- Used LiDAR point-cloud data to construct local safe sets around nearby obstacles
- Implemented a control barrier function safety layer that adjusted desired velocity commands
- Visualized LiDAR returns, safe-set constraints, desired velocity, and corrected velocity in RViz
- Tested the approach in multiple scenarios designed to stress crowd navigation, narrow passages, and moving obstacles
Timeline
- Duration: January 2025 - April 2026
- Total time: Approximately 200 hours
- Role: Research assistant
- Research context: BYU MAGICC Lab
Results
The simulation tests used the same basic structure: the robot attempted to move directly toward a goal while the LiDAR CBF layer constrained the velocity to keep the system collision-free. This separated the nominal objective, reaching the goal, from the safety objective, avoiding obstacles.
Crowd Navigation
LiDAR CBF safety filtering during crowd-navigation simulation
This test emphasized cluttered navigation, where many nearby obstacles create a changing safe set. The safety layer continuously adjusted the robot’s commanded velocity as the available free space changed.
Dynamic Corridor
LiDAR CBF safety filtering in a dynamic corridor
Plinko
LiDAR CBF navigation through a constrained Plinko-style obstacle field
The Plinko-style environment forced the robot to make repeated local corrections while still progressing toward the goal. This scenario was useful for evaluating how the safety filter behaved when the direct go-to-goal path frequently pointed into obstacles.
Diamond Swap
LiDAR CBF navigation in a crossing-path diamond-swap scenario
The diamond-swap case shows that a head-on collision of four robots results in a deadlock.