This is a collection of examples built around drake_ros
libraries' C++ and Python APIs.
This package has been built and tested on Ubuntu Focal with ROS Rolling, using a Drake nightly or any stable releases after 14 Jan 2022. It may work on other versions of ROS and Drake, but it hasn't been tested.
To build it:
-
Source your ROS installation
. /opt/ros/rolling/setup.bash
-
Download Drake binary, nightly or any stable releases after 14 Jan 2022.
-
Extract the Drake binary installation, install it's prerequisites, and use this Python virutalenv trick.
-
Activate the drake virtual environment.
-
Build it using Colcon.
Colcon
- Make a workspace
mkdir -p ./ws/src
cd ./ws/src
- Get this code
git clone https://github.com/RobotLocomotion/drake-ros.git
cd ..
- Build this package
colcon build --packages-up-to drake_ros_examples
- Make a workspace
Source your workspace.
. ./ws/install/setup.bash
# Also make sure to activate drake virtual environment
Now you can run C++ and Python examples using ros2 run drake_ros_examples <example-executable-or-script>
.
- RS flip flop: a latch with a ROS 2 topic interface.
- IIWA manipulator: an RViz visualization of a static IIWA arm.
- Multiple robots: an RViz visualization of an array of Kuka LBR iiwa manipulators.
- UFO: an RViz visualization of a flying object controlled with the Drake systems framework and commandedusing RViz.