rp1.rossum
Class RsWheel

java.lang.Object
  extended by rp1.rossum.RsComponent
      extended by rp1.rossum.RsBodyPart
          extended by rp1.rossum.RsBodyShape
              extended by rp1.rossum.RsWheel
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, RsEncoder
Direct Known Subclasses:
RsWheelCaster

public class RsWheel
extends RsBodyShape
implements RsEncoder

A class used to represent wheels, generally stored in the collection elements of the RsWheelSystem. TO DO: The encoder implementation here is a stop-gap until we get a full implementation. Eventually, the encoder-related fields need to be moved to RsEncoder.

See Also:
Serialized Form

Constructor Summary
RsWheel(double[] point, int nPoint, double x, double y, double radius)
           
RsWheel(double[] point, int nPoint, double x, double y, double radius, double maxAbsSteeringAngle)
           
 
Method Summary
 RsEncoder addEncoder(int nIntervals)
          Adds an encoder to the wheel.
 void copyStateData(RsBodyPart dataSource)
           
 RsEncoderStatusEvent getEncoderStatusEvent(double simTime, int requestIndex, boolean clearOnReport)
          Returns an encoder-status event giving current state data from wheel encoder.
 double getMaxAbsSteeringAngle()
           
 double getWheelRadius()
           
 boolean isWheelSteerable()
          Indicates whether a wheel is a candidate for steering or in a fixed position
 double mapAccumulatorToDisplacement(int accumulatorValue)
          maps an accumulator value to a linear displacement (accounting for the encoder resolution and wheel size).
 void paint(java.awt.Graphics g, RsTransform gt)
           
 void resetEncoder()
          Resets all state data for the encoder.
 void resetStateData()
          resetStateData is usually called when a placement is established.
 
Methods inherited from class rp1.rossum.RsBodyShape
checkForOverlap, getSegmentArray
 
Methods inherited from class rp1.rossum.RsBodyPart
getFillColor, getHot, getID, getLineColor, getName, isASensor, searchForCollisions, setFillColor, setHot, setHotFillColor, setHotLineColor, setLineColor, 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
 
Methods inherited from interface rp1.rossum.RsEncoder
getID
 

Constructor Detail

RsWheel

public RsWheel(double[] point,
               int nPoint,
               double x,
               double y,
               double radius)

RsWheel

public RsWheel(double[] point,
               int nPoint,
               double x,
               double y,
               double radius,
               double maxAbsSteeringAngle)
Method Detail

isWheelSteerable

public boolean isWheelSteerable()
Indicates whether a wheel is a candidate for steering or in a fixed position


getWheelRadius

public double getWheelRadius()

getMaxAbsSteeringAngle

public double getMaxAbsSteeringAngle()

addEncoder

public RsEncoder addEncoder(int nIntervals)
Adds an encoder to the wheel.


resetEncoder

public void resetEncoder()
Resets all state data for the encoder.


resetStateData

public void resetStateData()
Description copied from class: RsBodyPart
resetStateData is usually called when a placement is established. it is implemented as a do-nothing and overridden by derived classes according to their specific behaviors

Overrides:
resetStateData in class RsBodyPart

copyStateData

public void copyStateData(RsBodyPart dataSource)
Overrides:
copyStateData in class RsBodyPart

paint

public void paint(java.awt.Graphics g,
                  RsTransform gt)
Overrides:
paint in class RsBodyShape

getEncoderStatusEvent

public RsEncoderStatusEvent getEncoderStatusEvent(double simTime,
                                                  int requestIndex,
                                                  boolean clearOnReport)
Returns an encoder-status event giving current state data from wheel encoder. You may supply zero values for simTime and requestIndex if you're not actually using them.


mapAccumulatorToDisplacement

public double mapAccumulatorToDisplacement(int accumulatorValue)
maps an accumulator value to a linear displacement (accounting for the encoder resolution and wheel size).