ROBOTIS-GIT / OpenCR-Binaries

Collection of binary files for platforms using OpenCR
Apache License 2.0
9 stars 4 forks source link

The internal details of OpenCR binary for ROS2 with Tutlebot3 #3

Closed gaoethan closed 5 years ago

gaoethan commented 5 years ago

Hi, Since OpenCR binary for ROS2 is released in the format of binary, I don't know what it actually implements with Micro-DDS-XRCE. It's a black hole. Could you please give a brief regarding the work of OpenCR ROS2 binary ?

I assume that it implements the mechanism with the DDS-XRCE prototol to interact with Micro-XRCE-DDS-Agent which runs in SBC.

For Example (please help correct if my assumption is wrong)

OpusK commented 5 years ago

Hi, @gaoethan

You can find its source from OpenCR examples

The binary reads raw LiDAR sensor data and sends to XRCE Agent, then turtlebot3_lidar talks with XRCE Agent to fetch the raw data and publish it with ROS2 topic of LaserScan, right ?

LiDAR data is read from SBC (RaspberryPi), not OpenCR binaries.

The motion cmd to move the chassis from SBC will sent to the binary which will receive from SBC Agent, then the binary delivers the actual cmd to control the movement of the motor?

Data is transferred directly to the client operating in OpenCR binary through Agent running in SBC.

gaoethan commented 5 years ago

okay. thanks for your sharing @OpusK

Data is transferred directly to the client operating in OpenCR binary through Agent running in SBC.

Let me make it clear. From the source code, I don't see any code relevant to the DDS-XRCE client directly. so I assume that it should work like the following: OpenCR binary read and control the h/w (e.g wheel, sensors) directly, and it reads from/writes to the serial. Accordingly, the DDS-XRCE Agent running in the SBC also operates the same serial for the data, and the Agent will create the logical XRCE client (with the concept of ProxyClient in XRCE protocol) which in turn communicates with the XRCE Agent to interact with the other DDS-RTPS world, is it right ?

OpusK commented 5 years ago

@gaoethan.

From the source code, I don't see any code relevant to the DDS-XRCE client directly.

This example use ros2arduino library which XRCE-DDS client.

That is: OpenCR(XRCE-DDS Client with ros2arduino) <--(serial communication)--> SBC(with XRCE-DDS Agent) <--(UDP communication)--> Remote PC(ROS2 with DDS)

I hope my explanation will help you.

gaoethan commented 5 years ago

So... actually, the ROS2 OpenCR binary of turtlebot3 works like the same work flow as above ros2arduino library, correct ?

OpusK commented 5 years ago

Yes, that's right :)

gaoethan commented 5 years ago

Okay. It's clear now, many thanks and close this ticket now !