tudelft / UnifiedOptitrackClients

Goal: one codebase to stream optitrack to all autopilots used in the MAVLab
2 stars 0 forks source link

Publishing messages for multiple rigid bodies in multicast #27

Open mahimayoga opened 2 months ago

mahimayoga commented 2 months ago

When using motive with multicast, client publishes odometry messages of multiple rigid bodies (on the same topic) even though streaming id is defined when running the client. (I didn't have this problem previously)

When I toggle messages when running the client, it only displays (correctly) the pose of the body I want to track. But it is still publishing the message for the other bodies as well.

I run the client through a docker with the following command:

sudo docker run -it --rm --net=host ros2px4client -s <id>

motive settings were as Till had sent in the MAVlab group:

WhatsApp Image 2024-04-15 at 14 18 51

mahimayoga commented 2 months ago

Update: today I did not have this problem! There were two drones in the cyberzoo and the client was only publishing the pose for one of them.

antbre commented 2 months ago

@mahimayoga Could you specify exactly which branch/commit you were using? For completeness, this only happens on the px4 topic and not on the standard ros2 topic, right?

mahimayoga commented 2 months ago

branch/commit: image

topic: I am actually not sure. I don't think we echo'd the mocap pose ros topic when we checked with multicast. But the messages in the terminal when running the client were showing the correct pose.

I can try tomorrow if I can reproduce the problem and check if the mocap ros topic was also publishing both vehicle poses, but yesterday I didn't have the same issue.

dfordequan commented 2 months ago

I can confirm that I had this issue yesterday as well. I specified the ros2px4 streaming id(--px4_ids), then on the ros2 topic the numbers jump between the two rigid bodies

mahimayoga commented 2 months ago

@dfordequan Really, yesterday afternoon? So then we didn't have the problem but you did while both our drones were in the zoo? that's interesting

dfordequan commented 2 months ago

@dfordequan Really, yesterday afternoon? So then we didn't have the problem but you did while both our drones were in the zoo? that's interesting

Yep. Even after I stopped my client, when you were flying I could still see your drone's pose was updating on the ROS2 topic on my terminal, without knowing your streaming id.

antbre commented 2 months ago

@mahimayoga @dfordequan , I just pushed a fix to the program options of the ros2 / px4 client (086adf92d05b5eca19a31ee8f781fec96482081e) . Let me know whether the issue persists if you explicitly specify the streaming ids for px4 via -p.

Also make sure that you set your ROS_DOMAIN_ID (more here) in order not to interfere with each other when working in the cyberzoo.

dfordequan commented 2 months ago

@mahimayoga @dfordequan , I just pushed a fix to the program options of the ros2 / px4 client (086adf9) . Let me know whether the issue persists if you explicitly specify the streaming ids for px4 via -p.

Also make sure that you set your ROS_DOMAIN_ID (more here) in order not to interfere with each other when working in the cyberzoo.

Thanks! will try and let you know