simbad.sim
Class DifferentialKinematic

java.lang.Object
  extended by simbad.sim.KinematicModel
      extended by simbad.sim.DifferentialKinematic

public class DifferentialKinematic
extends KinematicModel

This class models the differential drive kinematic common. The two control parameters are left and right velocity.


Field Summary
private  double leftWheelVelocity
           
private  double rightWheelVelocity
           
private  javax.media.j3d.Transform3D t3d
           
private  javax.vecmath.Point3d tempPoint
           
private  double wheelsDistance
           
 
Constructor Summary
DifferentialKinematic(double wheelsDistance)
           
 
Method Summary
 double getLeftVelocity()
          Gets the velocity of the left wheel in meter/s.
 double getRightVelocity()
          Gets the velocity of the right wheel in meter/s.
protected  void reset()
          Resets all control parameters to their initial values.
 void setLeftVelocity(double vel)
          Sets the velocity of the left wheel in meter/s.
 void setRightVelocity(double vel)
          Sets the velocity of the right wheel in meter/s.
 void setWheelsVelocity(double vl, double vr)
          Sets the velocity of both wheels in meter/s.
protected  java.lang.String toString(java.text.DecimalFormat format)
          Resets all control parameters to their initial values.
protected  void update(double elapsedSecond, javax.media.j3d.Transform3D rotation, javax.vecmath.Vector3d instantTranslation, javax.vecmath.Vector3d instantRotation)
          Compute instant translation and rotation vectors .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

t3d

private javax.media.j3d.Transform3D t3d

leftWheelVelocity

private double leftWheelVelocity

rightWheelVelocity

private double rightWheelVelocity

wheelsDistance

private double wheelsDistance

tempPoint

private javax.vecmath.Point3d tempPoint
Constructor Detail

DifferentialKinematic

public DifferentialKinematic(double wheelsDistance)
Method Detail

update

protected void update(double elapsedSecond,
                      javax.media.j3d.Transform3D rotation,
                      javax.vecmath.Vector3d instantTranslation,
                      javax.vecmath.Vector3d instantRotation)
Compute instant translation and rotation vectors .

Specified by:
update in class KinematicModel
Parameters:
elapsedSecond - time elapsed
rotation - current rotation
instantTranslation - to store translation
instantRotation - to store rotation

reset

protected void reset()
Resets all control parameters to their initial values.

Specified by:
reset in class KinematicModel

toString

protected java.lang.String toString(java.text.DecimalFormat format)
Resets all control parameters to their initial values.

Specified by:
toString in class KinematicModel

setLeftVelocity

public void setLeftVelocity(double vel)
Sets the velocity of the left wheel in meter/s.


setRightVelocity

public void setRightVelocity(double vel)
Sets the velocity of the right wheel in meter/s.


setWheelsVelocity

public void setWheelsVelocity(double vl,
                              double vr)
Sets the velocity of both wheels in meter/s.


getLeftVelocity

public double getLeftVelocity()
Gets the velocity of the left wheel in meter/s.


getRightVelocity

public double getRightVelocity()
Gets the velocity of the right wheel in meter/s.