micro-ROS / micro-ROS/micro-ROS-Agent
Run micro-ros-agent on top of rmw_fastrtps_dynamic_cpp, using introspection typesupport
- Dominant language
- C++
- Stars
- 201
- Forks
- 111
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 10
Description
## Issue template
- Hardware description: Linux aarch64
- Installation type: https://github.com/mvukov/rules_ros2
- Version or commit hash: humble
I am getting segmentation fault at
https://github.com/micro-ROS/micro-ROS-Agent/blob/8fdc5060c7601a5d7d9e12254a1681e51da02d2c/micro_ros_agent/src/agent/graph_manager/graph_typesupport.cpp#L33
due to the `type_support_` object being erased from memory somewhere in
https://github.com/micro-ROS/micro-ROS-Agent/blob/8fdc5060c7601a5d7d9e12254a1681e51da02d2c/micro_ros_agent/src/agent/graph_manager/graph_typesupport.cpp#L31
`type_support_->typesupport_identifier` is `rosidl_typesupport_introspection_cpp` since I am using `rmw_fastrtps_dynamic_cpp` as middleware. I see that L33 in graph_typesupport.cpp compares with `rosidl_typesupport_fastrtps_cpp`, which is why I assume micro-ros-agent requires `rmw_fastrtps_cpp` as middleware. I would like to stick with `rmw_fastrtps_dynamic_cpp`.
Changing this line from `rmw_fastrtps_dynamic_cpp` to `rosidl_typesupport_introspection_cpp` causes the segmentation error to go away and the program can proceed:
https://github.com/micro-ROS/micro-ROS-Agent/blob/8fdc5060c7601a5d7d9e12254a1681e51da02d2c/micro_ros_agent/src/agent/graph_manager/graph_typesupport.cpp#L32
However, then it fails at this line instead with a segmentation fault:
https://github.com/micro-ROS/micro-ROS-Agent/blob/8fdc5060c7601a5d7d9e12254a1681e51da02d2c/micro_ros_agent/src/agent/graph_manager/graph_typesupport.cpp#L183
My question is, can micro-ros-agent support introspection, i.e. rmw_fastrtps_dynamic_cpp?
What are the necessary changes if not?
Contributor guide
Research direction
Start with micro_ros_agent/src/agent/graph_manager/graph_typesupport.cpp, especially lines 31-33 and 183, and reproduce the segmentation fault on Linux aarch64 with Humble and rmw_fastrtps_dynamic_cpp. Compare the reported typesupport identifiers and determine whether introspection is supported; done means documenting the required changes or confirming the supported middleware without the crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems, robotics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100