Example files and configurations for Gazebo Classic simulation of Universal Robots' manipulators.
ROS2 Distro | Branch | Build status | Released packages |
---|---|---|---|
Galactic | galactic |
|
ur_simulation_gazebo |
Rolling | rolling |
|
ur_simulation_gazebo |
NOTE: There are three build stages checking current and future compatibility of the package.
-
Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.
Uses repos file:
src/Universal_Robots_ROS2_Gazebo_Simulation/Universal_Robots_ROS2_Gazebo_Simulation-not-released.<ros-distro>.repos
-
Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source. Shows that local build with dependencies is possible and if fails there we can expect that after the next package sync we will not be able to build.
Uses repos file:
src/Universal_Robots_ROS2_Gazebo_Simulation/Universal_Robots_ROS2_Gazebo_Simulation.repos
-
Source build - also core ROS packages are build from source. It shows potential issues in the mid future.
Skip any of below steps is not applicable.
-
Create a colcon workspace:
export COLCON_WS=~/workspace/ros_ws_foxy mkdir -p $COLCON_WS/src
NOTE: Feel free to change
~/workspace/ros_ws_foxy
to whatever absolute path you want.NOTE: Over time you will probably have multiple ROS workspaces, so it makes sense to them all in a subfolder. Also, it is good practice to put the ROS version in the name of the workspace, for different tests you could just add a suffix to the base name
ros_ws_foxy
. -
Download the required repositories and install package dependencies:
cd $COLCON_WS git clone git@github.com:UniversalRobots/Universal_Robots_ROS2_Gazebo_Simulation.git src/Universal_Robots_ROS2_Gazebo_Simulation vcs import src --input src/Universal_Robots_ROS2_Gazebo_Simulation/Universal_Robots_ROS2_Gazebo_Simulation.<ros-distro>.repos rosdep install --ignore-src --from-paths src -y -r # install also is there are unreleased packages cd ..
To configure and build workspace execute following commands:
cd $COLCON_WS
colcon build --symlink-install --mixin rel-with-deb-info compile-commands ccache
ros2 launch ur_simulation_gazebo ur_sim_control.launch.py
Move robot using test script from ur_bringup
package:
ros2 launch ur_bringup test_joint_trajectory_controller.launch.py
Example using MoveIt with simulated robot:
ros2 launch ur_simulation_gazebo ur_sim_moveit.launch.py