ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Micro-ros reading operation

asked 2021-09-24 16:01:04 -0500

Cccrri gravatar image

I

In Microros Client, It is the function rclc_executor_spin_some() that go check if there is data available in the (custom)transport? I don't understand which is the flow to arrive to the Micro-XRCE-DDS function uxr_run_session_<...> for read the message just arrived.

I miss the RCL part in the flow:

RCLC: rclc_executor_spin_some() --> RCL: .???.. --> RMW: run_xrce_session() --> Micro-XRCE-DDS-Client: uxr_run_session() and recv_msg()

In other word I would like to understand how MicroRos listen incoming message. ( And who? It s the executor?)

Thank you so much in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-27 04:05:08 -0500

Pablogs gravatar image

updated 2021-09-27 04:25:30 -0500

gvdhoorn gravatar image

Solved here: https://github.com/ros2/rclc/issues/200:

rclc_executor_spin_some -> rcl_wait -> rmw_wait -> uxr_run_session_until_data and the former will call your transport read and write functions.

In general the spin function in the executor is in charge of waiting for the middleware: in this step the middleware is ran and if there is any data it is stored in RMW layer static buffers. Then the executor performs a rcl_take that retrieves that data.

Let me know if you have further questions.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2021-09-24 16:01:04 -0500

Seen: 81 times

Last updated: Sep 27 '21