rp1.rossum
Class RsDifferentialSteering
java.lang.Object
rp1.rossum.RsComponent
rp1.rossum.RsBodyPart
rp1.rossum.RsActuator
rp1.rossum.RsWheelSystem
rp1.rossum.RsDifferentialSteering
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class RsDifferentialSteering
- extends RsWheelSystem
An actuator class representing differential steering locomotion systems.
The differential steering system is similar to that used for wheel chairs.
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 and Coordinate Systems
Differential steering treats a pair of the robot drive wheels spaced
equal distances from the center of the robot. Thus the origin is placed
at the center of the drive wheel axle. If desired, representations of
caster wheels (used in the real world to provide support for a robot
platform) may be added at arbitrary locations.
- Since:
- 0.60
- See Also:
- Serialized Form
Constructor Summary |
RsDifferentialSteering(double trackWidth,
double driveWheelRadius)
Creates and initializes an object representing an differential steering system. |
Methods inherited from class rp1.rossum.RsWheelSystem |
addDefaultCasterWheel, addWheel, applyMotion, computeMotion, copyStateData, getDriveWheelRadius, getMotionRequest, getMotionRequestForPivot, getTrackWidth, getWheelBase, getWheelForID, getWheels, paint, resetStateData, setFillColor, setLineColor |
Methods inherited from class rp1.rossum.RsBodyPart |
getFillColor, getHot, getID, getLineColor, getName, isASensor, searchForCollisions, setHot, setHotFillColor, setHotLineColor, setName |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RsDifferentialSteering
public RsDifferentialSteering(double trackWidth,
double driveWheelRadius)
- Creates and initializes an object representing an differential steering system.
- Parameters:
trackWidth
- the width of the wheel system, measured wheel center-to-centerdriveWheelRadius
- the radius of the drive wheels (used for converting rotational velocities)
addDefaultWheels
public void addDefaultWheels(double wheelRadius,
double wheelWidth)
- For depiction purposes, add a pair of wheels located on the ends of
an axle at the center of the robot body. It is recommended, but not
required, that the depicted wheel radius agree with the driveWheelRadius
supplied in the constructor. Note that at this time the wheels supplied
in this implementation are non-interactive. That will change in future
versions of this class.
- Overrides:
addDefaultWheels
in class RsWheelSystem
- Parameters:
wheelRadius
- radius of the depicted wheelswheelWidth
- width of the tire to be depicted
addEncodersToDefaultWheels
public RsEncoder[] addEncodersToDefaultWheels(int nIntervals)
- Adds encoders to the drive wheels in the differential steering
apparatus. If successful, an array of two encoders is returned,
index 0 for the left wheel, index 1 for the right.
Note that the encoders are installed so that they always
return a positive value for forward motion and a negative
value for reverse motion.
- Parameters:
nIntervals
- The number of intervals for the encoder
getMotionRequestUsingWheelVelocities
public RsMotionRequest getMotionRequestUsingWheelVelocities(double velocityLeft,
double velocityRight,
double duration)
getMotionRequestUsingWheelRotationalVelocities
public RsMotionRequest getMotionRequestUsingWheelRotationalVelocities(double rotLeft,
double rotRight,
double duration)
getControlRequestForWheelRotation
public RsActuatorControlRequest getControlRequestForWheelRotation(double leftRotationalVelocity,
double rightRotationalVelocity)