Skip to content

Example ROS package showcasing ROS-Kafka integration in a simple scenario involving a Panda robot and a UR5 robot playing soccer. The package has been developed for the workshop held at the 5th Italian Conference on Robotics and Intelligent Machines (I-RIM) on October, 21st 2023 in Rome.

Notifications You must be signed in to change notification settings

TheEngineRoom-UniGe/ros-kafka-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

ros-kafka-demo

Example ROS package showcasing ROS-Kafka integration in a simple scenario involving a Panda robot and a UR5 robot playing soccer. The package has been developed for the workshop held at the 5th Italian Conference on Robotics and Intelligent Machines (I-RIM) on October, 21st 2023 in Rome.

Requirements

The package has been developed using ROS Melodic on Ubuntu 18.04. It depends on MoveIt! for motion planning capabilities and on the Kafka Python bindings for communication. Specifically, the package provides motion planning features for Panda and UR5, therefore the corresponding moveit_config packages need to be installed. In particular:

  1. for Panda, please visit the repo, select the corresponding ROS distrubution branch and download the package in your workspace. Compile and install normally via catkin_make;
  2. for UR5 binaries for the moveit_config package are available and can be installed via sudo apt-get install ros-<DISTRO>-ur5-moveit-config.

Usage

In order to run the soccer simulation (either in the Unreal Engine editor or through Mixed Reality device), please refer to the main UE project. The present package provides trajectory planning features for Panda and UR5 and such trajectories are later published to the soccer sim via Kafka through the corresponding ROS-Kafka interface.

To properly run the package, follow the steps:

  1. In a new terminal, execute the launchfile to run the various MoveIt! features for both robots;
  2. In a second terminal, make sure to export ROS_NAMESPACE=panda, then run panda_soccer.py;
  3. Similarly, in a third terminal export ROS_NAMESPACE=ur5, then run ur5_soccer.py.

The package also provides a kafka_consumer_node.py script showcasing consumption of messages generated by external applications. In particular, the node subscribes to a single Kafka topic and deserializes incoming messages into their corresponding ROS equivalent. To subscribe to multiple Kafka topics at once, simply extend the list of topics at the following line:

self.consumer.subscribe([KAFKA_TOPIC])

Finally, in the main loop, you can distinguish between messages incoming from different Kafka topics by calling the msg.topic() on the newly received message. Use this information to differentiate the callbacks associated to different Kafka topics.

About

Example ROS package showcasing ROS-Kafka integration in a simple scenario involving a Panda robot and a UR5 robot playing soccer. The package has been developed for the workshop held at the 5th Italian Conference on Robotics and Intelligent Machines (I-RIM) on October, 21st 2023 in Rome.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published