Not able to send attitude_setpoint commands in SITL

Hello,
I am using Pixhawk for my quadrotor.
I want to fly it indoors. There is no GPS/mocap available. I have rangesensor and optical flow sensor on the robot.
Right now, I only want to send in the Roll-Pitch-Yaw-Thrust (RPYT) commands to the FCU.

I am not sure if I am missing something or there is some bug in pixhawk code, but when I just try to publish the TargetAttitude or PoseStamped data to setpoint_raw/attitude or setpoint_attitude/attitude, I do not see any response from SITL_IRIS drone. px4 firmware gives this as output:

WARN  [commander_tests] Failsafe enabled: no RC
WARN  [mc_pos_control] Auto activation failed with error: Activation Failed
WARN  [mc_pos_control] Position-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Altitude-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Stabilized-Ctrl failed with error: Activation Failed
WARN  [mc_pos_control] Auto activation failed with error: Activation Failed
WARN  [mc_pos_control] Position-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Altitude-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Stabilized-Ctrl failed with error: Activation Failed
WARN  [mc_pos_control] Auto activation failed with error: Activation Failed
WARN  [mc_pos_control] Position-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Altitude-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Stabilized-Ctrl failed with error: Activation Failed
WARN  [mc_pos_control] Auto activation failed with error: Activation Failed
WARN  [mc_pos_control] Position-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Altitude-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Stabilized-Ctrl failed with error: Activation Failed
WARN  [mc_pos_control] Auto activation failed with error: Activation Failed
WARN  [mc_pos_control] Position-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Altitude-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Stabilized-Ctrl failed with error: Activation Failed
WARN  [mc_pos_control] Auto activation failed with error: Activation Failed
WARN  [mc_pos_control] Position-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Altitude-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Stabilized-Ctrl failed with error: Activation Failed
INFO  [logger] closed logfile, bytes written: 12014258

ROS-Node publishing data to FCU for attitude as roll=0, ptich = 0, yaw =0, thrust = 0.6
I am atleast hoping to see some take off response in the vehicle. I might have write write a PID controller for altitude hold indoors. But in this case, i believe with setpoint for thrust, drone should atleast takeoff.

Thank you in advance.

2 Likes

Hi
Were you able to solve this issue? I’m having the same problem.

Thanks!

This message means the position control setpoint generation is running and trying to execute your mission but there is no data telling it what to actually do. Given the situation it tries to fall back to manual position mode execution that let you control by stick which seems to also fail.

If you are expecting to see a takeoff I suggest you send commands to do a takeoff using the dedicated commands which are e.g. also used by MAVSDK: https://mavsdk.mavlink.io/v0.21.1/en/examples/takeoff_and_land.html

If you try to use offboard without having any automatic takeoff I suggest you switch to offboard mode first. E.g. like MAVSDK does https://mavsdk.mavlink.io/v0.21.1/en/guide/offboard.html

Sorry but I don’t know how to do the same in mavros but I suspect it to be quite similar using the same MAVLink messages.