micro-ROS / micro-ROS/micro_ros_stm32cubemx_utils
Multiple Nodes
- Dominant language
- C
- Stars
- 275
- Forks
- 100
- PR merge metrics
- No merged PRs in 30d
Description
Hi, is there any example or support for multiple nodes?
I have 2 FreeRTOS tasks, each of them is hosting 1 node. Both FreeRTOS tasks are using the same U(S)ART DMA (ie: usart4).
However, when I run the micro_ros_agent on the workstation, it only detects 1 node with the following behavior :
- Both nodes are correctly set up and fully functional when only 1 node is being run.
- The FreeRTOS task that has the higher priority tend to be detected by the micro_ros_agent.
- When hosting both 2 nodes in 1 FreeRTOS task, the first mentioned node tend to be detected by the micro_ros_agent.
Below is the "colcon.meta" which I have set the "-DRMW_UXRCE_MAX_NODES" to 2.
```
{
"names": {
"tracetools": {
"cmake-args": [
"-DTRACETOOLS_DISABLED=ON",
"-DTRACETOOLS_STATUS_CHECKING_TOOL=OFF"
]
},
"rosidl_typesupport": {
"cmake-args": [
"-DROSIDL_TYPESUPPORT_SINGLE_TYPESUPPORT=ON"
]
},
"rcl": {
"cmake-args": [
"-DBUILD_TESTING=OFF",
"-DRCL_COMMAND_LINE_ENABLED=OFF",
"-DRCL_LOGGING_ENABLED=OFF"
]
},
"rcutils": {
"cmake-args": [
"-DENABLE_TESTING=OFF",
"-DRCUTILS_NO_FILESYSTEM=ON",
"-DRCUTILS_NO_THREAD_SUPPORT=ON",
"-DRCUTILS_NO_64_ATOMIC=ON",
"-DRCUTILS_AVOID_DYNAMIC_ALLOCATION=ON"
]
},
"microxrcedds_client": {
"cmake-args": [
"-DUCLIENT_PIC=OFF",
"-DUCLIENT_PROFILE_UDP=OFF",
"-DUCLIENT_PROFILE_TCP=OFF",
"-DUCLIENT_PROFILE_DISCOVERY=OFF",
"-DUCLIENT_PROFILE_SERIAL=OFF",
"-UCLIENT_PROFILE_STREAM_FRAMING=ON",
"-DUCLIENT_PROFILE_CUSTOM_TRANSPORT=ON"
]
},
"rmw_microxrcedds": {
"cmake-args": [
"-DRMW_UXRCE_MAX_NODES=2",
"-DRMW_UXRCE_MAX_PUBLISHERS=10",
"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=5",
"-DRMW_UXRCE_MAX_SERVICES=1",
"-DRMW_UXRCE_MAX_CLIENTS=1",
"-DRMW_UXRCE_MAX_HISTORY=4",
"-DRMW_UXRCE_TRANSPORT=custom"
]
}
}
}
```
Can someone please guide me on this?
Contributor guide
Research direction
Start with the issue's colcon.meta configuration, especially RMW_UXRCE_MAX_NODES and the custom transport settings, then compare the one-task and two-task FreeRTOS cases using the micro_ros_agent. Check how the shared USART4 DMA is used by both tasks and whether the two-node setup can be reproduced. Done means documenting the supported configuration or identifying the cause of only one node being detected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100