A ROS Noetic + Gazebo 11 simulation for an Autonomous Surface Vessel (ASV) with real-time perception, state control, and C++ A* path planning. Built as a rapid showcase project for generalist robotics roles.
🔴 Red Object Detection (Stop when centered)
Watch a short demonstration of the system detecting a red object in simulation and commanding the robot to stop when it is centered in view.
👉 Watch on YouTube
🛑 Detection + Avoidance + Resume
Watch a demonstration of the autonomous system detecting a red object, executing an avoidance maneuver when it's too close, and resuming patrol when safe.
👉 Watch on YouTube
🧭 A* Path Planning Visualization
See the A* path planning module in action as it computes an optimal path through a grid-based environment and publishes the result to RViz.
👉 Watch on YouTube
- Build a functional ASV simulator using ROS Noetic and Gazebo 11
- Integrate red-object detection using OpenCV
- Implement real-time state changes (approach, avoid, patrol)
- Add a C++ A* path planner with ROS visualization
- Showcase ability to learn and apply robotics skills rapidly
- ✅ TurtleBot3-based simulation in Gazebo
- ✅ Real-time red object detection using OpenCV + ROS camera feed
- ✅ Behavior state machine with patrol, stop, and avoidance
- ✅ C++ implementation of A* path planning
- ✅ Visualization of path in RViz using
nav_msgs/Path
- ✅ Unit testing with Google Test
- 🔜 Full control loop integration with Gazebo vessel model
- 🔜 Single-command launch automation
ASV-Simulation/
├── scripts/ # Python ROS nodes (e.g., red object detector)
├── src/ # C++ ROS nodes (e.g., astar_planner)
├── test/ # Unit tests using Google Test
├── launch/ # Launch files
├── models/ # Custom Gazebo models
├── worlds/ # Custom Gazebo world file(s)
├── urdf/ # Optional robot description
├── CMakeLists.txt # ROS build script
├── package.xml # ROS package metadata
└── README.md
- Ubuntu 20.04
- ROS Noetic
- Gazebo 11
- Dependencies:
cv_bridge
rqt_image_view
turtlebot3
,turtlebot3_gazebo
cd ~/catkin_ws/src
git clone https://github.com/yourusername/ASV-Simulation.git asv_simulation
cd ~/catkin_ws
catkin_make
source devel/setup.bash
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_gazebo turtlebot3_world.launch
Ensure a red object is visible to the robot. You can place one manually or modify the .world
file.
rosrun asv_simulation red_buoy_detector.py
This will:
- Subscribe to
/image_raw
- Convert the feed with
cv_bridge
- Detect red objects using HSV masking
- Show OpenCV output window labeled "Red Detection"
Use this to verify detection:
rqt_image_view /image_raw
rosrun asv_simulation astar_planner
This node:
- Computes a path from
(0, 0)
to(9, 9)
in a hardcoded grid - Publishes the path as
nav_msgs/Path
to/asv_path
- Can be visualized in RViz (fixed frame =
map
, display type = Path)
Unit tests are provided using Google Test.
To run them:
catkin_make run_tests
- ✅ Path exists from (0,0) to (9,9)
- ✅ Path is trivial if start == goal
- ✅ Path is empty if start point is blocked
These confirm algorithm correctness and boundary behavior.
- Implemented in
scripts/red_buoy_detector.py
- Uses
cv_bridge
and OpenCV to extract red regions from HSV color space - Triggers state transitions based on object proximity and centering
- Implemented in
src/astar.cpp
andastar_planner.cpp
- Uses classic A* with Euclidean heuristic
- Publishes
nav_msgs/Path
for visualization - Separated into
astar.h/cpp
for testability and modularity
- Google Test framework in
test/test_astar.cpp
- Validates planning logic and rejection of invalid conditions
Jeff Lacey
Software Engineer – iOS, Robotics, Autonomous Systems
GitHub: github.com/jeffla
This project was created as a 7-day fast-track demonstration. Feedback welcome!