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: Takeoff and Land · MAVSDK Guide

If you try to use offboard without having any automatic takeoff I suggest you switch to offboard mode first. E.g. like MAVSDK does Offboard Control · MAVSDK Guide

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.

Hey @adipandas , @MaEtUgR , I’ve been facing a similar problem. I’m trying to control the quad in JMAVSim and make it take off and fly using my code. I learnt how to subscribe and publish to topics from the px4 tutorial here, but I can’t seem to be able to make the quad fly.
I’ve tried publishing to the following topics - vehicle_attitude_control and actuator_controls but that didn’t work.
What should I do?

Hi,

Can you please point me the link to build a px4 gazebo SITL app on a ubuntu machine or even a Raspberry pi

thank you

Hey @sibujacob
I haven’t worked with gazebo, but I think you might want to take a look at this - Ubuntu Development Environment | PX4 User Guide

The PX4 User Guide also has some other topics that you might find helpful.

1 Like

How do you operate Px4 SITL without gazebo sim.

Use a different simulator. I used JMAVSim

1 Like