This repository contains the robot_no_crash
package developed. The package is designed to prevent the collision during robot movement. This functionality is developed in both 2D (the STDR) and 3D (Gazebo).
Note: This package is intended for ROS Noetic on Ubuntu Focal. It is recommended to have basic knowledge of ROS nodes, services, and tf transformations to use this package effectively.
- Package Structure
- Installation of Required Packages
- Clone This Repository
- Launching the Package
- Video for Running Experiment
- Links and Resources
robot_no_crash
├── CMakeLists.txt
├── package.xml
├── launch
│ ├── robot_no_crash.launch # for 2D STDR
│ └── robot_no_crash_gazebo.launch # for 3D gazebo
├── config
│ ├── safety.yaml # for 2D STDR
│ └── safety_gazebo.yaml # for 3D gazebo
├── scripts
│ └──robot_no_crash.py
├── src
└── README.md
To use this package, ensure the following dependencies are installed:
Retrieve and prepare the STDR for building. Make a catkin workspace and make it the current working directory.
mkdir ‐p ~/stdr_ws/src
cd ~/stdr_ws/src
Install the ros-noetic-turtlebot-2d-world package from the course repository. This package depends on a Turtlebot 2 simulation and a Yujin Kobuki mobile base simulation.
wget -q https://cwru-ecse-376.github.io/cwru-ecse-376.asc -O - | sudo apt-key add -
sudo apt update
sudo apt install ros-noetic-turtlebot-2d-world
Configure to use ROS manually
source /opt/ros/noetic/setup.bash
Ensure all the dependencies are installed.
rosdep install -‐from‐paths src ‐i ‐y ‐r
Build the packages
catkin_make
Add the newly built packages to the environment
source devel/setup.bash
To make sure it is installed search this in your computer you installed.
dpkg -L ros-noetic-turtlebot-2d-world
To test it run the following launch. To make sure it is installed search it in your computer you installed.
roslaunch turtlebot_2d_world turtlebot_stdr_gazebo.launch
I got the following error in my case. If you also got the same error, please do the following steps:
The error:
... logging to /home/ilkekas/.ros/log/fecffa60-daa5-11ef-98e7-554aad097450/roslaunch-ilke-kas-335806.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
RLException: Invalid roslaunch XML syntax: not well-formed (invalid token): line 8, column 37
The traceback for the exception was written to the log file
How to fix?
sudo nano /opt/ros/noetic/share/turtlebot_2d_world/launch/turtlebot_stdr_gazebo.launch
Then change the "value-" to "value=" in the launch file and save it. Then rerun the following roslaunch command.
roslaunch turtlebot_2d_world turtlebot_stdr_gazebo.launch
Clone the STDR repository from GitHub (Noetic is the default branch).
git clone ‐b noetic-devel / https://github.com/cwru‐ecse‐376/stdr_simulator.git
Prepare to make the packages Change to the base of the catkin workspace.
cd ../
Configure to use ROS manually
source /opt/ros/noetic/setup.bash
Ensure all the dependencies are installed.
rosdep install -‐from‐paths src ‐i ‐y ‐r
Build the packages
catkin_make
Add the newly built packages to the environment
source devel/setup.bash
Start the STDR to test the installation.
roslaunch stdr_launchers server_with_map_and_gui_plus_robot
git clone https://github.com/cwru-courses/csds_476_s25_ixk238_robot_no_crash.git
- Compile the workspace
catkin_make
- Run workspace configuration to be used by ROS
source devel/setup.bash
You can launch the package in 2 different ways by using two different
- Launch the robot_no_crash package with rqt_robot_steering by using robot_no_crash.launch :
roslaunch robot_no_crash robot_no_crash.launch
- Launch the robot_no_crash package with rqt_robot_steering by using robot_no_crash_gazebo.launch :
roslaunch robot_no_crash robot_no_crash_gazebo.launch
After you run both of these launch files, one needs to manually change the position of the robot, you need to change the topic to "/des_vel".