rp1.rossum
Class RsAckermanSteering

java.lang.Object
  extended by rp1.rossum.RsComponent
      extended by rp1.rossum.RsBodyPart
          extended by rp1.rossum.RsActuator
              extended by rp1.rossum.RsWheelSystem
                  extended by rp1.rossum.RsAckermanSteering
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class RsAckermanSteering
extends RsWheelSystem

An actuator class representing the Ackerman steering locomotion systems. Ackerman steering is the systen used on virtually all automobile implementations. This class presents a very high level of such a system, ignoring the mechanical details of the steering apparatus and focussing on its general effects.

Steering Geomtry

When the constructor for this class is called, it accepts a description of the steering geometry (length of wheel base and width of wheel track) as well as a specification telling the absolute maximum steering angle of the inner wheel in a turn. These specifications are used to compute the performance limits of the steering: the minimum turn radius and the maximum steering angle for the system. When a turn is executed by an Ackerman steering system, the inner wheel is turned slightly more into the turn than the outer wheel. Thus the limits of the inner wheel define the overall limits of the steering. This class computes a value called the maximum absolute steering angle which describes the maximum positive value for a "virtual steering wheel" located in the center of the two steering wheels. This value will be slightly smaller in magnitude than the associated steering angle of the inner wheel. When you specify a steering angle for the various methods provided by this class, it will be treated as the "central steering angle", that is the steering angle for a conceptual steering wheel located in the center of the two actual wheels.

Dual Steering

In general, the longer the wheel base relative to the track width, the larger the minimum turn radius that can be performed by a simulated vehicle. The specification dualSteering for the constructor allows an application to specify a vehich that has a matched, dual set of steering systems. This feature is sometimes found on upscale, long wheel-base trucks and SUV's and on certain RC truck chassis that are suitable for use in small scale robotics. In effect, setting dual steering to true divides the length of the wheel base in half, permitting tighter turns.

Steering and Coordinate Systems

If dualSteering is not specified, the origin of the robot coordinate system is placed at the center of the rear axle. If dualSteering is specified, the origin is placed at the midpoint between the front and back sets of wheels.

Since:
0.60
See Also:
Serialized Form

Constructor Summary
RsAckermanSteering(double trackWidth, double wheelBase, double driveWheelRadius, double maxAbsInnerWheelSteeringAngle, boolean dualSteering)
          Creates and initializes an object representing an Ackerman steering system..
 
Method Summary
 void addDefaultWheels(double wheelRadius, double wheelWidth, double stubLength, double stubWidth)
          Adds default wheels of requested size with stub axle (supply values of zero for stub axle to suppress its creation and just draw a simple wheel).
 RsActuatorControlRequest getControlRequestForWheelRotationAndSteeringAngle(double driveRotationalVelocity, double steeringAngle)
           
 double getMaxAbsSteeringAngle()
          Returns the maximum absolute value of the central steering angle for the actuator based on the steering geometry and maximum inner wheel steering angle specified in the constructor.
 double getMinTurnRadius()
          Returns minimum allowable turn radius based on steering geometry and the maximum inner wheel steering angle specified in the constructor.
 RsMotionRequest getMotionRequest(double x, double y, double speed)
          TO DO: Not implemented at this time.
 RsMotionRequest getMotionRequestForPivot(double x, double y, double speed)
          The request for a pivot method always returns a null because the real-world Ackerman steering system does not support a pivot
 RsMotionRequest getMotionRequestUsingVelocityAndSteeringAngle(double velocity, double steeringAngle, double duration)
           
 RsMotionRequest getMotionRequestUsingWheelRotationalVelocityAndSteeringAngle(double rotationalVelocity, double steeringAngle, double duration)
           
 double getTurnRadiusForSteeringAngle(double steeringAngle)
           
 double mapVelocityToWheelRotationalVelocity(double velocity)
           
 double mapVelocityToWheelRPM(double velocity)
           
 double mapWheelRPMToVelocity(double rpm)
           
 void setSteeringAngle(double steeringAngle)
          Sets steering angle to be used for depiction
 
Methods inherited from class rp1.rossum.RsWheelSystem
addDefaultCasterWheel, addDefaultWheels, addWheel, applyMotion, computeMotion, copyStateData, getDriveWheelRadius, getTrackWidth, getWheelBase, getWheelForID, getWheels, paint, resetStateData, setFillColor, setLineColor
 
