|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimbad.sim.BaseObject
simbad.sim.SimpleAgent
simbad.sim.Agent
public class Agent
This is the base class for all robot and is considered to be a heavy agent.
When deriving a new robot's class from this class, one should override the following methods:
Field Summary | |
---|---|
(package private) AgentInspector |
agentInspector
Link back to agent inspector - can be null |
private java.text.DecimalFormat |
format
|
protected FrameMeter |
frameMeter
Used for frame rate measure |
protected KinematicModel |
kinematicModel
Kinematic model used by the agent |
protected javax.vecmath.Vector3d |
motorsAngularAcceleration
Current angular acceleration applied by motors.. |
protected javax.vecmath.Vector3d |
motorsLinearAcceleration
Current linear acceleration applied by motors. |
private javax.swing.JPanel |
panel
panel dedicated to behavior output - can be null. |
(package private) javax.swing.JInternalFrame |
window
window dedicated to behavior output - can be null. |
Fields inherited from class simbad.sim.SimpleAgent |
---|
angularAcceleration, angularVelocity, body, collisionDetected, collisionDistance, collisionRadius, dynamicFrictionCoefficient, height, instantRotation, instantTranslation, interactionDetected, linearAcceleration, linearVelocity, mass, name, odometer, positionChanged, radius, staticFrictionCoefficient, t3d1, t3d2, t3d3, v1, veryNearAgent |
Fields inherited from class simbad.sim.BaseObject |
---|
black, branchGroup, canBeTraversed, compilable, detachedFromSceneGraph, group, localBounds, material, rotation, rotationGroup, translation, translationGroup, white, world |
Constructor Summary | |
---|---|
Agent(javax.vecmath.Vector3d pos,
java.lang.String name)
Constructs an Agent. |
Method Summary | |
---|---|
java.lang.String |
asString()
Returns printable description of the agent. |
protected void |
create3D()
Create 3D geometry. |
(package private) javax.swing.JInternalFrame |
createUIWindow()
Creates the UI that may be associated to the agent. |
protected void |
dispose()
Dispose all resources |
AgentInspector |
getAgentInspector()
|
protected KinematicModel |
getKinematicModel()
|
double |
getOdometer()
Returns the agent's odometer in meters. |
double |
getRotationalVelocity()
Gets rotational velocity in radians per second |
double |
getTranslationalVelocity()
Gets translational velocity in meter per second. |
javax.swing.JPanel |
getUIPanel()
Returns the UI panel previously set with setUIPanel |
protected void |
initBehavior()
called by simulator. |
protected void |
initPreBehavior()
called by simulator. |
protected void |
performBehavior()
called by simulator. |
protected void |
performPreBehavior()
called by simulator. |
protected void |
reset()
Resets agent variables |
protected void |
resetPosition()
Resets agent variables and position and kinematic |
void |
setAgentInspector(AgentInspector ai)
|
protected void |
setFrameMeterRate(int rate)
|
protected void |
setKinematicModel(KinematicModel kinematicModel)
Sets the kinematic model for this agent |
protected void |
setMotorsAcceleration(double dt)
set acceleration applied by motors . |
void |
setRotationalVelocity(double rv)
Sets rotational velocity in radians per second. |
void |
setTranslationalVelocity(double tv)
Sets translational velocity in meter per second. |
void |
setUIPanel(javax.swing.JPanel panel)
Add a UI panel to the agent. |
Methods inherited from class simbad.sim.BaseObject |
---|
addChild, addChild, attach, compile, create3D, detach, getBounds, getCanBeTraversed, getGroup, getNode, getRotationTransform, getRotationTransformGroup, getTranslation, getTranslationTransform, getTranslationTransform, resetTransforms, rotateY, setBounds, setCanBeTraversed, setColor, setWorld, translateTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private javax.swing.JPanel panel
javax.swing.JInternalFrame window
AgentInspector agentInspector
protected KinematicModel kinematicModel
protected javax.vecmath.Vector3d motorsLinearAcceleration
protected javax.vecmath.Vector3d motorsAngularAcceleration
private java.text.DecimalFormat format
protected FrameMeter frameMeter
Constructor Detail |
---|
public Agent(javax.vecmath.Vector3d pos, java.lang.String name)
pos
- start position in 3D world.name
- name of the agent.Method Detail |
---|
protected void reset()
reset
in class SimpleAgent
protected void resetPosition()
resetPosition
in class SimpleAgent
protected void create3D()
create3D
in class SimpleAgent
protected void setMotorsAcceleration(double dt)
setMotorsAcceleration
in class SimpleAgent
protected void initPreBehavior()
initPreBehavior
in class SimpleAgent
protected void initBehavior()
initBehavior
in class SimpleAgent
protected void performPreBehavior()
performPreBehavior
in class SimpleAgent
protected void performBehavior()
performBehavior
in class SimpleAgent
public double getOdometer()
public final void setRotationalVelocity(double rv)
public final void setTranslationalVelocity(double tv)
public final double getRotationalVelocity()
public final double getTranslationalVelocity()
protected void setKinematicModel(KinematicModel kinematicModel)
protected KinematicModel getKinematicModel()
protected void setFrameMeterRate(int rate)
public void setUIPanel(javax.swing.JPanel panel)
panel
- public javax.swing.JPanel getUIPanel()
setUIPanel
javax.swing.JInternalFrame createUIWindow()
public AgentInspector getAgentInspector()
public void setAgentInspector(AgentInspector ai)
protected void dispose()
dispose
in class SimpleAgent
public java.lang.String asString()
asString
in class SimpleAgent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |