Nodes created by SOSS ROS2 system handle are created in the wrong Domain ID

asked 2020-10-12 08:04:55 -0500

Sören Nawratil gravatar image

I alredy craeted an Issue on the github page of SOSS, but thought i could ask here as well. I am trying to work work with SOSS (branch foxy) on ROS2 foxy using an Ubunto 20.04 VM. After successfully building (see PR#47) i tried the ros2 domain change example (sample_ros2_domain_change.yaml). I was unable to get the system to work using a command line Publisher in a terminal with the ROS_DOMAIN_ID set to 5 ros2 topic pub -n "soss_5" -r 1 string_topic std_msgs/String "{data: \"Hello, ID 10\"}" and a simple listener node I created. Since i was unsure what the problem was i tried the example on ROS2 Crystal on a Ubunot 18.04 VM, were it worked fine. From observing the behavior i noticed that in my Crystal workspace the execution of sample_ros2_domain_change.yaml created one Node (soss_5) as a subscriber in Domain ID 5 and a Node (soss_10) as a publisher in Domain ID 10. In the foxy workspace the example also creates two nodes(soss_5 as the subscriber and soss_10 as the publisher) but both nodes are created in the default DOMAIN_ID 0. My guess would be that there is a difference how nodes for a specific DOMAIN_ID are created in Crystal and foxy. In the file packages/ros2/src/SystemHandle.cpp starting from line 122 seems to be were the domain ID is set for the created nodes, but I am not sure. Does somebody know how to get the domain Change working on foxy or can help locate/fix the bug causing the nodes to be created in the default domain?

edit retag flag offensive close merge delete