Prasheel Renkuntla - GitHub
Roomba like vacuum cleaner that performs the basic functionality of autnomous navigation with obstacle avoidance.
An example of obstacle avoidance in ROS for a turtlebot simulated in Gazebo. The world here is turtlebot_world in which if any of the objects are moved and placed in front of the turtlebot, it will move around and start autonomously again. A launch file is made to start the nodes at once. Also, ROSBag is used to examine the output from the topics using an argument in launch file.
- ROS Kinetic - Installation
- Catkin(installed by default with ROS) - a low level build system macros and infrastructure for ROS.
- Gazebo - Gazebo Installation
- Turtlebot - Turtlebot Package Installation
- ROS libraries - roscpp, geometry_msgs, sensor_msgs
Build using the following commands-
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make
source devel/setup.bash
cd src/
git clone --recursive https://github.com/prasheel24/cleaner_robot
cd ..
catkin_make
This will make the workspace and package ready for execution
These are the following steps to run the cleaner_robot.
- Using launch file from a new terminal-
roslaunch cleaner_robot runNodes.launch
- To run the node separately-
cd ~/catkin_ws
source ./devel/setup.bash
roscore
Ensure if roscore is running in the terminal. For any issues check ROS Troubleshoot
Then, in another terminal, open the turtlebot_world
cd ~/catkin_ws
source ./devel/setup.bash
roslaunch turtlebot_gazebo turtlebot_world.launch
Open a new terminal to run the node-
cd ~/catkin_ws
source ./devel/setup.bash
rosrun cleaner_robot cleanerBot
ROSBag recording can be done using the following command- Open a terminal to run the launch file:
cd ~/catkin_ws
source ./devel/setup.bash
roslaunch cleaner_robot runNodes.launch rosbagRecord:=true
When the flag(default = false) is true, it will record until SIGINT(ctrl+c) is pressed.
Following are the steps to examine the recorded bag file
- Open a terminal to setup the Master Node:
cd ~/catkin_ws
source ./devel/setup.bash
roscore
- Open a new terminal to play the bag file: Open the turtlebot_world in a terminal
cd ~/catkin_ws
source ./devel/setup.bash
roslaunch turtlebot_gazebo turtlebot_world.launch
Then in another terminal, run this command
cd ~/catkin_ws
source ./devel/setup.bash
cd src/beginner_tutorials/results
rosbag play recording.bag
The info on rosbag file can be seen using the following command
cd ~/catkin_ws/src/beginner_tutorials/results
rosbag info recording.bag
- For issues in turtlebot installation, read this page- ROBOTIS-GIT/turtlebot3#304
- https://en.cppreference.com/w/cpp/language/range-for
- https://stackoverflow.com/questionas/37621342/cmake-will-not-compile-to-c-11-standard
- http://docs.ros.org/melodic/api/sensor_msgs/html/msg/LaserScan.html
- http://wiki.ros.org/cmd_vel_mux