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

robot_control node steering angle computation #3

Open
glebos opened this issue Sep 28, 2016 · 1 comment
Open

robot_control node steering angle computation #3

glebos opened this issue Sep 28, 2016 · 1 comment

Comments

@glebos
Copy link

glebos commented Sep 28, 2016

Hi,
I am trying to understand the source code of the robot_control_node.

// Compute state control actions
// State feedback error 4 position loops / 4 velocity loops
// Single steering
double d1 =0.0;
double d = RBCAR_D_WHEELS_M; // divide by 2 for dual Ackermann steering
double alfa_ref_left = 0.0;
double alfa_ref_right = 0.0;
if (alfa_ref_!=0.0) { // div/0
d1 = d / tan (alfa_ref_);
alfa_ref_left = atan2( d, d1 - 0.105);
alfa_ref_right = atan2( d, d1 + 0.105);
if (alfa_ref_<0.0) {
alfa_ref_left = alfa_ref_left - PI;
alfa_ref_right = alfa_ref_right - PI;
}

I am wondering what (d1 -/+ 0.105) do represent? Could you please explain?
Thank you very much!

@iluetkeb
Copy link

I didn't write the code, but usually with Ackermann steering, the two wheels are not actually using the same angle, but slightly offset to each other. This may be that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants