Run micro-ros-agent on top of rmw_fastrtps_dynamic_cpp, using introspection typesupport

Open
#202 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

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.

Description

Issue template

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?

Dominant language
C++
Stars
201
Forks
111
Avg merge
1d 6h
Merged PRs (30d)
10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from micro-ROS/micro-ROS-Agent

All issues in micro-ROS/micro-ROS-Agent

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.