HITL voxl2 from docker image
-
I am trying to do HITL using voxl2
Below is output of vol-services and voxl-versionvoxl2:~$ voxl-inspect-services Scanning services... Service Name | Enabled | Running | CPU Usage ------------------------------------------------------------------- docker-autorun | Disabled | Not Running | modallink-relink | Disabled | Not Running | voxl-camera-server | Enabled | Not Running | voxl-cpu-monitor | Enabled | Running | 0.0% voxl-dfs-server | Disabled | Not Running | voxl-feature-tracker | Disabled | Not Running | voxl-flow-server | Disabled | Not Running | voxl-imu-server | Disabled | Not Running | voxl-lepton-server | Disabled | Not Running | voxl-mavcam-manager | Disabled | Not Running | voxl-mavlink-server | Enabled | Running | 0.5% voxl-microdds-agent | Enabled | Running | 0.4% voxl-modem | Disabled | Not Running | voxl-neopixel-manager | Disabled | Not Running | voxl-portal | Enabled | Running | 0.1% voxl-px4-imu-server | Disabled | Not Running | voxl-px4 | Disabled | Not Running | voxl-qvio-server | Disabled | Not Running | voxl-rangefinder-server | Disabled | Not Running | voxl-remote-id | Disabled | Not Running | voxl-softap | Disabled | Not Running | voxl-static-ip | Disabled | Not Running | voxl-streamer | Enabled | Running | 0.1% voxl-tag-detector | Enabled | Running | 0.0% voxl-tflite-server | Enabled | Running | 0.1% voxl-time-sync | Disabled | Not Running | voxl-uvc-server | Disabled | Not Running | voxl-vision-hub | Enabled | Running | 0.4% voxl-wait-for-fs | Enabled | Completed | voxl2:~$ voxl-version -------------------------------------------------------------------------------- system-image: 1.7.1-M0054-14.1a-perf-nightly-20231025 kernel: #1 SMP PREEMPT Thu Oct 26 03:25:38 UTC 2023 4.19.125 -------------------------------------------------------------------------------- hw version: M0054 -------------------------------------------------------------------------------- voxl-suite: 1.1.2 -------------------------------------------------------------------------------- Packages: Repo: http://voxl-packages.modalai.com/ ./dists/qrb5165/sdk-1.1/binary-arm64/ Last Updated: 2024-05-07 06:01:21 List: libmodal-cv 0.4.0 libmodal-exposure 0.1.0 libmodal-journal 0.2.2 libmodal-json 0.4.3 libmodal-pipe 2.9.2 libqrb5165-io 0.4.2 libvoxl-cci-direct 0.2.1 libvoxl-cutils 0.1.1 mv-voxl 0.1-r0 qrb5165-bind 0.1-r0 qrb5165-dfs-server 0.2.0 qrb5165-imu-server 1.0.1 qrb5165-rangefinder-server 0.1.1 qrb5165-slpi-test-sig 01-r0 qrb5165-system-tweaks 0.2.3 qrb5165-tflite 2.8.0-2 voxl-bind-spektrum 0.1.0 voxl-camera-calibration 0.5.3 voxl-camera-server 1.8.9.1 voxl-configurator 0.4.8 voxl-cpu-monitor 0.4.7 voxl-docker-support 1.3.0 voxl-elrs 0.1.3 voxl-esc 1.3.7 voxl-feature-tracker 0.3.2 voxl-flow-server 0.3.3 voxl-gphoto2-server 0.0.10 voxl-jpeg-turbo 2.1.3-5 voxl-lepton-server 1.2.0 voxl-libgphoto2 0.0.4 voxl-libuvc 1.0.7 voxl-logger 0.3.5 voxl-mavcam-manager 0.5.3 voxl-mavlink 0.1.1 voxl-mavlink-server 1.3.2 voxl-microdds-agent 2.4.1-0 voxl-modem 1.0.8 voxl-mongoose 7.7.0-1 voxl-mpa-to-ros 0.3.7 voxl-mpa-to-ros2 0.0.2 voxl-mpa-tools 1.1.3 voxl-neopixel-manager 0.0.3 voxl-opencv 4.5.5-2 voxl-portal 0.6.3 voxl-px4 1.14.0-2.0.63 voxl-px4-imu-server 0.1.2 voxl-px4-params 0.3.3 voxl-qvio-server 1.0.0 voxl-remote-id 0.0.9 voxl-ros2-foxy 0.0.1 voxl-streamer 0.7.4 voxl-suite 1.1.2 voxl-tag-detector 0.0.4 voxl-tflite-server 0.3.2 voxl-utils 1.3.3 voxl-uvc-server 0.1.6 voxl-vision-hub 1.7.3 voxl2-system-image 1.7.1-r0 voxl2-wlan 1.0-r0 --------------------------------------------------------------------------------
I followed the docker setup, ran the docker. Gazebo launches with this output.
(base) swarm_researchers@swarm-Alienware-Aurora-R16:~$ docker run --rm -it --net=host --privileged -e DISPLAY=$DISPLAY -v /dev/input:/dev/input:rw -v /tmp/.X11-unix:/tmp/.X11-unix:ro voxl-gazebo-docker ./run_gazebo.bash GAZEBO_PLUGIN_PATH :/usr/workspace/voxl2_hitl_gazebo GAZEBO_MODEL_PATH :/usr/workspace/voxl2_hitl_gazebo/models LD_LIBRARY_PATH :/usr/workspace/voxl2_hitl_gazebo/build Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring. Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring. Opened serial device /dev/ttyUSB0
I adb shell onto voxl2 and run voxl-px4-hitl.
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 Running on M0054 INFO [muorb] SLPI: Starting param sync THREAD 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 1620 bytes, decoded 1620 bytes (INT32:41, FLOAT:36) INFO [logger] logger started (mode=all) INFO [logger] Start file log (type: full) INFO [logger] [logger] /data/px4/log/2024-10-23/16_58_03.ulg INFO [muorb] SLPI: Advertising remote topic mavlink_log INFO [logger] Opened full log file: /data/px4/log/2024-10-23/16_58_03.ulg INFO [muorb] SLPI: Advertising remote topic event 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 [uORB] Advertising remote topic vehicle_magnetometer INFO [uORB] Advertising remote topic sensor_preflight_mag INFO [muorb] SLPI: Ok executing command: sensors start -h INFO [uORB] Advertising remote topic qshell_retval INFO [qshell] qshell return value timestamp: 3280312226, local time: 3280315844 INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: ekf2 start INFO [muorb] SLPI: arg0 = 'ekf2' INFO [muorb] SLPI: arg1 = 'start' INFO [qshell] Send cmd: 'ekf2 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: 3280586205, local time: 3280590513 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: 3280705576, local time: 3280706809 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: 3280759599, local time: 3280761703 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: 3280865439, local time: 3280867108 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: 3280906031, local time: 3280907747 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: 3280944959, local time: 3280946333 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: 3280986143, local time: 3280988769 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 [uORB] Advertising remote topic vehicle_land_detected INFO [muorb] SLPI: Ok executing command: manual_control start INFO [uORB] Advertising remote topic manual_control_setpoint INFO [qshell] qshell return value timestamp: 3281037294, local time: 3281039572 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 [qshell] Send cmd: 'control_allocator 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: 3281289624, local time: 3281291468 INFO [qshell] Send cmd: 'rc_update start' 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 [muorb] SLPI: Ok executing command: rc_update start INFO [qshell] qshell return value timestamp: 3281573754, local time: 3281575359 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 [qshell] Send cmd: 'commander start -h' INFO [uORB] Advertising remote topic led_control INFO [muorb] SLPI: Ok executing command: commander start -h INFO [muorb] SLPI: LED: open /dev/led0 failed (22) INFO [uORB] Advertising remote topic tune_control INFO [qshell] qshell return value timestamp: 3281758211, local time: 3281760473 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 [muorb] SLPI: Preflight Fail: Compass 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: 3281789206, local time: 3281789998 INFO [uORB] Advertising remote topic vehicle_command_ack INFO [qshell] Send cmd: 'load_mon start' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: load_mon start INFO [muorb] SLPI: arg0 = 'load_mon' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: Ok executing command: load_mon start INFO [uORB] Advertising remote topic cpuload INFO [qshell] qshell return value timestamp: 3281817661, local time: 3281818749 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 [qshell] Send cmd: 'flight_mode_manager 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: 3281917546, local time: 3281919416 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: 3283106378, local time: 3283108095 INFO [qshell] Send cmd: 'dsp_hitl start -g -m' INFO [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic INFO [muorb] SLPI: qshell gotten: dsp_hitl start -g -m INFO [muorb] SLPI: arg0 = 'dsp_hitl' INFO [muorb] SLPI: arg1 = 'start' INFO [muorb] SLPI: arg2 = '-g' INFO [muorb] SLPI: arg3 = '-m' 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 -g -m 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: 3283136557, local time: 3283138431 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 obstacle_distance 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: Too many arming check events (1, 14 > 14). Not reporting all 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 [muorb] SLPI: Preflight Fail: Compass Sensor 0 missing INFO [microdds_client] synchronized with time offset 1729699404643157us INFO [muorb] SLPI: Marking DeviceNode(timesync_status) as advertised in process_remote_topic INFO [microdds_client] successfully created rt/fmu/out/failsafe_flags data writer, topic id: 80 INFO [microdds_client] successfully created rt/fmu/out/position_setpoint_triplet data writer, topic id: 159 INFO [microdds_client] successfully created rt/fmu/out/timesync_status data writer, topic id: 200 INFO [microdds_client] successfully created rt/fmu/out/vehicle_control_mode data writer, topic id: 223 INFO [microdds_client] successfully created rt/fmu/out/vehicle_status data writer, topic id: 240 INFO [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network) INFO [px4] Startup script returned successfully pxh>
**Also, when I run voxl-px-hitl the drone model sinks under asphalt, am I doing something wrong, do I need to change the model inside run_gazebo.bash.
I think am using the correct cable, mentioned in one of the post. Is there a way to check the cable.**
-
@Shivam-Sehgal Never mind I was able to make it work by interchanging the tx - rx wires.
Is there a specific implementation of starling drone with all it's sensors?
-
@Shivam-Sehgal No, there is no Starling model in Gazebo.