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

Executor in Mirco-ROS and ROS2

asked 2023-02-21 05:16:21 -0500

vutran1410 gravatar image

Hi all,

I have recently read into micro-ROS, ROS2 and learnt about its executor. I have a few questions about the current state of the executor in Micro-ROS and ROS2.

  1. Does the callback-group-level executor concept apply in micro-ROS? I see that it has been merged into ROS2 rclcpp, but since micro-ROS doesn't support rclcpp, I'm a bit confused.
  2. In the rclc repo, it mentioned that "The software is not ready for production use. It has neither been developed nor tested for a specific use case.". Does that mean micro-ROS is also not ready for production use? Does rclc executor included in the releases of ROS2 Humble and Rolling version?
  3. In the concept page, it mentioned that "Multi-threaded executor with assignment of scheduling policies of underlying operating system." is a future work with an open PR. Later, there was an announcement about micro-ROS multithreading support. Is it the same as the multi-threaded executor mentioned in the concept page? If not, what are the differences?
  4. Can you use C++ user code on top of the rclc? (for both case of using rclc with ROS2 and rclc with Micro-ROS)

Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-02-22 02:52:00 -0500

JanStaschulat gravatar image

updated 2023-02-22 08:21:39 -0500

Hi @vultran1410

.1. Does the callback-group-level executor concept apply in micro-ROS? I see that it has been merged into ROS2 rclcpp, but since micro-ROS doesn't support rclcpp, I'm a bit confused. No, the callback group-level Executor is only available in rclcpp, aka ROS 2. However, you don't need callback groups in micro-ROS (rclc): In ROS 2, you can only add nodes to an Executor, if you add multiple communication objects, like subscriptions, to a node, all subscriptions are added to the Executor. If you want to use different priorities for executing the callbacks WITHIN a node, this was not possible in ROS 2. Therefore, you can create a callback group and assign subscriptions to it. And then add a callback group to an Executor.

In micro-ROS, there is no hierarchical structure of subscriptions, nodes, executor ... like in ROS 2:

subscription0 --> node0 --> executor0

subscription1 --> node1  
subscription2 --> node1  
subscription1 --> callback_group1
subscription2 --> callback_group2
callback_group1 --> executor1
callback_group2 --> executor2

but it is flat, that is you can direclty add subscriptions to an Executor:

subscription0 --> node0
subscription1 --> node1
subscription2 --> node1
subscription0 --> executor0
subscription1 --> executor1
subscription2 --> executor2

That is, you add directly subscriptions to executor. You don't need a callback-group in micro-ROS. Of course, I agree it would make sense to have the same API in ROS 2 as well as in micro-ROS. I could think of a thin-API that would mimick a callback group, just to have the same API as in ROS 2, but essentially it would also just add all subscriptions of the callback group to the Executor. (I will update the documentation in micro-ROS accordingly).

What would you prefer? Is it okay for you, if you could add subscriptions to an Executor directly?

.2. In the rclc repo, it mentioned that "The software is not ready for production use. It has neither been developed nor tested for a specific use case.". Does that mean micro-ROS is also not ready for production use? Does rclc executor included in the releases of ROS2 Humble and Rolling version?

This is rather a liability exclusion. It has been used in several commercial products. All unit tests are running successfully for Foxy, Humble, Rolling. We achieve ROS 2 Quality Level 2 for the rclc library.

Does rclc executor included in the releases of ROS2 Humble and Rolling version?

the rclc-package is not part of the default ROS 2 distribution, but you can install the binary package like any other ROS 2 package with e.g. sudo apt-get install ros-humble-rclc. micro-ROS supports ROS 2 distrubutions: Foxy, Humble, Rolling

.3. In the concept page, it mentioned that "Multi-threaded executor with assignment of scheduling policies of underlying operating system." is a future work with an open PR. Later, there was an announcement about micro-ROS multithreading support. Is it the same as the multi-threaded executor mentioned in the concept page? If not, what are the differences?

No. These are different things. The multi-threaded Executor ... (more)

edit flag offensive delete link more

Comments

Thank you for your detailed answers!

"In micro-ROS, there is no hierarchical structure of subscriptions, nodes, executor ... like in ROS 2" --> Does that mean if I'm using rclc for ROS2, it will also have no hierarchical structure and I can add subscriptions directly to the executors?

vutran1410 gravatar image vutran1410  ( 2023-02-22 05:30:08 -0500 )edit

Yes. You can use rclc-package as an API for a normal ROS 2 application (using C programming language or some restricted C++ language). You can add subscriptions to the rclc-Executor directly (if you are using the rclc-package).

JanStaschulat gravatar image JanStaschulat  ( 2023-02-22 06:39:57 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2023-02-21 05:16:21 -0500

Seen: 95 times

Last updated: Feb 22 '23