Closed AlexisTM closed 2 years ago
I am afraid I don't (won't) have an Apertis 2022 SDK at hand. It certainly sounds like that is exhibiting some behaviour that interacts badly with Cyclone. Unusual, but not impossible.
What I usually suggest is to gather some tracing information from Cyclone DDS because that usually gives some insights in what is going on when everything works but there is no communication. Enabling it is as simple as putting
CYCLONEDDS_URI="<Tr><V>finest</><Out>cdds.log.\${CYCLONEDDS_PID}</>"
in the environment. That log starts with the configuration options, then you get some information on network selection and so on.
It is not so likely to give a clue as to why it hangs. For that, generally the best thing to do is to attach gdb
and get stack traces for all threads (thread apply all bt
) and look for something suspicious.
Looks to me like you have a firewall blocking all multicast traffic. This causes two problems:
I suspect the hanging is caused by ROS 2's signal handler being "too nice" if the impossible happens and stopping cleanly turns out to be impossible.
I'd suggest allowing multicast, but you can also disable multicast altogether (it is just that you lose out on a lot of niceties and add a significant amount of overhead):
<General>
<AllowMulticast>false</AllowMulticast>
</General>
<Discovery>
<ParticipantIndex>auto</ParticipantIndex>
<Peers>
<Peer address="localhost"/>
</Peers>
</Discovery>
The hanging you could fix by not having threads dedicated to receiving data on a specific socket (Internal/MultipleReceiveThreads
= false), but that alone won't get make discovery work. And both options above that should make discovery work should also solve the hanging.
That seems to be the problem indeed. Thank you!
Bug report
Required Info:
Steps to reproduce issue
Expected behavior
The program hangs and never exits (even with CTRL+C).
Actual behavior
ros2 node list
returns the list of the nodesAdditional information
Running
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 node list
has the correct behaviourStarting the daemon with debug prevents hanging, but doesn't provide with the expected output (below, the /topic topic exists and is published in the composed node precedently started and running fine).