StarlingUAS / ProjectStarling

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

General Web UI #112

Closed mhl787156 closed 3 years ago

mhl787156 commented 3 years ago

An example should be given for how to stream web video from topics.

http://wiki.ros.org/web_video_server

https://github.com/RobotWebTools/web_video_server/tree/ros2

mhl787156 commented 3 years ago

So now we are trying to attach the foxglove.dev interface which works through the rosbridge_suite (see https://foxglove.dev/docs/connection/rosbridge) . It has been verified that camera topics automatically 'work' with the foxglove dashboard.

As of writing it almost works for everything but one case. For some reason, when running any mavros (ros1+bridge) container, the websocket connection between foxglove and the rosbridge websocket goes down. The connection comes back again if I stop mavros.

I have narrowed it down to being caused by the sys_status plugin. I.e. if mavros is started with the sys_status plugin enabled, the websocket complains that the connection is no longer available.

mhl787156 commented 3 years ago

@rob-clarke Finally found the foxglove error log, we get the following

Error: Syntax error at line 1 col 32:

  string MODE_APM_PLANE_MANUAL = MANUAL
                                 ^
Unexpected fieldOrType token: "MANUAL". Instead, I was expecting to see one of the following:

A doubleQuotedString token based on:
    doubleQuotedString →  ● %doubleQuotedString
    stringConstantValue$subexpression$1 →  ● doubleQuotedString
    stringConstantValue →  ● stringConstantValue$subexpression$1
    main → _ stringType __ constantField _ assignment _ ● stringConstantValue _ main$ebnf$11
A singleQuotedString token based on:
    singleQuotedString →  ● %singleQuotedString
    stringConstantValue$subexpression$1 →  ● singleQuotedString
    stringConstantValue →  ● stringConstantValue$subexpression$1
    main → _ stringType __ constantField _ assignment _ ● stringConstantValue _ main$ebnf$11

    at u.feed (file:///opt/Foxglove%20Studio/resources/app.asar/renderer/main.js:176:1209)
    at file:///opt/Foxglove%20Studio/resources/app.asar/renderer/main.js:183:504
    at Array.forEach (<anonymous>)
    at b (file:///opt/Foxglove%20Studio/resources/app.asar/renderer/main.js:183:397)
    at file:///opt/Foxglove%20Studio/resources/app.asar/renderer/main.js:183:122
    at Array.forEach (<anonymous>)
    at g (file:///opt/Foxglove%20Studio/resources/app.asar/renderer/main.js:183:63)
    at K._requestTopics (file:///opt/Foxglove%20Studio/resources/app.asar/renderer/9773.js:1:2933)

It looks like foxglove is struggling to parse the State.msg file (https://github.com/mavlink/mavros/blob/ros2/mavros_msgs/msg/State.msg) due the enumerations. I am not sure of a fix for this issue.

Thankfully on further inspection, it seems that everything (incl. foxglove) still runs in the background despite this issue.

mhl787156 commented 3 years ago

Screenshot from 2021-10-26 15-40-44

It does look very nice though when it is working! Screenshot from 2021-10-26 15-02-57

mhl787156 commented 3 years ago

Have raised an issue here: https://github.com/foxglove/studio/issues/2035

mhl787156 commented 3 years ago

This issue (https://github.com/foxglove/studio/issues/20350) has been closed. Just waiting for next release to solve this issue.

mhl787156 commented 3 years ago

Release! https://github.com/foxglove/studio/releases/tag/v0.21.0

mhl787156 commented 3 years ago

This is now released and verified. Only documented downside is that it cannot send/receive service topics. Will reopen later.