ROS 2 Humble workspace for IGVC: igvc_robot (TurtleBot3 / localization), RPLidar (sllidar_ros2), and u-blox GPS (ublox).
- Ubuntu 22.04 (or another OS with ROS 2 Humble installed the same way as on Ubuntu).
- ROS 2 Humble: Install.
- Build tools:
sudo apt update
sudo apt install -y python3-colcon-common-extensions python3-rosdep git- Robot-specific packages (adjust if you omit hardware):
sudo apt install -y ros-humble-turtlebot3 ros-humble-robot-localizationSet the TurtleBot model once per shell (or add to ~/.bashrc):
export TURTLEBOT3_MODEL=burgergit clone https://github.com/csucaimeigvc/igvc-ros2-ws.git igvc_ros2_ws
cd igvc_ros2_wsIf you use SSH and have keys set up with GitHub:
git clone git@github.com:csucaimeigvc/igvc-ros2-ws.git igvc_ros2_ws
cd igvc_ros2_wsThen install dependencies and build:
# One-time: register rosdep rules
sudo rosdep init # skip if you already ran this on the machine
rosdep update
# Install declared dependencies from all packages under src/
rosdep install --from-paths src --ignore-src -r -y
source /opt/ros/humble/setup.bash
colcon build --symlink-install
source install/setup.bashUse every new terminal:
cd igvc_ros2_ws
source /opt/ros/humble/setup.bash
source install/setup.bashros2 pkg list | grep -E 'igvc_robot|sllidar|ublox'# TurtleBot3 base (set OpenCR serial port for your machine)
ros2 launch igvc_robot turtlebot3_base.launch.py opencr_port:=/dev/ttyACM0
# Base + EKF / localization stack
ros2 launch igvc_robot turtlebot3_localization.launch.py opencr_port:=/dev/ttyACM0More context: docs/TURTLEBOT3_OPENCR_SETUP_CHAT_SUMMARY.md.
After laptop motor setup, flash on Jetson and plan Nav2 integration: docs/JETSON_HANDOFF_AND_NAV2.md.
| Path | Role |
|---|---|
src/igvc_robot |
Launches, params, TurtleBot3 + localization integration |
src/sllidar_ros2 |
Slamtec RPLidar ROS 2 driver |
src/ublox |
u-blox GPS driver stack |
ping_pong |
Optional Arduino encoder sketch (legacy bridge path) |
COLCON_TRACE, AMENT_TRACE_SETUP_FILES, or other “unbound variable” when sourcing ROS: Your shell has set -u (nounset). ROS 2 and colcon setup scripts assume many optional variables may be unset.
Use the workspace helper (recommended):
source ~/ros2_ws/scripts/setup_ros_env.bashOr disable nounset only for sourcing:
set +u
source /opt/ros/humble/setup.bash
source install/setup.bash
set -uPer-package licenses are in each package’s package.xml / upstream files (e.g. BSD for sllidar_ros2, MIT for igvc_robot).