ardupilot
ardupilot copied to clipboard
Logging : for guided mode with position targets
I noticed we are not logging target yaw and yaw rate when position_target_local_ned message is received by FCU. I added a patch for that
as suggested by @hendjoshsr71 here, added the yaw and yaw rate fields in GUIP
@shubham-shahh commit history is a bit of a mess. Let me know if you'd like some help cleaning it up. Otherwise we have some help here: https://ardupilot.org/dev/docs/git-interactive-rebase.html
LGTM.
Would be nice if you showed some test evidence of the output from the log and the mavlink message.
sure I can share logs and the snippet of the mavlink message
@shubham-shahh commit history is a bit of a mess. Let me know if you'd like some help cleaning it up. Otherwise we have some help here: https://ardupilot.org/dev/docs/git-interactive-rebase.html
sure @peterbarker your help is much appreciated, I'll look into the resource you mentioned thanks
Hi, @hendjoshsr71
I ran the test in SITL and passed different yaw and Yaw rates
message SET_POSITION_TARGET_LOCAL_NED 0 1 0 1 0 0 0 -4 0 0 0 0 0 0 2.0 1.0
message SET_POSITION_TARGET_LOCAL_NED 0 1 0 1 0 0 0 -4 0 0 0 0 0 0 3.0 1.0
message SET_POSITION_TARGET_LOCAL_NED 0 1 0 1 0 0 0 -4 0 0 0 0 0 0 3.0 0.5
message SET_POSITION_TARGET_LOCAL_NED 0 1 0 1 0 0 0 -4 0 0 0 0 0 0 3.0 0.1
for the commands mentioned above here's the log

and the corresponding mavlink message

and the log file
Hi @peterbarker, I tried cleaning up a bit, I am no git expert, if there are any more improvements to be made, do let me know
thanks
Txs for this. In general this looks good but I think we can avoid duplicate state by directly using the auto_yaw object.
Txs for this. In general this looks good but I think we can avoid duplicate state by directly using the auto_yaw object.
Thanks for the review, I'll look into it
I really like what you are doing here but I would have thought we could use the existing yaw targets without having to recreate them in Guided.
I can also see that the way this has been done makes yaw consistent with pos, vel and accel. So I don't mind this approach, it just seems a little wasteful.
I would ask Randy what he would suggest and going with that.
In any case I think this will be a very good addition to the code.
Hi thanks for the review, I agree with you, I have noted @rmackay9 's suggestion and I'll be working on that thanks again
Hi @rmackay9, I and @hendjoshsr71 tried to fetch the yaw value from auto yaw object but they don't correspond to the correct values, can you please help me with this?