-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rover hold/loiter #13767
Rover hold/loiter #13767
Conversation
@ItsTimmy would be great if you could review this one, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks like a good solution to the problem. I just think there might be a few artifacts leftover from a merge or something.
@ealdaz-seesai it would be great if you could follow up on the things @ItsTimmy mentioned and make sure the CI tests pass. |
Will do Julian, currently travelling with very bad coverage. Back Monday.
Thanks for pushing this along.
Eduardo
…---
Eduardo Aldaz Carroll
CTO
sees.ai
E: ealdaz@sees.ai
M: +44 (0) 7543 519191
Skype: e.aldaz-carroll
On 20 Feb 2020, at 15:13, Julian Oes ***@***.***> wrote:
@ealdaz-seesai <https://github.com/ealdaz-seesai> it would be great if you could follow up on the things @ItsTimmy <https://github.com/ItsTimmy> mentioned and make sure the CI tests pass.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#13767>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIQJYAQV3SY2SFFPRYCODM3RD2F2BANCNFSM4J56HLFQ>.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested it in Gazebo, works as intended
@ealdaz-seesai Could you resolve the conflicts of this PR? |
Of course, hadn't realized there were conflicts, might be due to some new changes to the file. Let me check. |
All tests passing except some MacOS, complaining about implicit conversion from float to double in calls to function get_distance_to_next_waypoint using Vector2f variables |
Is there anything else required to merge this? |
bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is changing some submodules. Can you try to rebase on master, or at least merge the latest master into it, fix all conflicts, and make sure the diff is only what you changed?
Hello Julian
Could you check please? I have no idea what this test does... |
Also not sure I understand the submodule point you were making, I haven't changed any submodule. |
I have the diff applied cleanly but I can't push it to your fork. Could you make the checkmark as described here? |
I’m really sorry Julian, but I can’t find that check box anywhere on the Pull request page….
Any tips on how to find it, it’s like it’s not been enabled ... see screenshot below
![image](https://user-images.githubusercontent.com/35691522/81057604-a8814600-8ec4-11ea-8d9b-7a2aa6267da3.png)
Is it because the repository is not my personal one but part of an organisation?
Any other way to give you permission?
Eduardo
|
That's probably why. Do you want to create a new PR with the clean diff or should I do it? |
I’ll give it a go
Eduardo
…---
Eduardo Aldaz Carroll
CTO
sees.ai
E: ealdaz@sees.ai
M: +44 (0) 7543 519191
Skype: e.aldaz-carroll
On 6 May 2020, at 08:26, Julian Oes ***@***.***> wrote:
Is it because the repository is not my personal one but part of an organisation?
That's probably why. Do you want to create a new PR with the clean diff or should I do it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#13767 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIQJYAQVHUB6PIRTKDDUDOTRQEGLLANCNFSM4J56HLFQ>.
|
OK, I've figured out what the issue was. Those submodules were added to my git branch 3 weeks ago and I didn't realize. I've removed them now. I'm hoping it should all be OK now. |
Great, thanks @ealdaz-seesai. @Jaeyoung-Lim could you please give this a review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution and sorry for the late review.
Small comment regarding indentation changes
Would it be possible to squash the commits? Most of the commits seems to be merge commits or minor changes.
vehicle_attitude_s _vehicle_att{}; | ||
sensor_combined_s _sensor_combined{}; | ||
actuator_controls_s _act_controls{}; /**< direct control of actuators */ | ||
vehicle_attitude_s _vehicle_att{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the indentation errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem for late review, everyone is very busy.
I'm just happy to be able to contribute.
Ha, pushing my very average git skills with this...never tried squashing commits before, I'll google and give it a try...
Hadn't noticed the indent changes, I had run the fix_code_style.sh and thought that took care of that sort of thing. But just realized that CLion was using tabs as spaces, will sort it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -113,15 +114,15 @@ class RoverPositionControl : public ModuleBase<RoverPositionControl>, public Mod | |||
|
|||
uORB::Subscription _parameter_update_sub{ORB_ID(parameter_update)}; | |||
|
|||
manual_control_setpoint_s _manual{}; /**< r/c channel data */ | |||
manual_control_setpoint_s _manual{}; /**< r/c channel data */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary indentation changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
White spaces are still not addressed
sensor_combined_s _sensor_combined{}; | ||
actuator_controls_s _act_controls{}; /**< direct control of actuators */ | ||
vehicle_attitude_s _vehicle_att{}; | ||
sensor_combined_s _sensor_combined{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
White spaces are still not addressed
@@ -406,7 +407,7 @@ RoverPositionControl::run() | |||
bool manual_mode = _control_mode.flag_control_manual_enabled; | |||
|
|||
/* only run controller if position changed */ | |||
if (fds[0].revents & POLLIN) { | |||
if (fds[0].revents & POLLIN || fds[4].revents & POLLIN) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use just local_position (fds[4]
) and remove fds[0]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is local position also available if only using GPS?
Hi @Jaeyoung-Lim , Ok so I've really tried (for 3 hours) I've rebased and squashed, but still all the commits appear. I tried rebasing again and then all sorts of conflicts happen, I think it's got to do probably with the fact that I've merged twice already in the last months. I'm not comfortable enough with git to understand what is really going on, and I'm afraid I can't really spend anymore time with this. |
Added local position as a valid source of position
OK, so it was annoying me to leave it half done. So decided to give it one last go and rebase again and skip some commits and it has worked. I did notice a new "feature" in this latest master and it's that SITL rover complains that no power is unavailable and doesn't let you arm. I had to disable power check flag. (CBRK_SUPPLY_CHECK). Note that I couldn't reboot either from QGroundcontrol... i'm pretty sure I could before...
|
Jenkins SITL Tests fail, but not sure why... would any of you know ? |
@Jaeyoung-Lim would be great if you could follow up. |
@julianoes Jenkins failure is not related to this PR. There are a few comments that are not addressed from @ealdaz-seesai Otherwise looks good to me |
@Jaeyoung-Lim you're call if you want those addressed or merge anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@julianoes Since this has been here for a while, I think it makes sense to merge. i will address the comments myself
Thanks @ealdaz-seesai ! |
Thank you both ! A pleasure!
Eduardo
…---
Eduardo Aldaz Carroll
CTO
sees.ai
E: ealdaz@sees.ai
M: +44 (0) 7543 519191
Skype: e.aldaz-carroll
On 13 May 2020, at 12:09, Julian Oes ***@***.***> wrote:
Thanks @ealdaz-seesai <https://github.com/ealdaz-seesai> !
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#13767 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIQJYAXPC6D2OWLWDDBHAYTRRJ5VXANCNFSM4J56HLFQ>.
|
This is my first pull request, so unsure as to whether I should raise an Issue before creating a pull request, but I'm hoping that this explanation will be sufficiently clear, any feedback welcome.
Describe problem solved by this pull request
When using HOLD/LOITER the rover would not hold position but instead circle/oscillate around the hold position. This was caused by the fact that the current algorithm sets velocity to zero when distance to waypoint is under a certain threshold, the vehicle would decelerate, but not enough to stop before it once again exceeded the threshold. At this point it would then try to return to the hold position and the process would repeat.
Describe your solution
In the proposed solution once the distance to the waypoint is under a threshold the velocity is set to zero until a new position waypoint is requested that is more than the threshold distance away from the previous waypoint. This way the vehicle always stops.
Test data / coverage
This was tested with both px4_sitl and a pixhawk4 rover running the Aion RObotics R1 UGV (Tank type/Differential drive)