# ROS 2 to micro-ROS TCP tunneling via Integration Service!

**URL:** <https://discourse.openrobotics.org/t/ros-2-to-micro-ros-tcp-tunneling-via-integration-service/17453>\
**Category:** ROS General\
**Tags:** ros2, embedded, turtlesim, integration-service, turtlebot\
**Created:** [November 20, 2020, 11:49am UTC](https://discourse.openrobotics.org/t/ros-2-to-micro-ros-tcp-tunneling-via-integration-service/17453 "2020-11-20T11:49:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![FraFin](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/frafin/32/7614_2.png) [@FraFin](https://discourse.openrobotics.org/u/FraFin)\
**Post date:** [November 20, 2020, 11:49am UTC](https://discourse.openrobotics.org/t/ros-2-to-micro-ros-tcp-tunneling-via-integration-service/17453/1 "2020-11-20T11:49:15Z")

</div>

Here at [eProsima](https://www.eprosima.com/) we have been working on a new exciting demo combining some of our cutting-edge technologies! The demo shows how two separate ROS 2 dataspaces hosted by distinct subnets can be put into communication over the internet thanks to [Fast DDS TCP capabilities](https://fast-dds.docs.eprosima.com/en/latest/fastdds/transport/tcp/tcp.html) and to [Integration Service](https://integration-service.docs.eprosima.com/en/latest/), the tool enabling intercommunication of **any** protocol with DDS. The setup consists in a ROS 2 node publishing velocity directives via WAN to a Turtlesim application and to a [micro-ROS](https://micro-ros.github.io/) node operating a Kobuki Turtlebot2, both running on the remote hub.

Find the video of the demo [here](https://youtu.be/PX0NUnc4OLo).

In the first dataspace we have a ROS 2 publisher sending data over a Twist type message. More in detail, a _joy node_ is in charge of obtaining displacement commands from a gamepad, which are then converted into ROS 2-understandable Twist type messages by a second _teleop\_twist\_joy_ node.

The second dataspace handles two subscriptors which receive the Twist topic sent by the _teleop\_twist\_joy_ node. The first subscriptor is a Turtlesim application, in charge of displacing the classic virtual turtle in its graphical interface according to the indications received by the remote node. The second subscriptor is a micro-ROS Client, communicated with the ROS 2 datapace via an Agent which allows it to subscribe to the Twist topic. With the data received, micro-ROS is in charge of instructing a Kobuki Turtlebot2, operated by an ESP32 MCU running FreeRTOS, to move accordingly.

 ![demo_diagram](https://us1.discourse-cdn.com/flex022/uploads/ros/original/2X/e/eabcea73cc5e369a117390302985585af1f41ae6.png)

The remote communication is mediated by Integration Service, which is able to translate the ROS 2 messages into a language understandable by Fast DDS, and thanks to the TCP capabilities of the latter it connects via WAN the instances launched in the two subnets. Thanks to this, we can see how both the Kobuki robot and the Turtlesim are moving as they are being operated by the remote gamepad.

---

<div class="post-metadata">

**Author:** ![Aerotic](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/aerotic/32/8097_2.png) [@Aerotic](https://discourse.openrobotics.org/u/Aerotic)\
**Post date:** [November 24, 2020, 1:31pm UTC](https://discourse.openrobotics.org/t/ros-2-to-micro-ros-tcp-tunneling-via-integration-service/17453/2 "2020-11-24T13:31:42Z")

</div>

Hi, your work is really nice.  
Where micro-ROS Client runs on? A microcontroller? or a Linux platform?

---

<div class="post-metadata">

**Author:** ![FraFin](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/frafin/32/7614_2.png) [@FraFin](https://discourse.openrobotics.org/u/FraFin)\
**Post date:** [November 24, 2020, 2:18pm UTC](https://discourse.openrobotics.org/t/ros-2-to-micro-ros-tcp-tunneling-via-integration-service/17453/3 "2020-11-24T14:18:56Z")

</div>

Hi @Aerotic! The micro-ROS Client in this demo runs on an [ESP32 MCU](http://discourse.ros.org/t/micro-ros-porting-to-esp32/16101) connected to the Agent via WiFi. The RTOS underneath is FreeRTOS.

---

<div class="post-metadata">

**Author:** ![Luxonis-Brandon](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/luxonis-brandon/32/6857_2.png) [@Luxonis-Brandon](https://discourse.openrobotics.org/u/Luxonis-Brandon)\
**Post date:** [November 24, 2020, 3:37pm UTC](https://discourse.openrobotics.org/t/ros-2-to-micro-ros-tcp-tunneling-via-integration-service/17453/4 "2020-11-24T15:37:03Z")

</div>

Really neat! Can’t wait to get DepthAI / OAK integrated to give AI metadata results as well in real-time.

---

<div class="post-metadata">

**Author:** ![MARLAR](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/marlar/32/7496_2.png) [@MARLAR](https://discourse.openrobotics.org/u/MARLAR)\
**Post date:** [November 24, 2020, 4:31pm UTC](https://discourse.openrobotics.org/t/ros-2-to-micro-ros-tcp-tunneling-via-integration-service/17453/5 "2020-11-24T16:31:23Z")

</div>

Hi, That’s a nice demo. So, Kabuki robot is used with FreeRTOS. Can it use with Nuttx also? At first, I don’t understand what the turtle example used for. It’s really the application for real time embedded system using turtlesim.

---

<div class="post-metadata">

**Author:** ![Jaime\_Martin\_Losa](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/jaime_martin_losa/32/4074_2.png) [@Jaime\_Martin\_Losa](https://discourse.openrobotics.org/u/Jaime_Martin_Losa)\
**Post date:** [November 24, 2020, 8:26pm UTC](https://discourse.openrobotics.org/t/ros-2-to-micro-ros-tcp-tunneling-via-integration-service/17453/6 "2020-11-24T20:26:52Z")

</div>

NuttX is one of the Operating Systems supported by Micro-ROS, also you can use Zephyr.

In this demo, Micro-ROS is a special guest. What we are trying to show is the use of the [ROS Integration Service.](https://integration-service.docs.eprosima.com/en/latest/)
