I want to have one Raspberry Pi connected to two Pixhawk(Ardusub) at the same time so that I can build a vehicle with many motors and servos.
I think I’ve done the necessary work in two parts:
modifying the SystemID of the two Pixhawk(Ardusub) systems to distinguish them;
modifying the QGC code to determine the SystemID.
Now I’m having trouble modifying the program on Raspberry Pi and I can’t seem to get the functionality I want by modifying MavProxy.param.
Should I have two instances of MavProxy running on Raspberry Pi?What should I do, please?
I tried modify “–master=/dev/autopilot,115200” to “–master=/dev/serial/by-path/pcie-pci-0000:01:00.0-usb-0:1.4:1.0” in mavproxy.param,The two Pixhawks that Raspberry Pi connects to at the same time will have different addresses, but the MavProxy won’t work (even though I’m currently using just one Pixhawk, and I haven’t added any additional code to mavProxy.param)
In addition, I would like to know how Raspberry Pi can identify the /dev/autopilot address. Is this name defined in the Raspberry Pi program?I think it might have something to do with what I want to do.
I haven’t tried it, but the mavproxy docs reckon you should be able to set multiple masters.
I went looking and found this PR where that was introduced, including updates to all the files that make use of the autopilot symlink. It seems like the
/dev/autopilot simlink setup is done when companion is installed (either using
setup.sh or updated with
post-update.sh), by moving the relevant udev rules to where udev can find them.
It may be helpful to specify the exact usb locations, as was done in this post. I believe you should be able to find them with
ls /dev/serial/by-id, or possibly