PlotJuggler / plotjuggler-ros-plugins

Many PlotJuggler plugins for ROS and ROS2.
GNU Affero General Public License v3.0
109 stars 44 forks source link

PX4 topics can't be plotted #72

Open dakejahl opened 1 year ago

dakejahl commented 1 year ago

Hello, thanks for the project! I've been using it with PX4 for a year or two now and it's been invaluable.

I am trying to use PlotJuggler to subscribe to an /fmu topic over the DDS bridge from a device connected on the same network, but the topic doesn't appear in the list in PJ. All of the other topics from running nodes do appear, just not the /fmu topics. Strangely if I run ros2 topic hz /fmu/out/vehicle_attitude on the device the topic appears in the list, but PJ still fails to plot it. I suspect this might be related to the QoS settings but I'm not sure. https://docs.px4.io/main/en/middleware/uxrce_dds.html#px4-ros-2-qos-settings

PX4 uses the following QoS settings for publishers:

uxrQoS_t qos = {
.durability = UXR_DURABILITY_TRANSIENT_LOCAL,
.reliability = UXR_RELIABILITY_BEST_EFFORT,
.history = UXR_HISTORY_KEEP_LAST,
.depth = 0,
};

I added some debug printout in DataStreamROS2::subscribeToTopic and I see the QoS settings don't match the above (/camera/imu is from a realsense node and I am able to plot, it likely has default QoS settings)


subscribeToTopic:  /camera/imu
durability:  2
reliability:  1
history:  1
depth:  10

subscribeToTopic: /fmu/out/vehicle_attitude durability: 2 reliability: 1 history: 1 depth: 10


![image](https://github.com/PlotJuggler/plotjuggler-ros-plugins/assets/37091262/b09a2215-170c-4a36-9025-64150bb9c3d6)