I'm also having issues understanding how to use SET_ATTITUDE_TARGET. My understanding is the q value is for the attitude quaternion so whatever the value we set here is the attitude set point we want to achieve. So are the body rates specifying how fast to move to these positions?
I want to minimize the inputs to control the quadcopter so I'm trying to understand when to set only q (as the OP is doing) or both q and the rates. If my understanding above is correct, if only q is set what rates are used?
I'm in offboard mode but would like to control the quadcopter the same way as in manual mode (i.e. control by roll pitch yaw thrust). I've tried to use SET_ATTITUDE_TARGET with only the body rates but I don't get the expected performance unless I also set q.
Thanks for the help