This repo contains launch + config files to bring up multiple turtlebots including navigation in the Lucia arena, both in simulation and (later) on the real robots.
Install prerequisites:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update -qq
sudo apt-get install -qq -y python-rosdep python-wstool ros-indigo-catkin git build-essential cmake
sudo rosdep init
rosdep update
Create a Catkin work space, clone and build our ROS stack:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
wstool init -j4 . https://raw.githubusercontent.com/uos/uos_rosinstalls/master/lucia2016-indigo.rosinstall
# Use rosdep to install all dependencies (including ROS itself)
rosdep install --from-paths ./ -i -y --rosdistro indigo
sudo apt-get install -qq -y ros-indigo-rviz ros-indigo-rosbash
source /opt/ros/indigo/setup.bash
catkin_init_workspace
cd ~/catkin_ws
catkin_make -DCMAKE_BUILD_TYPE=Release
If you have rosjava
installed, you may have to repeat the catkin_make
command several times until it succeeds.
The generated setup.bash
file has to be sourced in each terminal that uses
this catkin workspace. It's best to add it to the .bashrc
so that it is
sourced automatically whenever a new terminal is opened:
echo "source ~/catkin_ws/devel/setup.bash" >> .bashrc
Now close all running terminals and open a new one.
To update to the latest version of all packages, do this:
cd ~/catkin_ws/src
wstool merge https://raw.githubusercontent.com/uos/uos_rosinstalls/master/lucia2016-indigo.rosinstall
wstool up
rosdep install --from-paths ./ -i -y --rosdistro indigo
cd ~/catkin_ws
source /opt/ros/indigo/setup.bash
catkin_make -DCMAKE_BUILD_TYPE=Release
source ~/catkin_ws/devel/setup.bash
If you have rosjava
installed, you may have to repeat the catkin_make
command several times until it succeeds.
roslaunch lucia_launch lucia_gazebo.launch
Now, you can use the "2D Nav Goal" tool in RViz to send navigation goals to the first turtlebot. If the robot moves to the goal position, you have everything set up correctly. You can command the other two turtlebots by opening "Panels" -> "Tool Properties" and changing the "2D Nav Goal" topic.
You can disable specific turtlebots like this (for example, to speed up the Gazebo simulation):
roslaunch lucia_launch lucia_gazebo.launch turtlebot2:=false turtlebot3:=false
To start FLAP4CAOS active perception, run this:
ROS_NAMESPACE=turtlebot1 rosrun race_object_search object_search_manager_test p lucia_area_sw 0.4 lucia_area_nw 0.4 lucia_area_e 0.4 min_p_succ 0.05
This ROS package contains all top-level launch files:
lucia_gazebo.launch
- Brings up everything on 3 Turtlebots in Gazebo.- TODO:
lucia_robot.launch
- Same as above for physical robots.
URDF model of the modified Turtlebots used in the Lucia school (i.e., regular Turtlebots with a pole and second Xtion added).
Gazebo world, model and launch files for the Lucia arena.
Launch files to bring up navigation (move_base, amcl) on multiple turtlebots.