- Install ROS2, ROS2 Control, and Gazebo, following their documentation. See INSTALL.md for more details
- If you don't already have one, create a ROS workspace.
- Clone this repo into the
src/
directory of your ROS workspace. - Run rosdep to install all missing packages.
sudo rosdep init
rosdep update
rosdep install --from-paths src -y --ignore-src
- At the root of your workspace, run
colcon build
.
- Open a new terminal and source your package using
source install/setup.bash
at the root of your workspace. This needs to be done in any new terminal when running the program. - Launch the simulation in an empty world using
ros2 launch zoe2_bringup sim.launch.py
. - Alternatively, launch the robot in a custom world using
ros2 launch zoe2_bringup zoe2.launch.py world:=moon/model.sdf z:=8
, or any other world stored inzoe2_bringup/worlds
.
- Open a new terminal and source your package using
source install/setup.bash
at the root of your workspace. This needs to be done in any new terminal when running the program. - Plug the Kvaser Leaf Light v2 USB into your computer. Run
lsusb
to see if it is recognized. - In your terminal, run
sudo ip link set can0 type can bitrate 1000000 && sudo ip link set up can0
to establish communication - Launch the hardware using
ros2 launch zoe2_bringup hw.launch.py
.
- Open a new terminal and
source install/setup.bash
at the root of your workspace. - Launch rqt:
rqt
and open the Robot Steering plugin (Plugins -> Robot Tools -> Robot Steering) - Set the message topic to
/cmd_vel_unstamped
- Use the sliders to steer the robot!
- Gazebo is loading, but the window is black
- There is likely an issue with your graphics driver, so Gazebo might have defaulted to headless mode. Run
export LIBGL_ALWAYS_SOFTWARE=1
before launching gazebo to render 3D graphics on CPU
- There is likely an issue with your graphics driver, so Gazebo might have defaulted to headless mode. Run
- I'm getting build errors!
- Make sure you are on the correct version of Ubuntu, ROS2, and Gazebo. This will not work on previous versions.
- Make sure you have installed the correct version of ROS2 control (Jazzy branch, not rolling).
- Make sure you properly sourced your ROS2 installation