Okay, I had a chance to gather and commit my code. The software used to run my example demo is provided in three separate repositories on my github. @Rogge A lot of the code is modified versions of the shell/ros launch files provided on the robot control computer, so please let me know if I need to make any of these repositories private.
This is a set of bash files for launching a ros development docker container on the robot computers. The Dockerfile builds an image on top of the existing
docker.pathpilot.com/ros_public:noetic-dist-focal-202.39524b60 image provided by Tormach. Right now, the new layer just installs the ros-controllers package, but feel free to install any other packages that are not provided in the image.
The tormach_ros_dev_container.sh script spins up a container running bash with the user’s home directory mounted as a volume in the container. See README.md for more usage information.
There is probably a better way to do this, but using a modified version of the container entrypoint has worked thus far for setting up the user and environment variables in the container on startup.
This is a meta-package containing the ros packages running in the docker container on the robot control computer. The hal_ros_control package from the Tormach github repository is used, as I plan to modify the hardware interface for some of my research (note: this is not the version of
hal_ros_control that is installed in the container by default. It is lacking some of the newer features such as ros-side estops and probing functionality).
The za_bringup and hydra_bringup packages contain the launch files to start the robot hardware interface and controllers in the correct namespaces.
This is a meta-package with the host-side ros packages. In my case, the host (ros master PC) was a laptop running Ubuntu 20.04. These packages contain the MoveIt configuration for the Za6 and my multi-robot system.
The code for the demo seen in the video can be found here: hydra_demo.
It’s not terribly well written, just a starter example to prove the coordinated motion capabilities.
Unforunately, out-of-the-box MoveIt does not supply many tools for multi-robot planning (except for point-to-point motion), so this demo mainly uses raw IK calls to plan joint space motion and then time parameterizes the resulting path with MoveIt trajectory_processing.
Everything can be run on a single Ubuntu machine in simulation. You should be able to spin up containers on the host machine with tormach_ros_dev_container.sh (for the multi-robot system the
-n [NAME] flag can be used to change the default host name of the container for each instance). Run the robot bringup launch files inside the containers (with arm_id:=rob1 and arm_id:=rob2 for multi-robot case). Then, on the host machine, launch MoveIt planning in rviz.
roslaunch za_moveit_planning moveit_planning.launch
# multi robot
roslaunch hydra_moveit_planning moveit_planning.launch
Running on the actual hardware has a similar setup, except each container will need to be started on the respective robot control computer (instead of on the host). You will need to pass the
-x flag to tormach_ros_dev_container.sh if you plan on moving the robot outside of simulation. This sets up some items needed to run the realtime version of machinekit-hal and connect to ethercat. Originally, this was done through the path-pilot launcher. I should probably point out that (I think) this bypasses many of the automated hardware checks for ethercat, etc., that are performed in the pathpilot launcher.
You will also need to configure the ROS network properly for the robot computers to talk to the host machine.
The README of each package has further instructions on installation and usage. A lot of this is my first attempt at configuring the hardware and setting up a ROS development environment for the Za6, so I am open to any suggestions. Much of my research will focus on the controls and hardware interface side of these packages, so they are subject to change frequently.
I hope to be there! Not 100% sure yet