Intraprocess Communication

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Intraprocess Communication

Kameel Amareen
Hello, hope this message finds everyone well !

So I have defined a python ComposableNodeContainer that launches RTABMAP Slam as a ComposableNode.

Everything works except when extra_arguments=[{"use_intra_process_comms": True}], argument is set. Where the error of:

[component_container-1] [ERROR] [1743440036.747046855] [rtabmap_container]: Component constructor threw an exception: intraprocess communication allowed only with volatile durability
[ERROR] [launch_ros.actions.load_composable_nodes]: Failed to load node 'rtabmap_slam' of type 'rtabmap_slam::CoreWrapper' in container '/rtabmap_container': Component constructor threw an exception: intraprocess communication allowed only with volatile durability

I have tried changing the mapGraphpub_ to:

mapGraphPub_ = this->create_publisher<rtabmap_msgs::msg::MapGraph>("mapGraph", rclcpp::QoS(1).reliable().durability(RMW_QOS_POLICY_DURABILITY_VOLATILE));

But the issue persists, any tips ?

Reply | Threaded
Open this post in threaded view
|

Re: Intraprocess Communication

Kameel Amareen
Update: I have set latching to off in MapsManager.cpp
latching_(false)

And now it seems to work , but not sure why , would appreciate any explanation
Reply | Threaded
Open this post in threaded view
|

Re: Intraprocess Communication

matlabbe
Administrator
It looks like a limitation of ComposableNode: "intraprocess communication allowed only with volatile durability ". We use transient by default (latch:=true) for mapping topics. The workaround seems indeed to turn off latching.

The only downside is that maps will be always republished after each update. in SLAM mode, it was already doing that anyway, but in localization mode, it means the map will be republished even if the map doesn't change.

There is also an option called "use_intra_process_comms" that would need to be explicitly enabled to use in ComposableNode to avoid all serialization. A tutorial here: https://docs.ros.org/en/jazzy/Tutorials/Demos/Intra-Process-Communication.html

However, I think you can enable this flag by simply adding extra arguments like this: https://github.com/IntelRealSense/realsense-ros/blob/1cbd81be81e807eefb46f098e76381888ffc7001/realsense2_camera/launch/rs_intra_process_demo_launch.py#L95

It seems ISAAC ROS enabled it by default on all nodes to play well with NITROS nodes: https://github.com/search?q=org%3ANVIDIA-ISAAC-ROS%20use_intra_process_comms&type=code


EDIT: Note that rtabmap_viz cannot be used as composable node because Qt requires to run in the main thread of the process.