StarlingUAS / ProjectStarling

BRL Flight Arena Infrastructure 2.0
Other
16 stars 3 forks source link

Foxglove does not plot data #147

Closed mhl787156 closed 2 years ago

mhl787156 commented 2 years ago

Previous none version of rosbridge suite is v0.1.0. There is problem with the latest version referred to in #146 .

This issue looks at v0.1.0 and tries to identify why foxglove is not plotting any data, but succeeeds at showin data.

An issue has been raised https://github.com/foxglove/studio/issues/2697 but it looks like it might be something from ourside.

mhl787156 commented 2 years ago

Ok using the following test setup:

  1. Termianl running uobflightlabstarling/rosbridge_suite:v0.1.0 (which runs v1.0.7 of rosbridge suite) port 9090
  2. Another terminal running uobflightlabstarling/starling-mavros bash, where inside I ros2 topic pub /test_topic geometry_msgs/msg/Point {}
  3. A thrid terminal running docker-compose.simple.yml from murmuration.

I have identified that if the third terminal is not running, the data is successfullly plotted in foxglove image

If docker-compose.simple.yml (running gazebo, sitl and mavros) is run, the data from the manual publishing immediately stops plotting.

Furthermore if I isolate the containers being started, the data stays plotting if either sitl or mavros or started.

However if the gazebo container is started the plotting immediately stops (but everything else continues). So something in uobflightlabstarling/starling-sim-iris:latest is causing the plotting to stop.

mhl787156 commented 2 years ago

Okay, further investigation appears to show that gazebo uses its own times format compared to the rest of ROS. When gazebo is started, it starts its own /clock using rosgraph_msgs/msg/Clock. This appears to reset all time in the simulation and break how foxglove shows plotting data for everything else. Unfortunately not entirely sure how to fix, but have updated the issue with the Foxglove guys so we shall see what they say https://github.com/foxglove/studio/issues/2697

mhl787156 commented 2 years ago

Okay further further investigation seems that this should be solvable through remapping /clock into something else, and then remapping it back for mavros on the ros1 side so it doesnt pollute the ros2 list of topics. This may be more annoying when we move to ROS2 but we will cross that line then.

There may also be an issue in using mavros on a live drone and whether the mavros remap will effect things.

Hopefully by then foxglove will have something in place for setting default clocks so we can get rid of the gazebo remap.

rob-clarke commented 2 years ago

I feel like these are potentially related: https://github.com/foxglove/studio/pull/1293 https://github.com/foxglove/studio/pull/2322