# first checkout the git repo
git clone https://github.com/TommyChangUMD/ENPM673_turtlebot_perception_challenge.git
cd ENPM673_turtlebot_perception_challenge/
# build and install the package
source /opt/ros/humble/setup.bash
colcon build --symlink-install --packages-select enpm673_final_proj
source install/setup.bash
ros2 run enpm673_final_proj enpm673_final_proj_main.py
The source code files are located at:
- enpm673_final_proj/enpm673_module/enpm673_final_proj.py
- enpm673_final_proj/scripts/enpm673_final_proj_main.py
source install/setup.bash
ros2 run enpm673_final_proj cpp_enpm673_final_proj
The source code files are located at:
source install/setup.bash
source /usr/share/gazebo/setup.bash ## this step may not be needed
ros2 launch enpm673_final_proj enpm673_world.launch.py "verbose:=true"
The Gazebo world file is located at:
Instead of closing the Gazebo window, just hit control-c from the console to send an "interrupt signal" (SIGINT) to the entire chain of processes.
One way is to use rqt
's image viewer to display the /camera/image_raw
topic:
source /opt/ros/humble/setup.bash
ros2 run rqt_image_view rqt_image_view /camera/image_raw
We can use the teleop_twist_keyboard
program to write angular and linear speeds to the /cmd_vel
topic.
source /opt/ros/humble/setup.bash
ros2 run teleop_twist_keyboard teleop_twist_keyboard
- Press
x
andc
to reduce linear and angular speeds. - To move around, use the keys below:
Moving around:
u i o
j k l
m , .
test_drive.webm
The Gazebo software that ships with Ubuntu 22.04 is version 11.10, which is two years old. Unfortunately, this version has a few issues with non-NVIDIA graphics cards. As a result, objects do not cast shadows. Newer versions of Gazebo (version 11.14 or above) work much better.
Upgrade instructions to Gazebo version 11.14 will be provided later.
If your Linux system (or Windows WSL2) is not running Ubunu 22.04, you can still try things out using a pre-built Docker container. Follow the steps below to have a ROS2 Humble + Gazebo running in just a few mintues.
sudo apt-get update
sudo apt install python3-rocker
rocker --privileged --x11 --user -- osrf/ros:humble-desktop 'bash -c "sudo apt update; sudo apt install -y terminator; terminator"'
This will open a new ROS2 Humble terminal. Now, we just need to install gazebo
and turtlebot3
packages.
Run on this new ROS2 Humble terminal:
sudo apt -y install ros-humble-gazebo* ros-humble-turtlebot3*
That's it. We now have a working ROS2 Humble + Gazebo system.