Skip to content

TommyChangUMD/ENPM673_turtlebot_perception_challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ENPM673 Turtlebot Perception Challenge

How to build / install the enpm673_final_proj ROS2 package?

# 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

How to run the program?

Python version:

source install/setup.bash
ros2 run enpm673_final_proj enpm673_final_proj_main.py 

The source code files are located at:

C++ version:

source install/setup.bash
ros2 run enpm673_final_proj cpp_enpm673_final_proj 

The source code files are located at:

How start the Gazebo simulation?

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:

How stop the Gazebo simulation?

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.

How to bring up the camera image?

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

How to manually drive the Turtlebot?

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 and c 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

Troubleshoot

Gazebo: Objects have no shadow

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.

Start from scratch using a ROS2 Humble Docker container

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published