Handling customized mavlink packets with BlueOS/mavlink-routerd

Hey everybody,
I am working on a robot to clean fish net: Autonomous Cleaning Robot – Remora Robotics
I have customized mavlink packets by defining new types of messages in message_definitions/v1.0 .
On my local machine, I reinstalled MAVProxy basically following Adding a new MAVLink Message — Dev documentation
It is working fine with sitl.
I was able to customized mavproxy in ardusub to have my companion computer dealing with my customized packets.
But we are switching from Raspberry Pi 3 to Pi 4 and I need to use BlueOS.
I noticed that MAVProxy is not used anymore, it’s mavlink-routerd which is forwarding packets.
So I would like to have mavlink-routerd able to forward my customized packets so that I can get them from outside the robot.
Can somebody explain me the steps needed to achieve this ?
I would suppose:

  1. use mavgen.py to generate C header files
  2. recompile mavlink-routerd with these header files
  3. put the newly compiled mavlink-routerd in BlueOS docker container (but how?)

Thanks,
mat

Hi Mat,

You’ll need to have a custom BlueOS docker, but we are thinking in ways to improve this in future BlueOS versions.
We are still working on the documentation for that, but you should be able following our internal instructions.

You can change BlueOS in three ways, one is to add mavproxy back in the installation, the software should be able to detect it. We use the first tool found by default.
You can also replace mavlink-routerd that is being used. To do that you just need to change the bootstrap script to use your version.
You can also create a new docker that uses BlueOS-core as base and replace the file manually.
After having your docker image available in dockerhub, you can enable pirate mode in settings, go to version chooser, and use your dockerhub username over bluerobotics, all blueos-core images will show to install.

Hi @mat, welcome to the forum :slight_smile:

In addition to @patrickelectric’s suggestions, an alternative approach may be to make use of existing MAVLink messages instead of using custom ones. If there are no particularly good fits for your use-case you may be able to use NAMED_VALUE_FLOAT and the like to send generic data messages, but I’m unsure how much data you’re wanting to send or what type of data it is.

That approach is understandably less tailored to your individual circumstances, but may be a sufficient interim solution while you either make submissions to add messages to the public MAVLink protocol, and/or while we improve the flexibility of BlueOS to better support this kind of modification.

Thanks for your answers.
@Eliot , I may end up with your solution but it’s really not that clean, so I’ll try @patrickelectric kind of solution first.
@patrickelectric , my preferred solution would be recompiling mavlink-routerd and use it with modification of bootstrap script inside a custom build docker image. The idea is to deploy the resulting software to multiple robots, so having a custom BlueOS image is very appealing.
I will do some tries and come back to update the thread.
Thanks
Mathieu