External INS integration on SLPI proc QUP6
-
Trying to get a vectornav VN300 external INS to work with our voxl2 setup. It has a sensor module in px4 firmware: https://docs.px4.io/main/en/sensor/vectornav.
Looking at the voxl-px4-start script here: https://github.com/modalai/px4-firmware/blob/main/boards/modalai/voxl2/target/voxl-px4-start it seems like you should be able to start a module / driver and target QUP6 this way:
if [ "$GPS" != "NONE" ]; then # On M0052 the GPS driver runs on the apps processor if [ $PLATFORM = "M0052" ]; then gps start -d /dev/ttyHS2 # On M0054 and M0104 the GPS driver runs on SLPI DSP else qshell gps start -d 6 fi fiSo I assumed I could just modify voxl-px4 to include the vectornav sensor module, reload the package and add the appropriate start command
qshell vectornav start -d 6Even with the firmware properly rebuilt & deployed and the vectornav module visible as a target on the px4 side, it fails to run from the VOXL2 side:
starling-px4-dev-kit (D0011):/usr/bin$ px4-qshell vectornav start -d 6 INFO [qshell] Send cmd: 'vectornav start -d 6' INFO [qshell] cmd returned with: 1 INFO [qshell] qshell return value timestamp: 1453125775, local time: 1453127808 ERROR [qshell] Command failedAlso, the output isn't really verbose so I can't see why the command failed. I've tried running it on the px4 side (in the mavlink console in QGroundControl), and the verbose error I get is that '6' is not a proper serial device. How can I start the driver and properly target QUP6? Also, how can I get more verbose output when running px4-qshell commands on the VOXL2 side?
-
In order to debug the PX4 modules that run on the DSP side of VOXL, you should run
voxl-px4in interactive mode, such as:- stop voxl-px4 service :
systemctl stop voxl-px4 - run voxl-px4 in foreground with daemon mode disabled :
voxl-px4 -d
Then you should be able to run
qshell vectornav ...command and see its output. If you just runpx4-qshellfrom command line, the prints from the dsp do not propagate back to the user.Another alternative is to use
(sudo) mini-dm(on your linux host that is connected to VOXL2 via ADB) which allows you to see low level messages from the dsp (mini-dmis a tool that is available in Hexagon SDK).Now, regarding integration of a new driver with the DSP, I am assuming you were able to enable the module to build for the DSP, but it's running correctly because the device is not recognized. This is because in order to use the DSP uart in PX4, you need to call voxl-specific functions to open, read, write on the DSP port. Please take a look how this integration is done in the gps driver : https://github.com/modalai/px4-firmware/blob/voxl-dev/src/drivers/gps/gps.cpp , specifically looking at
#ifdef __PX4_QURTand similar conditionals.Alex
- stop voxl-px4 service :
-
@Alex-Kushleyev Gotcha, thanks!