Methods inherited from class rp1.rossum.RsActuator
getPartsArray
 
Methods inherited from class rp1.rossum.RsBodyPart
getFillColor, getHot, getID, getLineColor, getName, isASensor, searchForCollisions, setHot, setHotFillColor, setHotLineColor, setName
 
Methods inherited from class rp1.rossum.RsComponent
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RsAckermanSteering

public RsAckermanSteering(double trackWidth,
                          double wheelBase,
                          double driveWheelRadius,
                          double maxAbsInnerWheelSteeringAngle,
                          boolean dualSteering)
Creates and initializes an object representing an Ackerman steering system..

Parameters:
trackWidth - the width of the wheel system, measured wheel center-to-center.
wheelBase - the wheel base (length of wheel system), measured from wheel center-to-center.
driveWheelRadius - the radius of the drive wheels (used for converting rotational velocities).
maxAbsInnerWheelSteeringAngle - is the absolute value of the maximum angle the inner wheel may be turned.
dualSteering - indicates that the system has steering on both the front and rear axles. TO DO: fix the bounds computation to include wheel definitions and account for the swing of the steering wheels.
Method Detail

getMinTurnRadius

public double getMinTurnRadius()
Returns minimum allowable turn radius based on steering geometry and the maximum inner wheel steering angle specified in the constructor.


getMaxAbsSteeringAngle

public double getMaxAbsSteeringAngle()
Returns the maximum absolute value of the central steering angle for the actuator based on the steering geometry and maximum inner wheel steering angle specified in the constructor.


addDefaultWheels

public void addDefaultWheels(double wheelRadius,
                             double wheelWidth,
                             double stubLength,
                             double stubWidth)
Adds default wheels of requested size with stub axle (supply values of zero for stub axle to suppress its creation and just draw a simple wheel). Note that the wheel will pivot at the center of its stub axle, so you should keep it relatively short (the stub axle is meant to depict the swing arm for the wheel, not the entire axle).

Parameters:
wheelRadius - the tire radius of all four wheels (for depiction purposes)
wheelWidth - the tire width for all four wheels
stubLength - length of a stub axle
stubWidth - width of a stub axle

setSteeringAngle

public void setSteeringAngle(double steeringAngle)
Sets steering angle to be used for depiction


getTurnRadiusForSteeringAngle

public double getTurnRadiusForSteeringAngle(double steeringAngle)

mapVelocityToWheelRotationalVelocity

public double mapVelocityToWheelRotationalVelocity(double velocity)

mapVelocityToWheelRPM

public double mapVelocityToWheelRPM(double velocity)

mapWheelRPMToVelocity

public double mapWheelRPMToVelocity(double rpm)

getMotionRequestUsingVelocityAndSteeringAngle

public RsMotionRequest getMotionRequestUsingVelocityAndSteeringAngle(double velocity,
                                                                     double steeringAngle,
                                                                     double duration)

getMotionRequestUsingWheelRotationalVelocityAndSteeringAngle

public RsMotionRequest getMotionRequestUsingWheelRotationalVelocityAndSteeringAngle(double rotationalVelocity,
                                                                                    double steeringAngle,
                                                                                    double duration)

getControlRequestForWheelRotationAndSteeringAngle

public RsActuatorControlRequest getControlRequestForWheelRotationAndSteeringAngle(double driveRotationalVelocity,
                                                                                  double steeringAngle)

getMotionRequest

public RsMotionRequest getMotionRequest(double x,
                                        double y,
                                        double speed)
TO DO: Not implemented at this time. The Ackerman steering system cannot support all the range of movements that some wheel systems can. so we need to override the method defined in RsWheelSystem.

Overrides:
getMotionRequest in class RsWheelSystem
Parameters:
x - x coordiante of goal in robot's frame of reference (meters)
y - y coordinate of goal in robot's frame of reference (meters)
speed - speed at which robot is requested to travel (meters/sec)

getMotionRequestForPivot

public RsMotionRequest getMotionRequestForPivot(double x,
                                                double y,
                                                double speed)
The request for a pivot method always returns a null because the real-world Ackerman steering system does not support a pivot

Overrides:
getMotionRequestForPivot in class RsWheelSystem
Parameters:
x - x coordiante of goal in robot's frame of reference (meters)
y - y coordinate of goal in robot's frame of reference (meters)
speed - rotational speed at which robot is requested to pivot (radians/sec)