Ros2 support for KUKA iiwa

Hi everyone,
We have been working on the past month on a open-source Driver for the KUKA iiwa collaborative robots using ros2_control and KUKA’s Fast Robot Interface (FRI). Here you can access our Github repository iiwa_ros2.

What’s new ?
Our iiwa_ros2 package contains launch and configuration setups to quickly get started using the driver both in simulation and using the real system.

Currently, the following features are available:

  • integration with ros2_control
  • robot drivers for KUKA Fast Robot Interface (FRI) protocol for position, velocity and torque control
  • dedicated sensors and broadcasters to get data from the robot
  • integration with Gazebo
  • integration with Moveit2

We greatly appreciate all feedback and suggestions to improve our package!
Thank you!


Hi @mcbed,

This looks great! I just did a quick look at the repository and I have a few questions about design decisions.

Why did you decide to have multiple hardware interface-plugins for different combination of output control values, i.e., positions, velocity, effort. Would it make sense to add them into one plugin to reduce code duplication?

I see that your “JointTorqueBroadcaster” (you call it " ExternalTorqueSensor") is basically just publishing a vector of doubles. This seems straightforward to generalize. Would it make sense to create a generic Controller in ros2_controller that has this capability?



Hi @destogl,
Thank you for your feedback!
You are right about the code duplication using multiple hardware interfaces. We will merge them into a single one with our next update.
We decided to create a dedicated external torque broadcaster as a particular sensor for the 7DOF iiwa that provides such data. However, a generic broadcaster would be in fact very helpful as other system information such as for example joint currents could easily be published and not only restricted to the generic JointState type. We will see if we can propose such a broadcaster.



This sounds great, let us know if we can help you with something, or join us in our bi-weekly Meetings of Control WG. This Wednesday is one. There Webcam directly answer any questions you might have.

In the meantime, JointStateBroadcaster publishes „/dynamic_joint_state“ topic. This exposes data from all state interfaces defined for your hardware. So all data should be already there (but in generic format).

I will be happy to join the meeting then.

If we use the „/dynamic_joint_state“ topic to get the sensor data, do you think that there is a point in creating a generic sensor broadcaster ?

If you are using /dynamic_joint_state you will have to parse the values from message. Using specialized broadcaster or generic broadcaster that publishes simple array of doubles which is then simpler to use in other nodes. But of course, it depends on the concrete use-case.

Hi @mcbed .
Great work on the driver. I seem to be having trouble launching the simulator. Gazebo seems to not be able to reach /controller_manager ([spawner_joint_state_broadcaster]: Waiting for /controller_manager services). I’m trying to test torque control but i dont think it works without the simulator. I would appreciate if you could lend me a hand with that.
I want to reiterate that this driver seems extremely useful and thank you for taking the time to develop and share it.

Hi @DiegoNavaca,
Thanks for your interest in this driver ! The problem you encountered is due to an issue with urdf description as gazebo searches for the model files inside the ~/.gazebo/models folder and not in the provided packages. To deal with it, you can simply make a copy of the iiwa_description package and paste it into the gazebo model folder. I think that there is a more elegant solution and any idea for improvement is welcome.

Hello again @mcbed ,
First of all, thank you for your help. I’m sorry to have to keep bothering you but the solution you gave me only seems to work on the script, but when I use the script (in order to use other controllers and interfaces) the driver keeps getting a similar error. It seems the controller manager dies at launch:
[ERROR] [ros2_control_node-1]: process has died [pid 37119, exit code -6, cmd ‘/opt/ros/foxy/lib/controller_manager/ros2_control_node --ros-args --params-file /tmp/launch_params__cm7pf42 --params-file /home/control/ros2_ws/install/iiwa_description/share/iiwa_description/config/iiwa_controllers.yaml’].
I would be grateful if you could help me find the problem.

In the current state using gazebo requires the use of the gazebo launch file as the launch configuration is different, but you are right that having all in as stand-alone is a more readable solution. I will add this feature to the launch file next week. Thanks for your feedback !