Closed dbortoluzzi closed 1 year ago
Publisher and subscriber can't live in the same thread.
Hi @dbortoluzzi,
By default subscriber always runs on its own thread.
The problem is that you run while loop BEFORE you actually register your subscriber. If you put subscribe call before while loop it should be ok.
Please note - we do not recommend using same object of JRosClient for pub/sub to same topic. It is preferrable to use two separate objects. See PublisherSubscriberApp example.
Thanks!
Hi, I've tried to improve class
PolygonApp
, adding also the subscriber. Here below the code:But it doesn't work! Why? I'm unable to make the communication work... I've tried also to customize the RtpsTalkConfiguration, but without success.
Please help me, otherwise I have to switch to ros2_java.
Best regards, Daniele