Skip to content
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: add guided velocity controler #5735

Merged
merged 6 commits into from May 4, 2017
Merged

Conversation

khancyr
Copy link
Contributor

@khancyr khancyr commented Feb 15, 2017

This PR add the support of velocity control in guided mode (msg SET_POSITION). It is based on @rmackay9 previous works.
It has been tested on SITL with ROS and in gazebo

@OXINARF
Copy link
Member

OXINARF commented Feb 15, 2017

Just mentioning that this PR includes the commits from #5734 so be careful when merging this so that we don't end up with duplicate commits in master.

@gmorph
Copy link
Contributor

gmorph commented Feb 15, 2017

Hi khancyr. Can you please remove the commits from #5734 as I have already merged that in.

Thanks, Grant.

@khancyr
Copy link
Contributor Author

khancyr commented Feb 16, 2017

@gmorph done!

@gmorph
Copy link
Contributor

gmorph commented Mar 9, 2017

We need to test this A LOT. @khancyr - have you done much SITL and real world testing with this?
Thanks, Grant.

@khancyr
Copy link
Contributor Author

khancyr commented Mar 9, 2017

@gmorph I used this with SITL and Gazebo mostly on skid steer configuration: see https://www.youtube.com/watch?v=o0zC7NgNBgE&index=8&list=PL6sCNLbHuYxYyFWLTq3E-R2cV1CrEoYOe for example. I don't have access to rover anymore so I can't test on pixhawk ...

@khancyr
Copy link
Contributor Author

khancyr commented Apr 10, 2017

rebased on master

@OXINARF OXINARF requested a review from gmorph April 11, 2017 16:24
@gmorph
Copy link
Contributor

gmorph commented Apr 25, 2017

I need to test this - sorry for the delay.

@khancyr
Copy link
Contributor Author

khancyr commented Apr 26, 2017

rebased !

@khancyr
Copy link
Contributor Author

khancyr commented Apr 28, 2017

rebased

Copy link
Contributor

@gmorph gmorph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stupid github - I only reviewed one commit - thought I could do a review per commit. Guess not. Must be per PR.
I'm still going.

if (verify_RTL()) {
SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, g.throttle_min.get());
set_mode(HOLD);
} else {
calc_lateral_acceleration();
calc_nav_steer();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes and the one below have nothing to do guided velocity controller. They are just a re-order. Good idea but I would of preferred this to be in a separate commit. In fact if this was in a separate PR a quick test and I could of merged this straight in. But as it stands it adds time and complexity to the review process.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have done that ! I extract them now

bool vel_ignore = packet.type_mask & MAVLINK_SET_POS_TYPE_MASK_VEL_IGNORE;
bool acc_ignore = packet.type_mask & MAVLINK_SET_POS_TYPE_MASK_ACC_IGNORE;

// record the time where the last message arrived
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"when" the last message arrived - not "where"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

float ne_x = packet.x*rover.ahrs.cos_yaw() - packet.y*rover.ahrs.sin_yaw();
float ne_y = packet.x*rover.ahrs.sin_yaw() + packet.y*rover.ahrs.cos_yaw();
float ne_x = packet.x * rover.ahrs.cos_yaw() - packet.y * rover.ahrs.sin_yaw();
float ne_y = packet.x * rover.ahrs.sin_yaw() + packet.y * rover.ahrs.cos_yaw();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AGAIN whitespace changes should be in a separate commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was in a function I modified ... so a PR for 2 spaces ... I know somebody that will to kill me ;-P

@khancyr khancyr force-pushed the rover_vel11 branch 3 times, most recently from dcf72eb to da10041 Compare May 3, 2017 14:17
@khancyr
Copy link
Contributor Author

khancyr commented May 3, 2017

rebased, correct the last comment : extract unrelated changes, extract style only changes

@gmorph gmorph merged commit f725e9f into ArduPilot:master May 4, 2017
@khancyr khancyr deleted the rover_vel11 branch May 4, 2017 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants