This repository contains the launch files to simulate the TIAGo robot in ROS 2.
Right now spawning and moving the tiago model works somewhat in gazebo fortress. The process is as follows: 0. Follow the installation instructions below to create the workspace.
- Use the newly-made launch file which opens gazebo fortress and tries to spawn Tiago
ros2 launch tiago_gazebo fortress_tiago_gazebo.launch.py is_public_sim:=True [arm_type:=no-arm]
This should launch everything as per the gazebo classic version. Open issues: Moving joints besides the wheels proves difficult. This means only the mobile_base_controller is functioning. Additionally, there is an issue with the odom_frame being published for use with Nav2, but manually publishing to cmd_vel_unstamped works fine.
It is likely that with gazebo fortress some implicit integration with ros2_control is missing w.r.t. actuating movement as compared to gazebo classic.
-
Install ROS 2 Humble by following the installation instructions.
-
Update the apt package index and install needed packages
sudo apt-get update
sudo apt-get install git python3-vcstool python3-rosdep python3-colcon-common-extensions
Disclaimer: In our testing environment, we've found out that the simulation is more reliable if we switch to Cyclone DDS. You can do this by installing it with
sudo apt install ros-humble-rmw-cyclonedds-cpp
and setting theRMW_IMPLEMENTATION
environment variable:export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
. More information on working with different DDS implementations here.We are still looking on the issues when working with Fast RTPS.
- Install Gazebo Fortress.
Create a workspace and clone all repositories:
mkdir -p ~/tiago_public_ws/src
cd ~/tiago_public_ws
vcs import --input https://raw.githubusercontent.com/EGAlberts/tiago_simulation/humble-devel/tiago_public.repos src
Install dependencies using rosdep
sudo rosdep init
rosdep update
rosdep install --from-paths src -y --ignore-src
Source the environment and build
source /opt/ros/humble/setup.bash
colcon build --symlink-install
Finally, before running any application you have to source the workspace
source ~/tiago_public_ws/install/setup.bash
Also you can add it to your .bashrc
Launch gazebo simulation:
ros2 launch tiago_gazebo tiago_gazebo.launch.py is_public_sim:=True [arm_type:=no-arm]
You can launch gazebo simulation using PAL office gazebo world by executing:
ros2 launch tiago_gazebo tiago_gazebo.launch.py is_public_sim:=True world_name:=pal_office [arm_type:=no-arm]
To move the robot you can use the following command from another terminal:
ros2 topic pub /mobile_base_controller/cmd_vel_unstamped geometry_msgs/msg/Twist '{linear: {x: 1}, angular: {z: 0}}' -r10
The velocities can be modified by changing the values of x and z.
You can launch TIAGo navigation by executing
ros2 launch tiago_2dnav tiago_nav_bringup.launch.py is_public_sim:=True
Then, you can send a goal:
- With rviz2
- By using Navigation 2 API. For further information see Navigation 2 Tutorials
You can also start the simulation and navigation together by using
ros2 launch tiago_gazebo tiago_gazebo.launch.py navigation:=True is_public_sim:=True [arm_type:=no-arm]
Then, goals can be sent in the same way.
You can start the SLAM and navigation in simulation by using
ros2 launch tiago_gazebo tiago_gazebo.launch.py is_public_sim:=True navigation:=True slam:=True
To launch TIAGo simulation with MoveIt 2 you can use
ros2 launch tiago_gazebo tiago_gazebo.launch.py moveit:=True
You can move the robot by:
-
Launching rviz2
ros2 launch tiago_moveit_config moveit_rviz.launch.py
-
Using MoveIt 2 API. For further information see MoveIt 2 Tutorials
Finally, to launch all together:
ros2 launch tiago_gazebo tiago_gazebo.launch.py navigation:=True moveit:=True is_public_sim:=True
To use private simulation you can avoid to set is_public_sim argument.