Navigator Flight Controller problem

Hi,@tony-white

Currently, I’m using the Navigator Flight Controller for underwater control. Is it possible to use the Raspberry Pi connected underneath the Navigator to write programs and control the Navigator’s outputs?

Or do we need to add an external Pi or Arduino to write programs for control? Or is there a better way to achieve this?

Thanks.

Hi @XiangHong -
Yes, it’s definitely possible to control Navigator outputs directly - doing so onboard the existing Pi is preferred, as introducing more hardware gets things more complicated than necessary!
If not interested in using the ArduSub autopilot, you can develop your own using the Navigator WebAssistant extension.

It seems like this can run directly on the Raspberry Pi and control my hardware via a web interface, but I don’t see the Navigator WebAssistant in my BlueOS Extensions.

My version is:
‘BlueOS Version: tags/1.4.2-0-g0a0043f3
Bootstrap Version: 1.4.0’
Set as:
Board name: Navigator
Manufacturer: Blue Robotics
Mavlink platform: navigator
Firmware version: 4.6.0 (STABLE)
Vehicle type: Octorotor

Is there something wrong with my setup, or has the name (Navigator WebAssistant) been changed? Or is it that I can only use other built-in software in the BlueOS Extensions, such as OpenVSCoder or Jupyter?

Thanks

Hi @XiangHong -
It’s missing for me too - strange. While we investigate getting that fixed, you can install the extension nanually as detailed on its github page.

It’s also worth updating your bootstrap to the latest stable, 1.4.2!

Hi,@tony-white

We’ve updated to version 1.4.2, but the Navigator WebAssistant still doesn’t appear. For now, we’re using OpenVSCoder to write our programs, as shown in the image below.


Whenever we run this script, the Herelink controller gets disconnected. Our current assumption is that the communication from Herelink conflicts with the commands in our code. It might be necessary to temporarily pause Herelink’s original communication, run our custom code, and then restore it—repeating this cycle as needed.

Alternatively, it could be an issue with the file path causing an error.

We’d like to ask: what is the best solution to this problem?

Thanks :grinning_face:

Hi @XiangHong -
If you’re trying to use Navigator Web Assistant, but don’t have a Navigator, and are using some sort of Herelink autopilot, that is not supported.

In general, your code looks to be taking over the serial port used for communication with the flight controller. This would of course prevent BlueOS from communicating with it!

Please share the goals for your autonomy - typically using Lua Scripts with a Navigator and ArduSub or ArduRover is the easiest approach to adding specialized functionality or autonomy…

Hi,@tony-white

Sorry, I might not have explained it clearly because of the Google translation.We are using VSCode’s Remote-SSH feature to connect to the Navigator for development (we couldn’t find the Navigator Web Assistant in the plugins). We then upload code to the Navigator to read data from the Herelink controller. It’s not that we’re not using the Navigator.

We initially used ArduSub to control our AUV, but since it doesn’t support wireless joystick control, we switched to ArduCopter.

We want to take over the serial port communication of the flight controller through code because we want to freely switch between manual joystick control and autonomous mode. Also, is it not possible to use VSCode to send a script to the Navigator to connect and retrieve data from the Herelink (joystick and buttons)?

However, we are not sure if there are parts of QGC or Mission Planner where we can write custom code to support our development. Additionally, the frames we need do not exist in QGC or Mission Planner. We are also planning to install additional sensors and use this single Navigator board to handle additional control tasks.

Are you using a Raspberry Pi 4, or some other board? It seems to appear fine here on BlueOS 1.4.2:

This is actually possible now (it was added quite recently, and is currently only available in development releases).

You may be misunderstanding what the Navigator actually is - it’s “just” a collection of sensors and outputs, and no code actually runs on the Navigator itself.

BlueOS runs on the Raspberry Pi, and if a Navigator is detected then an autopilot firmware can be run (as a service within BlueOS) that makes use of the sensors and PWM outputs the Navigator hardware provides. Alternatively (as in, only if the autopilot firmware is not running), you can connect to / directly control the Navigator hardware using your own code, or via an Extension like the Navigator WebAssistant.

Serial ports and the like are part of the Raspberry Pi, and can be either

  1. controlled by the autopilot firmware, or
  2. used by other parts of BlueOS, or an Extension, if either
    1. the port is configured as disabled for the autopilot (via the Autopilot Firmware page), or
    2. the autopilot is completely disabled

Note that when an autopilot firmware is running you can communicate with it using MAVLink, which is less direct than talking to individual hardware chips, but may still provide the information/control required for your application. That said, it’s unclear what you’re trying to achieve, so it’s difficult to advise on which approaches actually make sense for your use-case.

This is normally just handled with flight modes in the autopilot - i.e. controlling the vehicle with a joystick in “manual” (or a similar) mode, then switching to “auto” mode to hand full control over to the autopilot and allow it to complete an autonomous mission.

That depends what you need to communicate with and control. Both should allow sending custom MAVLink messages, and I believe Mission Planner also supports custom widgets. Both custom Actions (MAVLink and/or HTTP/JavaScript) and custom widgets are available in Cockpit, if that is relevant.

This may require adding drivers for them to ArduPilot if the sensors are not already supported, or as a BlueOS Extension, depending on how you want them to be integrated and whether they’re related to the vehicle’s motion control / state estimation (or just useful data payloads being collected / complex actuators that MAVLink is poorly suited to handle).

1 Like