-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rclc_support_init freezes microros while not running the agent #665
Comments
Yes, normally rclc_support_init needs the micro-ROS Agent, if your use case does not guarantee the presence of the Agent, take a look at the reconnection example: https://docs.vulcanexus.org/en/latest/rst/tutorials/micro/handle_reconnections/handle_reconnections.html |
Ok, so I need to implement one. Thank you. |
Please report if this solves the issue and close on this case |
Yes, ofc. Is it normal that the program does not give an error but it literally stops? |
Well normally So it would be normal that without an agent |
Do the custom transport functions run on separate tasks? (Microros running on freeRTOS) |
No, micro-ROS do not spawn any thread/task, every API call will run exclusively in the thread it is called. |
In this documentation https://www.freertos.org/2020/09/micro-ros-on-freertos.html it states that: |
No, there aren't. At some transport implementations, maybe the network stack has a task for handling incoming/outcoming packets, but no task is created by the micro-ROS stack itself. On the other hand, micro-ROS API can be used for different tasks at the user application level, but thread-safe operation shall be enabled. |
Considering a FreeRTOS task where I call rmw_uros_set_custom_transport and then I put the application code (publish/subscribe). How the application code will be able to execute if the custom read executes in a loop in the same task? |
Because the micro-ROS stack, reads from your custom transport callback in the executor spin. If you debug the application, you will see that under the hood, the executor spin will end here: And under the hood, the middleware will call your read transport operation. |
Issue template
I am trying to define a custom transport for microros and I have encountered a problem. After defining the custom callbacks and all that is needed the rclc_support_init freezes the program.
Does rclc_support_init function need an agent running to work properly?
The text was updated successfully, but these errors were encountered: