Open Mendeler opened 8 months ago
Referring to https://github.com/PX4/PX4-Autopilot/issues/22558, I increased the baud rate and was able to run the listener offboard_control_mode and listener trajectory_setpoint in the Mavlink console of QGC. Both data appeared, and the flight mode was switched to Offboard;
root@ubuntu:/userdata/ws_ros# ros2 run px4_ros_com offboard_control
Starting offboard control node...
[INFO] [1704201282.802507466] [offboard_control]: Arm command send
But there seems to be a problem here. The offboard control node is switched successfully, but the flight status is still Ready To Fly instead of changing to Flying;
By the way, I want to fly indoors without linking to GPS. EKF2_AID_MASK
has been deprecated in v1.14;Under the offboard control node, if I manually arm, a MAV_CMD(400) warning will appear; And I set the value of the parameter COM_ARM_WO_GPS
to Allow arming without GPS
, the value of the parameter EKF2_HGT_REF
to Barometer pressure
;
Is the inability to arm because the GPS is not connected? If GPS is not used, what parameters should I set in the new version?
Describe the bug
Horizon Sunrise X3 PI is used; The system is Ubuntu20.04 + ros2; The flight controller is PixHawk 5x, firmware PX4 v1.14; Use uXRCE-DDS middleware for communication; A problem occurred when I ran the ROS 2 Offboard Control Example. In the simulation, execute
I can see the drone taking off in the simulation, but on the actual aircraft, the drone does not respond, but the mode is successfully switched to offboard, and uXRCE-DDS can communicate;
To Reproduce
Expected behavior
run MicroXRCEAgent serial -D /dev/ttyUSB0 -b 57600
run ros2 run px4_ros_com offboard_control
run ros2 topic echo /fmu/in/offboard_control_mode
run ros2 topic echo /fmu/in/trajectory_setpoint
run ros2 topic list
But I cannot subscribe to the information of
/fmu/out/vehicle_attitude
and/fmu/out/vehicle_local_position
; I follow, the result of executing the commandlistener offboard_control_mode
isnever published
;In Mavlink console,i check some topic as follow: `nsh: sysinit: fopen failed: No such file or directory
NuttShell (NSH) NuttX-11.0.0 nsh> listener offboard_control_mode never published nsh> listener trajectory_setpoint never published nsh> listener vehicle_command
TOPIC: vehicle_command vehicle_command timestamp: 25522531 (45.739536 seconds ago) param5: 0.000000 param6: 0.000000 param1: 1.00000 param2: 0.00000 param3: 0.00000 param4: 0.00000 param7: 0.00000 command: 400 target_system: 1 target_component: 1 source_system: 1 source_component: 0 confirmation: 1 from_external: False
nsh> nsh> listener vehicle_attitude
TOPIC: vehicle_attitude vehicle_attitude timestamp: 548617839 (0.002848 seconds ago) timestamp_sample: 548617197 (642 us before timestamp) q: [0.56360, -0.01876, -0.01652, 0.82566] (Roll: -2.8 deg, Pitch: 0.7 deg, Yaw: 111.3 deg) delta_q_reset: [0.56851, -0.00000, -0.00000, 0.82267] quat_reset_counter: 1
nsh> listener vehicle_local_position
TOPIC: vehicle_local_position vehicle_local_position timestamp: 893554907 (0.011224 seconds ago) timestamp_sample: 893553765 (1142 us before timestamp) ref_timestamp: 0 ref_lat: nan ref_lon: nan x: -0.00003 y: 0.00004 z: 1.55658 delta_xy: [0.00000, -0.00000] delta_z: 0.00000 vx: 0.00003 vy: 0.00010 vz: 0.00044 z_deriv: 0.00053 delta_vxy: [0.00000, -0.00000] delta_vz: 0.00077 ax: -0.01433 ay: 0.00354 az: -0.00041 heading: 1.93719 delta_heading: 1.93219 ref_alt: nan dist_bottom: 0.10044 eph: 0.01528 epv: 0.28516 evh: 0.04270 evv: 0.06929 vxy_max: inf vz_max: inf hagl_min: inf hagl_max: inf xy_valid: False z_valid: True v_xy_valid: False v_z_valid: True xy_reset_counter: 1 z_reset_counter: 1 vxy_reset_counter: 1 vz_reset_counter: 1 heading_reset_counter: 1 heading_good_for_control: False`
Of the three topics sent, only vehicle_command seems to have been published.
Screenshot / Media
No response
Flight Log
https://logs.px4.io/plot_app?log=08d8bcd4-5666-4c82-b39e-1f3d3976d670
Software Version
PX4 v1.14
Flight controller
PixHawk 5x
Vehicle type
Multicopter
How are the different components wired up (including port information)
No response
Additional context
No response