Examples of using MoveIt2 for planning motions that are executed inside Ignition Gazebo simulation environment. These examples do NOT make use of ros2_control*, but instead employ JointTrajectoryController
Ignition system plugin with the communication graph illustrated below. All communication and move_group
action server can be setup using ign_moveit2.launch.py
, which then allows usage with both C++ and Python interface.
This repository previously contained also JointTrajectoryController
which is now merged into ign-gazebo
. Therefore, this repository should serve as a template/example of using such setup and no longer needs to be installed.
To demonstrate Python usage, a minimal Python MoveIt2 interface is also provided in this repository for Franka Emika Panda because moveit_commander
is not yet ported as of writing this (tracker). Once Python bindings for MoveIt2 are migrated, it is recommended to use those instead.
* Once ros2_control
is ready to use (which it might already be at the time of reading this), then developing and using ign_ros2_control
similar to gazebo_ros2_control might be recommended over the solution proposed in this repository.
├── launch
├── ign_moveit2.launch.py # Helpful launch file that starts up MoveIt2 move_group action server and bridges between ROS 2 and Ignition
└── examples # Launch files for examples
├── examples # C++ and Python examples
├── moveit2_py # Python module for interfacing with MoveIt2 (temporary substitute for moveit_commander)
├── worlds
├── panda_follow.sdf # Gazebo world for follow examples
└── panda_throw.sdf # Gazebo world for throw example
└── panda.repos # List of additional dependencies for `Franka Emika Panda`
All examples were tested with the following setup.
- ROS 2 Foxy
- MoveIt2
- Ignition Dome (Citadel might also be fully functional, but it was not tested)
ign-gazebo
>= 4.4- Version is required for
JointTrajectoryController
system plugin
- Version is required for
ign-msgs
>= 6.2- Version is required for
JointTrajectory
message definition
- Version is required for
- ros_ign
ros2
branch, containingJointTrajectory
message conversion
Additional robot-specific dependencies are also required, e.g. panda.repos.
This step is required to install Python MoveIt2 interface and additional robot-specific dependencies for Franka Emika Panda in order to try out the examples.
The recommended way is to clone this repository, clone dependencies and build with colcon
.
export PARENT_DIR=${PWD}
mkdir -p ign_moveit2/src && cd ign_moveit2/src
git clone https://github.com/AndrejOrsula/ign_moveit2.git
vcs import < ign_moveit2/panda.repos
cd ..
rosdep install --from-paths src -i -y --rosdistro ${ROS_DISTRO}
colcon build --merge-install --symlink-install --cmake-args "-DCMAKE_BUILD_TYPE=Release"
First, remember to source the ROS 2 workspace overlay before trying out any of the examples below.
source ${PARENT_DIR}/ign_moveit2/install/local_setup.bash
ros2 launch ign_moveit2 example_follow_object.launch.py
ros2 launch ign_moveit2 example_throw.launch.py