View Single Post
  #9   Spotlight this post!  
Unread 17-08-2014, 19:18
Mr. N's Avatar
Mr. N Mr. N is offline
Mentor
FRC #0907 (Cybernauts)
Team Role: Mentor
 
Join Date: Dec 2013
Rookie Year: 2011
Location: Toronto, Ontario
Posts: 13
Mr. N is a splendid one to beholdMr. N is a splendid one to beholdMr. N is a splendid one to beholdMr. N is a splendid one to beholdMr. N is a splendid one to beholdMr. N is a splendid one to behold
Re: paper: Driving a Robot — Fastest Path from A to B

Quote:
Originally Posted by Jared View Post
Do you think you could help me figure out a good way to do this?
I realize this query wasn't directed at me, but perhaps I can contribute in a small way. Also, since I'm approaching this somewhat cold, apologies for any naïve suggestions.

Problem Statement (as I understand it):

You have defined a path for the center of the robot to follow, using a parametric curve that satisfies certain end constraints (position, heading). The path may have an arbitrary number of curved segments. You wish to find control inputs (i.e., left and right motor speeds) that will cause the robot to execute that path in minimum time, while adhering to speed, acceleration and jerk constraints imposed on the motors.

Is this correct?

Partition the Path

You can partition the path into segments between inflection points (i.e., when the curve transitions from positive to negative curvature).

In the absence of acceleration and jerk limits, you would assign Vmax to either the left or right motor, correct? That is: if curvature > 0 --> Set Vright = Vmax; if curvature < 0 --> Set Vleft = Vmax; if curvature = 0, Set both to Vmax.

The opposite motor will be set at whatever speed is necessary to achieve the desired curvature.

So, for each path segment, you know which motor should ideally be running at max speed.

Define a "Transition Zone" Based on Acceleration/Jerk Limits

In reality, at each inflection point, the motors cannot transition between speed settings instantaneously because of acceleration/jerk limits.

In the worst case, a motor would be commanded to go from +Vmax to -Vmax. Given the acceleration/jerk limits, it is possible to calculate the minimum arc length over which this transition can happen.

Use this arc length to define transition zones on either side of each inflection point.

Interpolate between Segments

For each motor, create a piece-wise continuous speed curve based on segments and transition zones:

There are two cases to consider:

1. Transition Zones do not overlap: In this case, for each motor join the "before" and "after" speeds with a transition curve (a piece-wise quadratic) that joins the two segments.

2. Transition Zones overlap (i.e., segment arc length is shorter than transition arc length). In such a case, the max speed you originally set for that segment is impossible to achieve. (Well, since this is based on the worst case, this isn't strictly true in all cases --- but close enough). In this case, either scale the max speed down for this segment or alter the path to give it a gentler curve.

Note: This algorithm will give a sub-optimal result in terms of time, but it should be close enough.

Does this help at all?
Reply With Quote