ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Logging : for guided mode with position targets

Open shubham-shahh opened this issue 3 years ago • 13 comments
trafficstars

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

shubham-shahh avatar Aug 04 '22 05:08 shubham-shahh

as suggested by @hendjoshsr71 here, added the yaw and yaw rate fields in GUIP

shubham-shahh avatar Aug 04 '22 05:08 shubham-shahh

@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

peterbarker avatar Aug 05 '22 07:08 peterbarker

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 avatar Aug 05 '22 15:08 shubham-shahh

@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

shubham-shahh avatar Aug 05 '22 15:08 shubham-shahh

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

yaw_yaw_rate_logging

and the corresponding mavlink message pos_target_local_ned_mavlink_msg

and the log file

shubham-shahh avatar Aug 06 '22 08:08 shubham-shahh

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

shubham-shahh avatar Aug 06 '22 17:08 shubham-shahh

Txs for this. In general this looks good but I think we can avoid duplicate state by directly using the auto_yaw object.

rmackay9 avatar Aug 13 '22 00:08 rmackay9

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

shubham-shahh avatar Aug 13 '22 03:08 shubham-shahh

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

shubham-shahh avatar Aug 18 '22 04:08 shubham-shahh

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?

shubham-shahh avatar Nov 02 '22 14:11 shubham-shahh