DifferentialPilot arc angle confusion

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

DifferentialPilot arc angle confusion

Postby wireless_roth » Mon Apr 01, 2013 3:44 pm

Hi,

I'm confused with DifferentialPilot arc command.

pilot.arc(-50,90);

drives backwards. According to the documentation, positive angles mean "forward".
It seems, that a negative radius (curve to right) reverse angle interpretation.

pilot.arc(50,90);

drives forward and curves left as expected.

Regards

Jörg
User avatar
wireless_roth
Novice
 
Posts: 41
Joined: Sat Jun 30, 2007 1:30 pm

Re: DifferentialPilot arc angle confusion

Postby roger » Fri Apr 05, 2013 10:01 pm

Unfortunately, the comments in your version of DifferentialPilot are out of date. In all the DifferentialPilot methods, the sign of the angle parameter determines whether the direction angle of the robot increases (positive) or decreases as it moves. Imagine the robot is at the origin facing along the X axis. The sign of the radius determines whether the center of the turning circle is on the positive or negative Y axis. So if the radius is positive and the angle is negative, the robot backs up so its direction angle decreases. And if the radius is negative, and the angle is positive, the robot again backs up.
Sorry about the confusion. I think the latest version has the correct documentation.
Roger
roger
Moderator
 
Posts: 363
Joined: Fri Jun 01, 2007 4:31 am
Location: Berkeley, CA


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff