PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.3k stars 13.43k forks source link

ROS2-PX4 OFFBOARD triggers Failsafe enabled: No manual control stick input #18389

Closed hashimK closed 2 years ago

hashimK commented 3 years ago

The bug No manual control stick input failsafe is triggered when OFFBOARD example (ros2 run px4_ros_com offboard_control) is executed. Although no issues were found in the ROS2-PX4 bridge when ros2 run px4_ros_com sensor_combined_listener is executed, it works as expected.

To Reproduce Steps to reproduce the behavior:

  1. Install ROS2 Foxy on Ubuntu 20.04 LTS
  2. Clone the current PX4 master branch and install the Linux toolchain
  3. Install Fast-RTPS-Gen only as installation of Fast DDS is not required because ROS2 Foxy is already installed
  4. Follow all the other steps that are required as mentioned here https://docs.px4.io/master/en/ros/ros2_comm.html
  5. Run make px4_sitl_rtps gazebo and micrortps_agent -t UDP
  6. Run ros2 run px4_ros_com offboard_control
  7. INFO [commander] Armed by external command WARN [commander] Failsafe enabled: No manual control stick input

Screenshot from 2021-10-08 17-35-42

Expected behavior The drone should takeoff and be in OFFBOARD mode (as per my understanding of the offboard_control example)

spenrich commented 2 years ago

Just noting this is also happening to me, albeit with ROS2 Galactic. The drone propellers spin up, but it does not take off. I have both Fast-RTPS-Gen and Fast DDS installed as per the documentation. ros2_offboard

spenrich commented 2 years ago

I'm unsure if this is related: Running commander takeoff in the PX4 console also does not work, with a slightly different output. Running param set NAV_RCL_ACT 0 and param set NAV_DLL_ACT 0 first ensures commander takeoff then causes the drone to take off. However, the offboard control example still does not work.

benjinne commented 2 years ago

I changed the behavior recently to fix offboard failsafes, but it defaults to requiring RC which can be achieved by enabling virtual joysticks in QGC or setting COM_RCL_EXCEPT to 4 to ignore RC failsafe. See this PR for the changes made https://github.com/PX4/PX4-Autopilot/pull/18160

spenrich commented 2 years ago

Thanks @benjinne! Running param set COM_RCL_EXCEPT 4 in the PX4 console before starting the offboard control node worked.

hashimK commented 2 years ago

Thanks @benjinne for the solution. Closing this issue. I've found another way to avoid this failsafe. It's to manually publish few setpoints to fmu/manual_control_setpoint/in and then start offboard mode.