Mavros: PX4 SITL/mavros error "unexpected command 176" using setpoint_* topics

Created on 22 Feb 2016  ·  5Comments  ·  Source: mavlink/mavros

Hello,

I am running the PX4 SITL with Gazebo and am trying to command the attitude using the setpoint_* topics. I am able to successfully connect over UDP with mavros however when I publish to the /mavros/setpoint_raw/attitude topic, the quadcopter in the Gazebo environment immediately falls to the ground after commanding to OFFBOARD mode. The "make posix_sitl default gazebo" terminal output then prints out the warning "uORB::DeviceNode::publish called with invalid handle" and the terminal output from the mavros node prints out the warning "CMD: Unexpected command 176, result 0".

This happens when I publish to both the /mavros/setpoint_attitude/attitude and /mavros/setpoint_raw/attitude topics however I am able to command position using the /mavros/setpoint_position/local topic.

Any help would be appreciated.

question

Most helpful comment

have you solve this problem?i meet the same problem, can you give me some help? thanks

All 5 comments

Command 176 - MAV_CMD_DO_SET_MODE not a problem. PX4 resend SET_MODE message as command on internal bus.

Seems bug somewhere in mavlink module of firmware. Check SET_ATTITUDE_TARGET handler. Also ask at PX4 forums for support.

@vooon I'm trying to use gazebo + offboard mode as well.

I'm able to connect, and I publish to mavros/setpoint_attitude/attitude topic successfully, but the copter keeps on arming/disarming itself for some reason. It never takes off. Just sits on the ground.
I am using this code (this example) and it works perfectly when I publish /mavros/setpoint_position/local. But when I change the topic to be attitude, it doesn't work.

Sometimes I get this warning: CMD: Unexpected command 176, result 0. Sometimes I get this warning: CMD: Unexpected command 400, result 0. When I look at the /mavros/state, it is connected and in offboard mode, but it keeps flipping between arm/disarm.

Any advice?

have you solve this problem?i meet the same problem, can you give me some help? thanks

Hi @physics-lzs, in case you are still having this issue, you may need to publish setpoint_attitude/thrust and give it a value that's > 0.5 to see some effects. If you continue to see the same observation as earlier posts, publish attitude commands to setpoint_raw/attitude instead. Again, remember to give a value to your thrust :) Hope this helps!

Could you please provide more clarification @thealchemist89 , I am facing this issue while running the example here , sometimes it works and some other times running the ROS node keeps giving me
Somtimes, I can work the ROS node successfully again by restarting
roslaunch mavros px4.launch fcu_url:="udp://:[email protected]:14557"
and some other times it requires me to restart the whole computer

Was this page helpful?
0 / 5 - 0 ratings