Closed mengchaoheng closed 2 years ago
uname -ar
?docker --version
?docker run --rm -it jonasvautherin/px4-gazebo-headless:1.13.0
?parallels@ubuntu-linux-20-04-desktop:~/Desktop$ uname -ar
Linux ubuntu-linux-20-04-desktop 5.15.0-52-generic #58~20.04.1-Ubuntu SMP Thu Oct 13 13:10:09 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
parallels@ubuntu-linux-20-04-desktop:~/Desktop$ docker --version
Docker version 20.10.20, build 9fdeb9c
parallels@ubuntu-linux-20-04-desktop:~/Desktop$ docker run --rm -it jonasvautherin/px4-gazebo-headless:1.13.0
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /root/entrypoint.sh: exec format error
@JonasVautherin
It looks like you're passing an IPv6 address rather than an IPv4, so it fails to parse that.
Yeah something is different in this VM (looks like a parallels VM), and the script fails to detect the host IP properly:
ERROR [mavlink] invalid partner ip '::ffff:198.18.1.14'
Also I guess it's an M1? Support for arm was added after 1.13.0, IIRC :sweat_smile:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested exec /root/entrypoint.sh: exec format error
yes, it's m1 MacBook Pro, I running arm-based Ubuntu
Could you run:
docker run --rm -it --entrypoint /bin/bash jonasvautherin/px4-gazebo-headless:1.13.1
And there in the terminal run:
ip a
ip route
And show the output here?
now the ip is ok :
parallels@ubuntu-linux-20-04-desktop:~/Desktop$ docker run --rm -it jonasvautherin/px4-gazebo-headless:1.13.1
[ 0%] Built target ver_gen
[ 0%] Generating ../../logs
[ 0%] Built target git_gazebo
[ 0%] Built target parameters_xml
[ 0%] Built target logs_symlink
[ 0%] Built target events_header
[ 0%] Built target flighttasks_generated
[ 0%] Built target uorb_headers
[ 0%] Built target actuators_json
[ 0%] Built target drivers_board
[ 0%] Built target mixer_gen_6dof
[ 0%] Built target mixer_gen
[ 0%] Built target output_functions_header
[ 0%] Built target version
[ 0%] Built target wind_estimator
[ 0%] Built target world_magnetic_model
[ 0%] Built target git_gps_devices
[ 0%] Built target git_mavlink_v2
[ 0%] Performing build step for 'sitl_gazebo'
make[5]: warning: -jN forced in submake: disabling jobserver mode.
[ 0%] Built target events_json
[ 0%] Built target tinybson
[ 0%] Built target perf
[ 2%] Built target work_queue
[ 2%] Built target geo
[ 3%] Built target std_msgs
[ 19%] Built target sensor_msgs
[ 2%] Built target MixerBase
[ 2%] Built target mavlink_c_generate
[ 2%] Built target component_general_json
[ 23%] Built target physics_msgs
[ 27%] Built target mav_msgs
[ 22%] Built target uorb_msgs
[ 22%] Built target HelicopterMixer
[ 29%] Built target klt_feature_tracker
[ 31%] Built target nav_msgs
[ 23%] Built target MultirotorMixer
[ 24%] Built target parameters
[ 46%] Built target models_gen
[ 24%] Built target NullMixer
[ 24%] Built target SimpleMixer
[ 25%] Built target romfs_gen_files_target
[ 25%] Built target px4_work_queue
[ 48%] Built target gazebo_uuv_plugin
[ 26%] Built target mixer
[ 50%] Built target gazebo_lidar_plugin
[ 27%] Built target px4_platform
[ 27%] Built target lockstep_scheduler
[ 53%] Built target gazebo_user_camera_plugin
[ 55%] Built target gazebo_groundtruth_plugin
[ 28%] Built target px4_daemon
[ 29%] Built target px4_layer
[ 57%] Built target gazebo_sonar_plugin
[ 59%] Built target gazebo_camera_manager_plugin
[ 30%] Built target bezier
[ 30%] Built target hysteresis
[ 30%] Built target airspeed
[ 62%] Built target OpticalFlow
[ 63%] Built target gazebo_opticalflow_mockup_plugin
[ 31%] Built target cdev
[ 31%] Built target battery
[ 31%] Built target systemlib
[ 65%] Built target gazebo_airspeed_plugin
[ 31%] Built target circuit_breaker
[ 31%] Built target CollisionPrevention
[ 32%] Built target controllib
[ 67%] Built target gazebo_airship_dynamics_plugin
[ 32%] Built target conversion
[ 32%] Built target l1
[ 32%] Built target landing_slope
[ 69%] Built target gazebo_controller_interface
[ 34%] Built target mathlib
[ 34%] Built target mixer_module
[ 35%] Built target motion_planning
[ 71%] Built target gazebo_vision_plugin
[ 35%] Built target npfg
[ 35%] Built target pid
[ 36%] Built target rc
[ 73%] Built target gazebo_gimbal_controller_plugin
[ 36%] Built target SlewRate
[ 37%] Built target sensor_calibration
[ 75%] Built target gazebo_imu_plugin
[ 37%] Built target SystemIdentification
[ 38%] Built target tecs
[ 38%] Built target tunes
[ 39%] Built target WeatherVane
[ 76%] Built target gazebo_wind_plugin
[ 39%] Built target arch_tone_alarm
[ 39%] Built target failure_detector
[ 39%] Built target ArmAuthorization
[ 79%] Built target gazebo_mavlink_interface
[ 40%] Built target HealthFlags
[ 40%] Built target ControlAllocation
[ 80%] Built target gazebo_motor_model
[ 41%] Built target ActuatorEffectiveness
[ 41%] Built target EKF2Utility
[ 42%] Built target FlightTask
[ 81%] Built target gazebo_catapult_plugin
[ 42%] Built target launchdetection
[ 42%] Built target runway_takeoff
[ 83%] Built target gazebo_multirotor_base_plugin
[ 43%] Built target AttitudeControl
[ 44%] Built target zero_order_hover_thrust_ekf
[ 44%] Built target PositionControl
[ 44%] Built target Takeoff
[ 85%] Built target gazebo_magnetometer_plugin
[ 45%] Built target RateControl
[ 86%] Built target gazebo_usv_dynamics_plugin
[ 46%] Built target geofence_breach_avoidance
[ 47%] Built target data_validator
[ 48%] Built target vehicle_acceleration
[ 87%] Built target gazebo_barometer_plugin
[ 48%] Built target vehicle_angular_velocity
[ 48%] Built target vehicle_air_data
[ 48%] Built target vehicle_gps_position
[ 88%] Built target gazebo_parachute_plugin
[ 50%] Built target vehicle_imu
[ 50%] Built target vehicle_magnetometer
[ 51%] Built target avoidance
[ 89%] Built target gazebo_drop_plugin
[ 90%] Built target ForceVisual
[ 52%] Built target drivers_accelerometer
[ 52%] Built target uORB
[ 52%] Built target drivers_gyroscope
[ 52%] Built target lib__rc__rc_tests
[ 53%] Built target drivers_magnetometer
[ 91%] Built target gazebo_gst_camera_plugin
[ 92%] Built target gazebo_irlock_plugin
[ 53%] Built target modules__uORB__uORB_tests
[ 54%] Built target lib__work_queue__test__wqueue_test
[ 54%] Built target drivers__camera_trigger
[ 55%] Built target drivers__gps
[ 55%] Built target examples__rpm_simulator
[ 55%] Built target drivers__pwm_out_sim
[ 93%] Built target gazebo_gps_plugin
[ 56%] Built target drivers__tone_alarm
[ 96%] Built target gazebo_video_stream_widget
[ 56%] Built target modules__airship_att_control
[ 56%] Built target modules__airspeed_selector
[ 56%] Built target modules__attitude_estimator_q
[ 98%] Built target LiftDragPlugin
[100%] Built target gazebo_opticalflow_plugin
[ 57%] Built target modules__camera_feedback
[ 59%] Built target PreFlightCheck
[ 60%] Built target modules__commander__commander_tests
[ 60%] No install step for 'sitl_gazebo'
[ 60%] Built target modules__control_allocator
[ 60%] Built target modules__dataman
[ 63%] Built target modules__ekf2
[ 64%] Completed 'sitl_gazebo'
[ 65%] Built target modules__events
[ 65%] Built target FlightTaskUtility
[ 65%] Built target FlightTaskDescend
[ 67%] Built target FlightTaskFailsafe
[ 67%] Built target sitl_gazebo
[ 67%] Built target modules__fw_att_control
[ 67%] Built target fw_autotune_attitude_control
[ 68%] Built target modules__fw_pos_control_l1
[ 68%] Built target modules__gyro_calibration
[ 69%] Built target drivers__gimbal
[ 70%] Built target modules__gyro_fft
[ 71%] Built target modules__land_detector
[ 72%] Built target modules__load_mon
[ 72%] Built target modules__landing_target_estimator
[ 73%] Built target modules__local_position_estimator
[ 74%] Built target module__manual_control
[ 75%] Built target modules__logger
[ 75%] Built target modules__mag_bias_estimator
[ 76%] Built target mc_autotune_attitude_control
[ 76%] Built target modules__mc_att_control
[ 76%] Built target modules__mavlink__mavlink_tests
[ 76%] Built target modules__mc_hover_thrust_estimator
[ 76%] Built target modules__mc_pos_control
[ 76%] Built target modules__mc_rate_control
[ 78%] Built target modules__mavlink
[ 78%] Built target modules__rc_update
[ 79%] Built target modules__replay
[ 81%] Built target modules__navigator
[ 81%] Built target modules__rover_pos_control
[ 81%] Built target modules__sensors
[ 82%] Built target modules__simulator__battery_simulator
[ 82%] Built target modules__simulator
[ 82%] Built target modules__simulator__sensor_baro_sim
[ 82%] Built target modules__simulator__sensor_gps_sim
[ 82%] Built target modules__simulator__sensor_mag_sim
[ 84%] Built target modules__uuv_att_control
[ 85%] Built target modules__temperature_compensation
[ 85%] Built target modules__uuv_pos_control
[ 85%] Built target modules__vtol_att_control
[ 86%] Built target systemcmds__dyn
[ 86%] Built target systemcmds__actuator_test
[ 86%] Built target systemcmds__failure
[ 86%] Built target systemcmds__led_control
[ 87%] Built target systemcmds__mixer
[ 87%] Built target systemcmds__motor_test
[ 87%] Built target systemcmds__param
[ 87%] Built target systemcmds__perf
[ 87%] Built target systemcmds__pwm
[ 87%] Built target systemcmds__sd_bench
[ 88%] Built target systemcmds__shutdown
[ 88%] Built target systemcmds__system_time
[ 89%] Built target systemcmds__tests__hrt_test
[ 89%] Built target systemcmds__topic_listener
[ 92%] Built target systemcmds__tests
[ 92%] Built target systemcmds__tune_control
[ 93%] Built target systemcmds__uorb
[ 93%] Built target systemcmds__ver
[ 93%] Built target systemcmds__work_queue
[ 93%] Built target modules__fake_imu
[ 93%] Built target modules__fake_gps
[ 93%] Built target examples__fake_magnetometer
[ 93%] Built target examples__fixedwing_control
[ 94%] Built target examples__hello
[ 94%] Built target examples__px4_mavlink_debug
[ 94%] Built target examples__px4_simple_app
[ 94%] Built target examples__rover_steering_control
[ 95%] Built target examples__uuv_example_app
[ 95%] Built target examples__work_item
[ 95%] Built target lib__cdev__test__cdev_test
[ 95%] Built target lib__controllib__controllib_test
[ 95%] Built target ArmStateMachine
[ 95%] Built target FlightTaskAuto
[ 95%] Built target FlightTaskManualAltitude
[ 95%] Built target FlightTaskTransition
[ 95%] Built target FlightTaskAutoFollowMe
[ 96%] Built target FlightTaskManualPosition
[ 96%] Built target FlightTaskManualAltitudeSmoothVel
[ 96%] Built target modules__commander
[ 97%] Built target FlightTaskManualAcceleration
[ 97%] Built target FlightTaskOrbit
[ 97%] Built target FlightTaskManualPositionSmoothVel
[ 98%] Built target modules__flight_mode_manager
[100%] Built target px4
Scanning dependencies of target gazebo_iris__empty
SITL ARGS
sitl_bin: /root/Firmware/build/px4_sitl_default/bin/px4
debugger: none
program: gazebo
model: iris
world: empty
src_path: /root/Firmware
build_path: /root/Firmware/build/px4_sitl_default
GAZEBO_PLUGIN_PATH :/root/Firmware/build/px4_sitl_default/build_gazebo
GAZEBO_MODEL_PATH :/root/Firmware/Tools/sitl_gazebo/models
LD_LIBRARY_PATH :/root/Firmware/build/px4_sitl_default/build_gazebo
Using: /root/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
not running gazebo gui
SITL COMMAND: "/root/Firmware/build/px4_sitl_default/bin/px4" "/root/Firmware/build/px4_sitl_default"/etc -s etc/init.d-posix/rcS -t "/root/Firmware"/test_data
Creating symlink /root/Firmware/build/px4_sitl_default/etc -> /root/Firmware/build/px4_sitl_default/tmp/rootfs/etc
______ __ __ ___
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ \___ |
\_| \/ \/ |_/
px4 starting.
INFO [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
INFO [init] found model autostart file as SYS_AUTOSTART=10016
INFO [param] selected parameter default file eeprom/parameters_10016
[param] parameter file not found, creating eeprom/parameters_10016
SYS_AUTOCONFIG: curr: 0 -> new: 1
SYS_AUTOSTART: curr: 0 -> new: 10016
CAL_ACC0_ID: curr: 0 -> new: 1310988
CAL_GYRO0_ID: curr: 0 -> new: 1310988
CAL_ACC1_ID: curr: 0 -> new: 1310996
CAL_GYRO1_ID: curr: 0 -> new: 1310996
CAL_ACC2_ID: curr: 0 -> new: 1311004
CAL_GYRO2_ID: curr: 0 -> new: 1311004
* CAL_MAG0_ID: curr: 0 -> new: 197388
* CAL_MAG1_ID: curr: 0 -> new: 197644
* SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000
* SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010
* SYS_AUTOCONFIG: curr: 1 -> new: 0
* IMU_INTEG_RATE: curr: 200 -> new: 250
INFO [dataman] data manager file './dataman' size is 7866640 bytes
PX4 SIM HOST: localhost
INFO [simulator] Waiting for simulator to accept connection on TCP port 4560
INFO [simulator] Simulator connected on TCP port 4560.
INFO [commander] LED: open /dev/led0 failed (22)
* PWM_AUX_OUT: curr: 0 -> new: 1234
* PWM_MAIN_OUT: curr: 0 -> new: 1234
INFO [init] Mixer: etc/mixers/quad_w.main.mix on /dev/pwm_output0
INFO [init] setting PWM_AUX_OUT none
INFO [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
INFO [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030
INFO [mavlink] mode: Gimbal, data rate: 400000 B/s on udp port 13030 remote port 13280
INFO [logger] logger started (mode=all)
INFO [logger] Start file log (type: full)
INFO [logger] [logger] ./log/2022-10-24/09_37_59.ulg
INFO [logger] Opened full log file: ./log/2022-10-24/09_37_59.ulg
INFO [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO [px4] Startup script returned successfully
pxh> INFO [tone_alarm] home set
INFO [tone_alarm] notify negative
pxh>
pxh>
pxh> commander takeoff
pxh> INFO [commander] Armed by internal command
INFO [tone_alarm] arming warning
INFO [navigator] Using minimum takeoff altitude: 2.50 m
INFO [commander] Takeoff detected
WARN [commander] Failsafe enabled: no RC and no datalink
INFO [commander] Failsafe mode activated
INFO [navigator] RTL HOME activated
INFO [navigator] RTL: landing at home position.
INFO [navigator] RTL: climb to 489 m (1 m above destination)
INFO [tone_alarm] battery warning (fast)
INFO [commander] Failsafe mode deactivated
INFO [navigator] RTL: return at 489 m (1 m above destination)
INFO [navigator] RTL: land at destination
INFO [commander] Landing detected
INFO [commander] Disarmed by landing
INFO [tone_alarm] notify neutral
INFO [logger] closed logfile, bytes written: 3787377
but don't have gazebo ? @JonasVautherin
parallels@ubuntu-linux-20-04-desktop:~/Desktop$ docker run --rm -it --entrypoint /bin/bash jonasvautherin/px4-gazebo-headless:1.13.1
root@3028512c5c40:/#
but don't have gazebo ?
Well it's headless, you will only see the PX4 shell :sweat_smile:
How can I use Docker like the official manual? The official image can run the sitl simulation directly, and the gazebo graphical interface can appear. like https://docs.px4.io/main/en/test_and_ci/docker.html.
It would be great if your Docker has this feature. I think you have the ability to build one. @JonasVautherin
but don't have gazebo ?
Well it's headless, you will only see the PX4 shell 😅
got it
now the ip is ok :
What did you change to make it work?
now the ip is ok :
What did you change to make it work?
I don't know, maybe a new network.
Ok, well happy to see that it works. I guess we can close it now :blush: