|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimbad.sim.KinematicModel
simbad.sim.DifferentialKinematic
public class DifferentialKinematic
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 |
---|
private javax.media.j3d.Transform3D t3d
private double leftWheelVelocity
private double rightWheelVelocity
private double wheelsDistance
private javax.vecmath.Point3d tempPoint
Constructor Detail |
---|
public DifferentialKinematic(double wheelsDistance)
Method Detail |
---|
protected void update(double elapsedSecond, javax.media.j3d.Transform3D rotation, javax.vecmath.Vector3d instantTranslation, javax.vecmath.Vector3d instantRotation)
update
in class KinematicModel
elapsedSecond
- time elapsedrotation
- current rotationinstantTranslation
- to store translationinstantRotation
- to store rotationprotected void reset()
reset
in class KinematicModel
protected java.lang.String toString(java.text.DecimalFormat format)
toString
in class KinematicModel
public void setLeftVelocity(double vel)
public void setRightVelocity(double vel)
public void setWheelsVelocity(double vl, double vr)
public double getLeftVelocity()
public double getRightVelocity()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |