VOXL2 mavlink topic streaming modifications
-
Hello, what's the easiest method for modifications to the mavlink topic streaming for the VOXL2? On the VOXL1 (and other PX4 HW) there's the SD card wherein you can add a /etc/extras.txt file for mavlink topic modifications (there is no SD card for the PX4). Also, you can typically change topics temporarily from the QGC mavlink console (this is not implemented on VOXL2 yet). I'd like to add some topics for streaming as well as reduce the rate for others. Thanks!
-
@JoeC The startup script for PX4 on VOXL2 is located at
/etc/modalai/voxl-px4.config
. You can modify that to change topic logging (There are already some modifications done in that file). -
@Eric-Katzfey Thanks Eric! It definitely sort of works. Two things I note as I modified: 1.) The topic streaming rate appears to be double what you set using the '-r' argument in the 'mavlink stream' command. Also, 2.) I was hoping to get RC_CHANNELS and interestingly, that particular topic isn't showing up at QGC. HIGHRES_IMU, ATTITUDE, ATTITUDE_QUATERNION, ATTITUDE_TARGET, LOCAL_POSITION_NED, and ODOMETRY all stream back (at double rate). RC_CHANNELS has nothing...
-
@JoeC Okay, interesting, I'll have to look into that.
-
@JoeC The RC_CHANNELS message relies on the input_rc topic. Are you sure that that is being generated? Can you see it being logged in log files? Can you see it with
px4-listener input_rc -n 1
when PX4 is running? -
@JoeC @Eric-Katzfey following. I'm using the VOXL 2 flight deck, Spektrum receiver, and Spektrum DXs transmitter. They are bound and I'm getting MAVLink messages in QGC, but no RC channels. PX4 is not publishing RC messages. Any feedback is appreciated!
voxl2:/$ px4-listener input_rc never published
-
@Taylor-Presley How are you starting px4? Is it being started via systemd service or are you starting it from the command line? Are you using the
voxl-px4
script or callingpx4
directly? You need to make sure that the script is trying to start the spektrum_rc driver otherwise it will produce no output. Can you verify that the spektrum_rc driver is in fact starting and not some other RC driver? -
@Eric-Katzfey I've tried both, below is the output after I disable px4 and then start it using voxl-px4. It does appear to try and start spektrum_rc and then returns the errors "Open failed on 8" and "dsm init failed." I also get "px4io read failed," is it possible they are related? Thanks in advance for your help!
voxl2:/$ voxl-inspect-services Service Name | Enabled | Running | CPU Usage --------------------------------------------------------------- docker-autorun | Disabled | Not Running | docker-daemon | Disabled | Not Running | modallink-relink | Disabled | Not Running | voxl-camera-server | Disabled | Not Running | voxl-cpu-monitor | Enabled | Running | 0.0 voxl-dfs-server | Disabled | Not Running | voxl-imu-server | Disabled | Not Running | voxl-mavlink-server | Disabled | Not Running | voxl-modem | Disabled | Not Running | voxl-portal | Disabled | Not Running | voxl-px4-imu-server | Disabled | Not Running | voxl-px4 | Disabled | Not Running | voxl-qvio-server | Disabled | Not Running | voxl-static-ip | Disabled | Not Running | voxl-streamer | Disabled | Not Running | voxl-tag-detector | Disabled | Not Running | voxl-tflite-server | Disabled | Not Running | voxl-time-sync | Disabled | Not Running | voxl-vision-px4 | Enabled | Running | 0.0 voxl-wait-for-fs | Disabled | Not Running | voxl2:/$ voxl-px4 Found DSP signature file INFO [px4] mlockall() enabled. PX4's virtual address space is locked into RAM. INFO [px4] assuming working directory is rootfs, no symlinks needed. ______ __ __ ___ | ___ \ \ \ / / / | | |_/ / \ V / / /| | | __/ / \ / /_| | | | / /^\ \ \___ | \_| \/ \/ |_/ px4 starting. INFO [px4] Calling startup script: /bin/sh /etc/modalai/voxl-px4.config 0 Running on M0054 INFO [muorb] SLPI: Creating qurt thread hpwork INFO [muorb] SLPI: Successfully created px4 task PX4_hpwork with tid 82 INFO [muorb] SLPI: Creating qurt thread lpwork INFO [muorb] SLPI: Successfully created px4 task PX4_lpwork with tid 81 INFO [muorb] SLPI: Creating qurt thread wkr_hrt INFO [muorb] SLPI: Successfully created px4 task PX4_wkr_hrt with tid 80 INFO [muorb] SLPI: Creating qurt thread client_sync_thread INFO [muorb] SLPI: Successfully created px4 task PX4_client_sync_thread with tid 79 INFO [muorb] SLPI: Creating qurt thread wq_manager INFO [muorb] SLPI: Successfully created px4 task PX4_wq_manager with tid 78 INFO [muorb] SLPI: Creating qurt thread qshell INFO [muorb] SLPI: Successfully created px4 task PX4_qshell with tid 77 INFO [muorb] SLPI: muorb aggregator thread running INFO [qshell] Send cmd: 'icm42688p start -s' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: icm42688p start -s INFO [muorb] SLPI: Creating qurt thread wq_SPI1 INFO [muorb] SLPI: Successfully created px4 task PX4_wq_SPI1 with tid 76 INFO [muorb] SLPI: *** SPI Device ID 0x26000a 2490378 INFO [uorb] Advertising remote topic sensor_accel INFO [uorb] Marking DeviceNode(parameter_server_set_used_request) as advertised in process_remote_topic INFO [muorb] SLPI: Marking DeviceNode(parameter_server_set_used_response) as advertised in process_remote_to INFO [uorb] Advertising remote topic sensor_gyro INFO [uorb] Advertising remote topic imu_server INFO [muorb] SLPI: on SPI bus 1 INFO [muorb] SLPI: icm42688p #0 on SPI bus 1 (devid=0x0) INFO [muorb] SLPI: INFO [muorb] SLPI: Ok executing command: icm42688p start -s INFO [muorb] SLPI: Sending qshell retval with timestamp 77614428, current timestamp 77614429 INFO [uorb] Advertising remote topic qshell_retval INFO [qshell] qshell return value timestamp: 77614428, local time: 77754132 INFO [uorb] Advertising remote topic sensor_gyro_fifo INFO [uorb] Advertising remote topic sensor_accel_fifo INFO [muorb] SLPI: Marking DeviceNode(parameter_client_reset_request) as advertised in process_remote_topic ERROR [muorb] SLPI: Cannot reset all parameters on client side INFO [uorb] Marking DeviceNode(parameter_client_reset_response) as advertised in process_remote_topic INFO [muorb] SLPI: Advertising remote topic parameter_update INFO [muorb] SLPI: Marking DeviceNode(parameter_client_set_value_request) as advertised in process_remote_to INFO [uorb] Marking DeviceNode(parameter_client_set_value_response) as advertised in process_remote_topic INFO [logger] logger started (mode=all) Starting Holybro magnetometer INFO [qshell] Send cmd: 'ist8310 start -R 10 -X -b 1' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: ist8310 start -R 10 -X -b 1 INFO [muorb] SLPI: Creating qurt thread wq_I2C1 INFO [muorb] SLPI: Successfully created px4 task PX4_wq_I2C1 with tid 75 INFO [muorb] SLPI: *** I2C Device ID 0x60e09 396809 INFO [muorb] SLPI: ist8310 #0 on I2C bus 1 (external) INFO [muorb] SLPI: Ok executing command: ist8310 start -R 10 -X -b 1 INFO [muorb] SLPI: Sending qshell retval with timestamp 80719911, current timestamp 80719912 INFO [qshell] qshell return value timestamp: 80719911, local time: 80721066 Starting Holybro LED driver INFO [qshell] Send cmd: 'rgbled_ncp5623c start -X -b 1 -f 400 -a 56' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: rgbled_ncp5623c start -X -b 1 -f 400 -a 56 INFO [muorb] SLPI: *** I2C Device ID 0x7b3809 8075273 INFO [muorb] SLPI: rgbled_ncp5623c #0 on I2C bus 1 (external) INFO [muorb] SLPI: Ok executing command: rgbled_ncp5623c start -X -b 1 -f 400 -a 56 INFO [muorb] SLPI: Sending qshell retval with timestamp 80751723, current timestamp 80751723 INFO [qshell] qshell return value timestamp: 80751723, local time: 80753408 INFO [qshell] Send cmd: 'icp10100 start -I -b 5' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: icp10100 start -I -b 5 INFO [muorb] SLPI: Creating qurt thread wq_I2C5 INFO [muorb] SLPI: Successfully created px4 task PX4_wq_I2C5 with tid 74 INFO [muorb] SLPI: *** I2C Device ID 0x9c6329 10249001 INFO [muorb] SLPI: probe probe succeeded. data = 0x1 0x48 INFO [muorb] SLPI: icp10100 #0 on I2C bus 5 INFO [muorb] SLPI: Ok executing command: icp10100 start -I -b 5 INFO [muorb] SLPI: Sending qshell retval with timestamp 80788487, current timestamp 80788488 INFO [qshell] qshell return value timestamp: 80788487, local time: 80789647 Starting modalai_esc driver INFO [uorb] Advertising remote topic sensor_mag INFO [uorb] Advertising remote topic sensor_baro INFO [qshell] Send cmd: 'modalai_esc start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: modalai_esc start INFO [muorb] SLPI: Creating qurt thread wq_hp_default INFO [muorb] SLPI: Successfully created px4 task PX4_wq_hp_default with tid 73 INFO [uorb] Advertising remote topic test_motor INFO [muorb] SLPI: Ok executing command: modalai_esc start INFO [muorb] SLPI: Opened UART ESC device INFO [muorb] SLPI: Sending qshell retval with timestamp 80881200, current timestamp 80881201 INFO [qshell] qshell return value timestamp: 80881200, local time: 80883293 INFO [qshell] Send cmd: 'mixer load /dev/uart_esc quad_x.main.mix' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: mixer load /dev/uart_esc quad_x.main.mix INFO [muorb] SLPI: Creating qurt thread wq_rate_ctrl INFO [muorb] SLPI: Successfully created px4 task PX4_wq_rate_ctrl with tid 71 INFO [muorb] SLPI: Ok executing command: mixer load /dev/uart_esc quad_x.main.mix INFO [muorb] SLPI: Sending qshell retval with timestamp 80962353, current timestamp 80962354 INFO [qshell] qshell return value timestamp: 80962353, local time: 80964191 INFO [uorb] Advertising remote topic actuator_outputs INFO [uorb] Advertising remote topic multirotor_motor_limits INFO [qshell] Send cmd: 'voxlpm start -X -b 2' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: voxlpm start -X -b 2 INFO [muorb] SLPI: Creating qurt thread wq_I2C2 INFO [muorb] SLPI: Successfully created px4 task PX4_wq_I2C2 with tid 4169 INFO [muorb] SLPI: *** I2C Device ID 0x784411 7881745 INFO [uorb] Advertising remote topic battery_status INFO [muorb] SLPI: voxlpm #0 on I2C bus 2 (external) INFO [muorb] SLPI: Ok executing command: voxlpm start -X -b 2 INFO [muorb] SLPI: Sending qshell retval with timestamp 81015254, current timestamp 81015255 INFO [qshell] qshell return value timestamp: 81015254, local time: 81017021 INFO [uorb] Advertising remote topic power_monitor Starting Holybro GPS INFO [qshell] Send cmd: 'gps start -d 7 -b 115200' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: gps start -d 7 -b 115200 INFO [muorb] SLPI: Creating qurt thread gps INFO [muorb] SLPI: Successfully created px4 task PX4_gps with tid 70 INFO [muorb] SLPI: Ok executing command: gps start -d 7 -b 115200 INFO [muorb] SLPI: Sending qshell retval with timestamp 81067431, current timestamp 81067432 INFO [qshell] qshell return value timestamp: 81067431, local time: 81070463 INFO [qshell] Send cmd: 'px4io detect' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: px4io detect INFO [muorb] SLPI: serial port fd 2 ERROR [muorb] SLPI: px4io read failed ERROR [muorb] SLPI: px4io io_reg_get(0,0,1): data error -5 ERROR [muorb] SLPI: IO not installed ERROR [muorb] SLPI: Detection attempt 2 failed ERROR [muorb] SLPI: Detection attempt 1 failed ERROR [muorb] SLPI: Detection attempt 0 failed ERROR [muorb] SLPI: Failed to execute command: px4io detect INFO [muorb] SLPI: Sending qshell retval with timestamp 81127227, current timestamp 81127228 INFO [qshell] cmd returned with: -17 INFO [qshell] qshell return value timestamp: 81127227, local time: 81130928 ERROR [qshell] Command failed M0065 not detected, starting Spektrum RC driver INFO [qshell] Send cmd: 'spektrum_rc start -d 8' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: spektrum_rc start -d 8 INFO [muorb] SLPI: Creating qurt thread spektrum_rc_main INFO [muorb] SLPI: Successfully created px4 task PX4_spektrum_rc_main with tid 67 INFO [muorb] SLPI: Ok executing command: spektrum_rc start -d 8 INFO [muorb] SLPI: Sending qshell retval with timestamp 81177434, current timestamp 81177435 ERROR [muorb] SLPI: Open failed on 8 ERROR [muorb] SLPI: dsm init failed INFO [qshell] qshell return value timestamp: 81177434, local time: 81180285 INFO [qshell] Send cmd: 'sensors start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: sensors start INFO [muorb] SLPI: Creating qurt thread wq_nav_and_controllers INFO [muorb] SLPI: Successfully created px4 task PX4_wq_nav_and_controllers with tid 4163 INFO [muorb] SLPI: Ok executing command: sensors start INFO [muorb] SLPI: Sending qshell retval with timestamp 82265425, current timestamp 82265426 INFO [uorb] Advertising remote topic vehicle_angular_acceleration INFO [uorb] Advertising remote topic vehicle_angular_velocity INFO [qshell] qshell return value timestamp: 82265425, local time: 82269473 INFO [muorb] SLPI: Creating qurt thread wq_INS0 INFO [muorb] SLPI: Successfully created px4 task PX4_wq_INS0 with tid 66 INFO [uorb] Advertising remote topic vehicle_imu INFO [uorb] Advertising remote topic vehicle_imu_status INFO [uorb] Advertising remote topic sensors_status_imu INFO [uorb] Advertising remote topic vehicle_acceleration INFO [uorb] Advertising remote topic vehicle_magnetometer INFO [uorb] Advertising remote topic sensor_preflight_mag INFO [uorb] Advertising remote topic vehicle_air_data INFO [qshell] Send cmd: 'ekf2 start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: ekf2 start INFO [uorb] Advertising remote topic sensor_selection INFO [uorb] Advertising remote topic sensor_combined INFO [muorb] SLPI: Ok executing command: ekf2 start INFO [muorb] SLPI: Sending qshell retval with timestamp 82536895, current timestamp 82536896 INFO [qshell] qshell return value timestamp: 82536895, local time: 82539136 ERROR [muorb] SLPI: 0 - vehicle_magnetometer lost, generation 0 -> 12 INFO [uorb] Advertising remote topic ekf2_timestamps INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: mc_pos_control start INFO [qshell] Send cmd: 'mc_pos_control start' INFO [muorb] SLPI: Ok executing command: mc_pos_control start INFO [muorb] SLPI: Sending qshell retval with timestamp 82596219, current timestamp 82596219 INFO [qshell] qshell return value timestamp: 82596219, local time: 82598209 INFO [qshell] Send cmd: 'mc_att_control start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: mc_att_control start INFO [muorb] SLPI: Ok executing command: mc_att_control start INFO [muorb] SLPI: Sending qshell retval with timestamp 82672105, current timestamp 82672106 INFO [qshell] qshell return value timestamp: 82672105, local time: 82676085 INFO [qshell] Send cmd: 'mc_rate_control start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: mc_rate_control start INFO [muorb] SLPI: Ok executing command: mc_rate_control start INFO [muorb] SLPI: Sending qshell retval with timestamp 82779424, current timestamp 82779425 INFO [qshell] qshell return value timestamp: 82779424, local time: 82783625 INFO [qshell] Send cmd: 'mc_hover_thrust_estimator start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: mc_hover_thrust_estimator start INFO [muorb] SLPI: Ok executing command: mc_hover_thrust_estimator start INFO [muorb] SLPI: Sending qshell retval with timestamp 82819473, current timestamp 82819474 INFO [qshell] qshell return value timestamp: 82819473, local time: 82821069 INFO [qshell] Send cmd: 'land_detector start multicopter' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: land_detector start multicopter INFO [muorb] SLPI: Ok executing command: land_detector start multicopter INFO [muorb] SLPI: Sending qshell retval with timestamp 82868826, current timestamp 82868827 INFO [qshell] qshell return value timestamp: 82868826, local time: 82872765 INFO [uorb] Advertising remote topic vehicle_land_detected INFO [muorb] SLPI: 83015116: reset position to last known position INFO [muorb] SLPI: 83015116: reset velocity to zero INFO [uorb] Advertising remote topic vehicle_local_position INFO [uorb] Advertising remote topic vehicle_odometry INFO [uorb] Advertising remote topic estimator_states INFO [uorb] Advertising remote topic estimator_status INFO [uorb] Advertising remote topic estimator_status_flags INFO [uorb] Advertising remote topic estimator_innovations INFO [uorb] Advertising remote topic estimator_innovation_test_ratios INFO [uorb] Advertising remote topic estimator_innovation_variances INFO [dataman] Unknown restart, data manager file '/data/px4/dataman' size is 11798680 bytes INFO [muorb] SLPI: Advertising remote topic position_setpoint_triplet INFO [commander] Mission #3 loaded, 1 WPs, curr: 0 INFO [muorb] SLPI: Advertising remote topic mission INFO [commander] LED: open /dev/led0 failed (22) INFO [muorb] SLPI: Advertising remote topic led_control INFO [muorb] SLPI: Advertising remote topic tune_control INFO [PreFlightCheck] Failed system power preflight check INFO [PreFlightCheck] Failed EKF health preflight check while waiting for filter to settle INFO [muorb] SLPI: Advertising remote topic vehicle_control_mode INFO [muorb] SLPI: Advertising remote topic vehicle_status INFO [muorb] SLPI: Advertising remote topic actuator_armed INFO [PreFlightCheck] Failed system power preflight check INFO [muorb] SLPI: Advertising remote topic commander_state INFO [uorb] Advertising remote topic rate_ctrl_status INFO [uorb] Advertising remote topic actuator_controls_0 INFO [muorb] SLPI: Advertising remote topic vehicle_status_flags INFO [muorb] SLPI: Advertising remote topic vehicle_command INFO [commander] Handling Commander command 176 INFO [muorb] SLPI: Advertising remote topic vehicle_command_ack INFO [PreFlightCheck] Failed system power preflight check INFO [PreFlightCheck] Failed system power preflight check INFO [mavlink] mode: Onboard, data rate: 100000 B/s on udp port 14556 remote port 14557 INFO [muorb] SLPI: Marking DeviceNode(vehicle_command) as advertised in process_remote_topic INFO [uorb] Advertising remote topic estimator_sensor_bias INFO [PreFlightCheck] Failed system power preflight check INFO [PreFlightCheck] Failed system power preflight check INFO [PreFlightCheck] Failed system power preflight check INFO [PreFlightCheck] Failed system power preflight check INFO [muorb] SLPI: Advertising remote topic telemetry_status INFO [px4] Startup script returned successfully pxh> INFO [PreFlightCheck] Failed system power preflight check INFO [PreFlightCheck] Failed system power preflight check INFO [PreFlightCheck] Failed system power preflight check INFO [PreFlightCheck] Failed system power preflight check INFO [PreFlightCheck] Failed system power preflight check INFO [PreFlightCheck] Failed system power preflight check INFO [PreFlightCheck] Failed system power preflight check INFO [muorb] SLPI: 90040983: EKF aligned, (baro hgt, IMU buf: 11, OBS buf: 8) INFO [PreFlightCheck] Failed system power preflight check INFO [uorb] Advertising remote topic vehicle_attitude INFO [uorb] Advertising remote topic vehicle_attitude_setpoint INFO [uorb] Advertising remote topic vehicle_rates_setpoint
-
@Eric-Katzfey Hi Eric and @Taylor-Presley you might find this helpful as well, I just had a chance to setup the Spektrum bind cable and a Spektrum receiver/xmitter. I AM now indeed getting RC_CHANNELS so I think my situation was because I didn't have the RC transmitter on the last time I was testing.
@Taylor-Presley I note in your posted photo, most services are not running; on mine that is working at the moment, I've got camera-server, cpu-monitor, imu-server, mavlink-server, portal, px4-imu-server, and vision-px4 all running. One thing you can try as well is to ensure you ran 'voxl-configure-mpa -p --family sentinel' and see if your setup starts working.
-
@JoeC I did try that because I figured I may have screwed something up during HITL testing, but input_rc is still not publishing, sensor_gps is not published, and px4io is still failing to read. I'm open to trying anything that may work, all comments appreciated!
-
@Taylor-Presley px4io will fail to read if you do not have a px4io board attached to VOXL2.
-
@Eric-Katzfey You can see in the script that if it fails to detect the px4io board (as you saw) then it will attempt to start the Spektum RC driver instead. However, your output shows that it fails to initialize uart 8. That doesn't look right.
-
@Eric-Katzfey Sounds like you have 2 issues here that are not related to the original post. Can you create 2 new forum posts for the Spektrum issue and the GPS issue? Then we can try to solve those independently. Thanks!
-
@Eric-Katzfey Thanks Eric, for future readers, I've created a new post at Voxl 2 Spektrum RC Issue.