HITL Starling/Voxl2
-
hi,
I know it has been asked several times and I already went through all the answers (I think). Still cannot figure out what am I doing wrong.
I am trying to run HITL with gazebo connected via usb-ftdi as reported in the awesome documentation. I know it is not the cable cause I can both 'cat /dev/ttyUSB0' and get data and when I run
gazebo Tools/simulation/gazebo-classic/sitl_gazebo-classic/worlds/hitl_iris_flex.world Opened serial device /dev/ttyUSB0
I of course followed the video from Zach but here is the output when I run voxl-px4-hitl on voxl2:
voxl-px4-hitl 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. INFO [muorb] Got muorb init command Sending initialization request Got topic data before configuration complete Got topic data before configuration complete Got topic data before configuration complete Got topic data before configuration complete Got topic data before configuration complete Got topic data before configuration complete Got topic data before configuration complete Got topic data before configuration complete Got topic data before configuration complete Got topic data before configuration complete Got topic data before configuration complete Got topic data before configuration complete Got topic data before configuration complete INFO [muorb] SLPI: muorb aggregator thread running INFO [muorb] muorb protobuf initalize method succeeded INFO [muorb] succesfully did ADVERTISE_TEST_TYPE INFO [muorb] SLPI: Creating pthread test_MUORB INFO [muorb] SLPI: Successfully created px4 task PX4_test_MUORB with tid 2097656 INFO [muorb] succesfully did SUBSCRIBE_TEST_TYPE INFO [muorb] SLPI: Creating pthread test_MUORB INFO [muorb] SLPI: Successfully created px4 task PX4_test_MUORB with tid 2097655 INFO [muorb] succesfully did TOPIC_TEST_TYPE INFO [muorb] SLPI: Creating pthread test_MUORB INFO [muorb] SLPI: Successfully created px4 task PX4_test_MUORB with tid 2097654 INFO [muorb] succesfully did UNSUBSCRIBE_TEST_TYPE INFO [muorb] SLPI: Creating pthread test_MUORB INFO [muorb] SLPI: Successfully created px4 task PX4_test_MUORB with tid 2097653 INFO [muorb] muorb test passed ______ __ __ ___ | ___ \ \ \ / / / | | |_/ / \ V / / /| | | __/ / \ / /_| | | | / /^\ \ \___ | \_| \/ \/ |_/ px4 starting. INFO [px4] startup script: /bin/sh /usr/bin/voxl-px4-hitl-start 0 INFO [muorb] SLPI: Advertising remote topic log_message INFO [parameters] Starting param sync THREAD INFO [muorb] SLPI: Starting param sync THREAD Running on M0054 INFO [muorb] SLPI: before starting the qshell_entry task INFO [muorb] SLPI: Creating pthread qshell INFO [muorb] SLPI: qshell entry..... INFO [muorb] SLPI: Successfully created px4 task PX4_qshell with tid 2097652 INFO [muorb] SLPI: Init app map initialized INFO [muorb] SLPI: after starting the qshell_entry task INFO [param] selected parameter default file /data/px4/param/hitl_parameters INFO [muorb] SLPI: Marking DeviceNode(parameter_client_reset_request) as advertised in process_remote_topic 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_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] Marking DeviceNode(parameter_client_set_value_response) as advertised in process_remote_topic INFO [parameters] BSON document size 1656 bytes, decoded 1656 bytes (INT32:43, FLOAT:36) INFO [logger] logger started (mode=all) INFO [logger] Start file log (type: full) INFO [logger] [logger] /data/px4/log/2023-11-02/13_05_28.ulg INFO [muorb] SLPI: Advertising remote topic mavlink_log INFO [muorb] SLPI: Advertising remote topic event INFO [logger] Opened full log file: /data/px4/log/2023-11-02/13_05_28.ulg INFO [muorb] SLPI: Advertising remote topic logger_status INFO [qshell] Send cmd: 'sensors start -h' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: sensors start -h INFO [muorb] SLPI: arg0 = 'sensors' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: arg2 = '-h' INFO [uORB] Advertising remote topic sensor_selection INFO [uORB] Advertising remote topic sensors_status_imu INFO [uORB] Advertising remote topic vehicle_acceleration INFO [uORB] Advertising remote topic vehicle_angular_velocity INFO [uORB] Advertising remote topic sensor_combined INFO [uORB] Advertising remote topic vehicle_air_data INFO [uORB] Advertising remote topic vehicle_gps_position INFO [muorb] SLPI: Ok executing command: sensors start -h INFO [uORB] Advertising remote topic qshell_retval INFO [qshell] qshell return value timestamp: 815009623, local time: 815017199 INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: ekf2 start INFO [qshell] Send cmd: 'ekf2 start' INFO [muorb] SLPI: arg0 = 'ekf2' INFO [muorb] SLPI: arg1 = 'start' INFO [uORB] Advertising remote topic vehicle_attitude INFO [uORB] Advertising remote topic vehicle_local_position INFO [uORB] Advertising remote topic estimator_event_flags INFO [uORB] Advertising remote topic estimator_innovation_test_ratios INFO [uORB] Advertising remote topic estimator_innovation_variances INFO [uORB] Advertising remote topic estimator_innovations INFO [uORB] Advertising remote topic estimator_sensor_bias INFO [uORB] Advertising remote topic estimator_states INFO [uORB] Advertising remote topic estimator_status_flags INFO [uORB] Advertising remote topic estimator_status INFO [muorb] SLPI: Ok executing command: ekf2 start INFO [qshell] qshell return value timestamp: 815334178, local time: 815338611 INFO [qshell] Send cmd: 'mc_pos_control start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: mc_pos_control start INFO [muorb] SLPI: arg0 = 'mc_pos_control' INFO [muorb] SLPI: arg1 = 'start' INFO [uORB] Advertising remote topic takeoff_status INFO [muorb] SLPI: Ok executing command: mc_pos_control start INFO [qshell] qshell return value timestamp: 815491755, local time: 815493222 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: arg0 = 'mc_att_control' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: Ok executing command: mc_att_control start INFO [qshell] qshell return value timestamp: 815560077, local time: 815562711 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: arg0 = 'mc_rate_control' INFO [muorb] SLPI: arg1 = 'start' INFO [uORB] Advertising remote topic rate_ctrl_status INFO [muorb] SLPI: Ok executing command: mc_rate_control start INFO [qshell] qshell return value timestamp: 815678230, local time: 815682065 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: arg0 = 'mc_hover_thrust_estimator' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: Ok executing command: mc_hover_thrust_estimator start INFO [qshell] qshell return value timestamp: 815746736, local time: 815748268 INFO [qshell] Send cmd: 'mc_autotune_attitude_control start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: mc_autotune_attitude_control start INFO [muorb] SLPI: arg0 = 'mc_autotune_attitude_control' INFO [muorb] SLPI: arg1 = 'start' INFO [uORB] Advertising remote topic autotune_attitude_control_status INFO [muorb] SLPI: Ok executing command: mc_autotune_attitude_control start INFO [qshell] qshell return value timestamp: 815789804, local time: 815791337 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: arg0 = 'land_detector' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: arg2 = 'multicopter' INFO [muorb] SLPI: Ok executing command: land_detector start multicopter INFO [qshell] qshell return value timestamp: 815839581, local time: 815841469 INFO [uORB] Advertising remote topic vehicle_land_detected INFO [qshell] Send cmd: 'manual_control start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: manual_control start INFO [muorb] SLPI: arg0 = 'manual_control' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: Ok executing command: manual_control start INFO [uORB] Advertising remote topic manual_control_setpoint INFO [qshell] qshell return value timestamp: 815912276, local time: 815914468 INFO [qshell] Send cmd: 'control_allocator start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: control_allocator start INFO [muorb] SLPI: arg0 = 'control_allocator' INFO [muorb] SLPI: arg1 = 'start' INFO [uORB] Advertising remote topic control_allocator_status INFO [uORB] Marking DeviceNode(control_allocator_status) as advertised in process_remote_topic INFO [uORB] Advertising remote topic actuator_motors INFO [uORB] Advertising remote topic actuator_servos INFO [uORB] Advertising remote topic actuator_servos_trim INFO [muorb] SLPI: Ok executing command: control_allocator start INFO [qshell] qshell return value timestamp: 816195197, local time: 816196869 INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: rc_update start INFO [muorb] SLPI: arg0 = 'rc_update' INFO [muorb] SLPI: arg1 = 'start' INFO [qshell] Send cmd: 'rc_update start' INFO [muorb] SLPI: Ok executing command: rc_update start INFO [qshell] qshell return value timestamp: 816521809, local time: 816523074 INFO [qshell] Send cmd: 'commander start -h' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: commander start -h INFO [muorb] SLPI: arg0 = 'commander' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: arg2 = '-h' INFO [muorb] SLPI: Creating pthread commander INFO [muorb] SLPI: Successfully created px4 task PX4_commander with tid 2097647 INFO [uORB] Advertising remote topic led_control INFO [muorb] SLPI: LED: open /dev/led0 failed (22) INFO [uORB] Advertising remote topic tune_control INFO [muorb] SLPI: Ok executing command: commander start -h INFO [qshell] qshell return value timestamp: 816759292, local time: 816761239 INFO [muorb] SLPI: orb_advertise_multi: failed to set queue size INFO [muorb] SLPI: Preflight Fail: Accel Sensor 0 missing INFO [muorb] SLPI: Preflight Fail: barometer 0 missing INFO [muorb] SLPI: Preflight Fail: ekf2 missing data INFO [muorb] SLPI: Preflight Fail: Gyro Sensor 0 missing INFO [uORB] Advertising remote topic health_report INFO [uORB] Advertising remote topic failsafe_flags INFO [uORB] Advertising remote topic actuator_armed INFO [uORB] Advertising remote topic vehicle_control_mode INFO [uORB] Advertising remote topic vehicle_status INFO [uORB] Advertising remote topic failure_detector_status INFO [qshell] Send cmd: 'commander mode posctl' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: commander mode posctl INFO [muorb] SLPI: arg0 = 'commander' INFO [muorb] SLPI: arg1 = 'mode' INFO [muorb] SLPI: arg2 = 'posctl' INFO [uORB] Advertising remote topic vehicle_command INFO [muorb] SLPI: Ok executing command: commander mode posctl INFO [qshell] qshell return value timestamp: 816809125, local time: 816812053 INFO [uORB] Advertising remote topic vehicle_command_ack INFO [qshell] Send cmd: 'param_set_selector start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: param_set_selector start INFO [muorb] SLPI: arg0 = 'param_set_selector' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: Ok executing command: param_set_selector start INFO [qshell] qshell return value timestamp: 816848368, local time: 816850576 INFO [qshell] Send cmd: 'flight_mode_manager start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: flight_mode_manager start INFO [muorb] SLPI: arg0 = 'flight_mode_manager' INFO [muorb] SLPI: arg1 = 'start' INFO [uORB] Marking DeviceNode(vehicle_command) as advertised in process_remote_topic INFO [muorb] SLPI: Ok executing command: flight_mode_manager start INFO [qshell] qshell return value timestamp: 816974943, local time: 816976246 INFO [dataman] data manager file '/data/px4/dataman' size is 7866640 bytes INFO [muorb] SLPI: Advertising remote topic transponder_report INFO [muorb] SLPI: Advertising remote topic rtl_time_estimate INFO [muorb] SLPI: Advertising remote topic position_setpoint_triplet INFO [qshell] Send cmd: 'pwm_out_sim start -m hil' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: pwm_out_sim start -m hil INFO [muorb] SLPI: arg0 = 'pwm_out_sim' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: arg2 = '-m' INFO [muorb] SLPI: arg3 = 'hil' INFO [uORB] Advertising remote topic actuator_outputs INFO [muorb] SLPI: Ok executing command: pwm_out_sim start -m hil INFO [uORB] Advertising remote topic actuator_outputs_sim INFO [qshell] qshell return value timestamp: 818185249, local time: 818187816 INFO [qshell] Send cmd: 'dsp_hitl start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: dsp_hitl start INFO [muorb] SLPI: arg0 = 'dsp_hitl' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: Creating pthread dsp_hitl__main INFO [muorb] SLPI: Successfully created px4 task PX4_dsp_hitl__main with tid 2097645 INFO [muorb] SLPI: Ok executing command: dsp_hitl start **ERROR [muorb] SLPI: Port is open: 0** INFO [uORB] Advertising remote topic sensor_accel INFO [uORB] Advertising remote topic sensor_gyro INFO [muorb] SLPI: Got 5 from orb_subscribe INFO [qshell] qshell return value timestamp: 818227135, local time: 818228965 INFO [uORB] Advertising remote topic esc_status INFO [mavlink] mode: Onboard, data rate: 100000 B/s on udp port 14556 remote port 14557 INFO [muorb] SLPI: Advertising remote topic telemetry_status INFO [mavlink] partner IP: 127.0.0.1 INFO [muorb] SLPI: Advertising remote topic timesync_status INFO [mavlink] mode: Normal, data rate: 100000 B/s on udp port 14558 remote port 14559 INFO [muorb] SLPI: Marking DeviceNode(telemetry_status) as advertised in process_remote_topic INFO [uORB] Advertising remote topic vehicle_imu INFO [uORB] Advertising remote topic vehicle_imu_status INFO [muorb] SLPI: Preflight Fail: No valid data from Accel 0 INFO [muorb] SLPI: Preflight Fail: barometer 0 missing INFO [muorb] SLPI: Preflight Fail: ekf2 missing data INFO [muorb] SLPI: Preflight Fail: No valid data from Gyro 0 INFO [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network) INFO [px4] Startup script returned successfully pxh>
the only thing I find suspicious about this is:
ERROR [muorb] SLPI: Port is open: 0any hint on what could be wrong?
thank you,
-
@tiralonghipol can you please share the version of software you are using as well as a picture of your setup (specifically the wiring)?
-
@tiralonghipol said in HITL Starling/Voxl2:
Port is open
That isn't actually an error. It was only output as an error to make it stand out. It's really just an indication that the serial port was opened successfully. We should probably change that to a regular info message instead of an error report.
-
@Eric-Katzfey of course sorry I forgot!
system-image: 1.6.2-M0054-14.1a-perf
kernel: #1 SMP PREEMPT Fri May 19 22:19:33 UTC 2023 4.19.125hw version: M0054
px4-ver all
HW arch: MODALAI_VOXL2
PX4 git-hash: d21e9718a77d72334e03dff79f2a7cb8e413b3a9
PX4 version: 1.14.0 0 (17694720)
PX4 git-branch: voxl-dev
Vendor version: 2.0.56 0 (33568768)
OS: Linux
OS version: Release 4.19.125 (68386303)
Build datetime: Nov 1 2023 15:16:24
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 7.5.0
PX4GUID: 100a41444f4d5649414c324c584f30303030
UNKNOWN MCUthis cable I'm using also has visual feedback on rx/tx with a green/red led
I then suspect it is not a wiring issue but of course I might be wrong -
@tiralonghipol said in HITL Starling/Voxl2:
INFO [muorb] SLPI: Preflight Fail: No valid data from Accel 0
INFO [muorb] SLPI: Preflight Fail: barometer 0 missing
INFO [muorb] SLPI: Preflight Fail: ekf2 missing data
INFO [muorb] SLPI: Preflight Fail: No valid data from Gyro 0This part is telling us that there is no accelerometer, gyro, or barometer data. This is the data that is supposed to come in from gazebo over the serial link. So there is something wrong with that data transfer. Could be a cable issue of some type. At the px4 console what do you get when you enter
qshell dsp_hitl status
? -
@Eric-Katzfey thank you for the reply
this is the output to the command you suggested:
pxh> qshell dsp_hitl status INFO [qshell] Send cmd: 'dsp_hitl status' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: dsp_hitl status INFO [muorb] SLPI: arg0 = 'dsp_hitl' INFO [muorb] SLPI: arg1 = 'status' INFO [muorb] SLPI: Running: no INFO [muorb] SLPI: Status of IMU_Data counter: 0 INFO [muorb] SLPI: Value of current accel x, y, z data: 0.000000, 0.000000, 0.000000 INFO [muorb] SLPI: Value of current gyro x, y, z data: 0.000000, 0.000000, 0.000000 INFO [muorb] SLPI: Value of HIL_Sensor counter: 0 INFO [muorb] SLPI: Value of Heartbeat counter: 4 INFO [muorb] SLPI: Value of Vision data counter: 0 INFO [muorb] SLPI: Value of GPS Data counter: 0 INFO [muorb] SLPI: Ok executing command: dsp_hitl status INFO [qshell] qshell return value timestamp: 59399090, local time: 59402895 pxh>
then I thought ok, maybe id did not start for some reason.
I then run
qshell dsp_hitl start
qshell dsp_hitl start INFO [qshell] Send cmd: 'dsp_hitl start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: dsp_hitl start INFO [muorb] SLPI: arg0 = 'dsp_hitl' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: Creating pthread dsp_hitl__main INFO [muorb] SLPI: Successfully created px4 task PX4_dsp_hitl__main with tid 2097643 INFO [muorb] SLPI: Ok executing command: dsp_hitl start ERROR [muorb] SLPI: Port in use: 2 (22) ERROR [muorb] SLPI: Port is open: -1 INFO [uORB] Marking DeviceNode(sensor_accel) as advertised in process_remote_topic INFO [uORB] Marking DeviceNode(sensor_gyro) as advertised in process_remote_topic INFO [qshell] qshell return value timestamp: 1093811038, local time: 1093815063 pxh> INFO [muorb] SLPI: Got 8 from orb_subscribe INFO [uORB] Marking DeviceNode(vehicle_imu) as advertised in process_remote_topic INFO [uORB] Marking DeviceNode(vehicle_imu_status) as advertised in process_remote_topic
-
@tiralonghipol Yeah, so that status tells us that it isn't getting any data over the serial port. So we need to figure out why not. In your first post you show that you start gazebo with:
@tiralonghipol said in HITL Starling/Voxl2:
gazebo Tools/simulation/gazebo-classic/sitl_gazebo-classic/worlds/hitl_iris_flex.world
Was that a typo? It should be
hitl_iris.world
nothitl_iris_flex.world
. I'm not sure if that would cause a problem or not. Do you have a way to diagnose the serial cable? Can you reverse the tx and rx pins and see if that changes things? Can you look at the output of the cable tx line with an oscilloscope to see if you can detect data being sent by gazebo? -
@tiralonghipol You shouldn't have to start dsp_hitl. If you start px4 with the
voxl-px4-hitl
command then it will be started automatically.