Yaw setpoint using setpoint position target local ned fails


I am trying to control the yaw for the iris_opt_flow model in px4 sitl using mavros_msgs PositionTarget and publishing it onto “/mavros/setpoint_raw/local” topic.

I have the following bitmask for the type mask field for the yaw setpoint
“0b0000010111111111”. The rate that I am publishing it for is 10 hz.

All the commands are sent when offboard mode is enabled.

I have checked that the following.

  • Bimask for position setpoint (0b0000111111111000) works even at 1Hz
  • Bimask for velocity setpoint (0b0000111111000111) works even at 1Hz
  • Bimask for force setpoint (0b000011000111111) works even at 1Hz

My question is the following

  1. Is the yaw setpoiont enabled for the px4 sitl environment with gazebo9?
  2. If it it is supported then could you guys help point out any other solutions ?

Log file


So if I read this correctly with 0b0000010111111111 you ignore position, velocity, acceleration, and yaw but you don’t ignore yaw rate, right?

I don’t think it works if you don’t set any position but only yaw rate because it’s not really enough to control the drone. I think you should combine yaw with others. Have you tried that?