bluerobotics / BlueOS

The open source platform for ROV, USV, robotic system operation, development, and expansion.
https://blueos.cloud/docs/
Other
138 stars 71 forks source link

bug: Freshly installed BlueOS: 502 Gateway Unavailable errors #2205

Open dieter-aerit opened 9 months ago

dieter-aerit commented 9 months ago

Bug description

I just installed BlueOS from scratch, and something seems broken. image

Steps to reproduce

Install BlueOS

Primary pain point(s)

It doesn't work out of the box, looks bad.

Additional context

v1.1.1

Prerequisites

patrickelectric commented 9 months ago

Hi @dieter-aerit! I'm sorry that was your initial experience, how did you install it and in which board ? Also, if you have access to the terminal, please install neofetch and provide the output of the command.

If you are using a raspberry pi 4 and used the install script, I would recommend using our raspberry image: https://github.com/bluerobotics/BlueOS/releases/tag/1.1.1 For more information about installing it, check: https://blueos.cloud/docs/blueos/1.1/

dieter-aerit commented 9 months ago

Hi @patrickelectric ! Just watching your YouTube talk about BlueOS as I'm typing this :).

I clicked the "Latest stable" link here that gives me the latest release from GitHub:

image

Then I flashed that image onto an SD card using the RaspberryPi imager. Then inserted the SD into a RaspberryPi 4, waited for it to boot and visited the BlueOS interface.

The Wizard did not work for me, it got blocked on trying to fetch a list of available parameter sets? So then I refreshed the UI and skipped the wizard, after which I basically saw the screenshot included in the bug report. No further idea of what is causing this.

Neofetch output: image

patrickelectric commented 9 months ago

Thanks!

So.. What is probably happening is that there is no flight controller connected, pixhawk or navigator on your raspberry. By default I believe that is not running SITL, to do that.

Go to blueos -> AutoPilot Firmware -> Change Board -> SITL That will solve some of the issues related to missing mavlink data.

The video stream issue is more confuse, do you have a camera connected ? Is the video stream service running at all ? You can check that enabling pirate mode under the happy robot icon on the top right corner, it'll enable more options. From there, you can go on available services page on the page selection menu. You should see a "MAVLink Camera Manager" service there on the list, running on port 6020.

dieter-aerit commented 9 months ago

Alright setting the board to SITL seems to fix a lot!

I have 2 cameras connected to the RaspberryPi. The camera page is now showing a bit more, and I think I even saw a live video at some point, but not anymore right now. The Camera Manager service seems to be running fine, and I can make swagger requests to it. My camera's are not popping up in /usr/bin/v4l2-ctl --list-devices though, so looks like a driver issue somehow... The are both Arducam's though, I would expect these to work out-of-the-box...

There is also an error message mentioning an IP that is not related to my device at all... Nothing in ifconfig with that IP, although the IP seems to be in the DHCP client range. The device IP is 192.168.97.196 . We have a /22 office network here.

image

patrickelectric commented 9 months ago

Hi @dieter-aerit, that's nice to know!

Ok, from there, it appears that something is a bit weird related to the legacy camera support that raspberry has, but ok.

It may worth to enable the legacy support. Go on the bottom right corner on the video streams page, there will be a cog icon there. Try to enable the raspberry legacy camera support. After that, you can restart your raspberry. https://blueos.cloud/docs/blueos/1.1/advanced-usage/#video-streams

dieter-aerit commented 9 months ago

I tried to enable "legacy camera support" but the call seems to fail: image

patrickelectric commented 9 months ago

@joaoantoniocardoso any idea why the camera manager is giving such error ?

dieter-aerit commented 9 months ago

I enabled legacy support using sudo raspi-config nonint do_legacy 0 and the camera's are available now.

Although at some point I get the IP error again and they disappear again. And when I setup 2 streams, both were showing images from the same camera...

patrickelectric commented 9 months ago

Glad that you have it working!

The IP is your current IP, of the "surface" computer or ground control station computer. No screen that you have configured has an IP that is of your computer, so the streams are unreachable. But, if you have cockpit or if you access the camera manager webpage, you'll be able to reach the video stream from webrtc. Currently the users use QGC that receives video directly from the UDP stream, but by default the configured IP for your streams are not from your own computer, that's why you are receiving this message.

joaoantoniocardoso commented 9 months ago

@joaoantoniocardoso any idea why the camera manager is giving such error ?

I believe it's the commander (or nginx?), not the camera manager.

patrickelectric commented 9 months ago

@dieter-aerit can you provide the logs of your system ?

image