Class LimbPlanner
java.lang.Object
com.marginallyclever.ro3.node.Node
com.marginallyclever.ro3.node.nodes.limbplanner.LimbPlanner
- All Implemented Interfaces:
ActionListener
,EventListener
LimbPlanner
knows about a LimbSolver
.
It moves the LimbSolver.setTarget(Pose)
to a destination.
It then waits for the ActionEvent
"arrivedAtGoal" before moving on to the next destination.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
fromJSON
(org.json.JSONObject from) Deserialize this node and its children from a JSON object and its children.void
getComponents
(List<JPanel> list) Build a Swing Component that represents this Node.double
double
boolean
void
void
setLinearVelocity
(double v) void
setPathStart
(Pose pose) Set the start of the path.void
setSolver
(LimbSolver limbSolver) Set the solver to use.void
startRun()
void
stopRun()
org.json.JSONObject
toJSON()
Serialize this node and its children to a JSON object and its children.void
update
(double dt) Called every frame.Methods inherited from class com.marginallyclever.ro3.node.Node
addAttachListener, addChild, addChild, addDetachListener, addReadyListener, addRenameListener, findByPath, findChild, findChild, findFirstChild, findFirstSibling, findNodeByID, findParent, findParent, getAbsolutePath, getChildren, getName, getParent, getRootNode, getUniqueID, hasParent, isNameUsedBySibling, removeAttachListener, removeChild, removeDetachListener, removeReadyListener, removeRenameListener, setName, witnessProtection
-
Constructor Details
-
LimbPlanner
public LimbPlanner() -
LimbPlanner
-
-
Method Details
-
getComponents
Description copied from class:Node
Build a Swing Component that represents this Node.- Overrides:
getComponents
in classNode
- Parameters:
list
- the list to add components to.
-
startRun
public void startRun() -
stopRun
public void stopRun() -
toJSON
public org.json.JSONObject toJSON()Description copied from class:Node
Serialize this node and its children to a JSON object and its children. Classes that override this method should call super.toJSON() first, then add to the object returned. -
fromJSON
public void fromJSON(org.json.JSONObject from) Description copied from class:Node
Deserialize this node and its children from a JSON object and its children. Classes that override this method should call super.fromJSON(). When they do it will trigger the creation of child nodes. The child nodes will then call their own fromJSON() methods. -
addActionListener
-
removeActionListener
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
isRunning
public boolean isRunning() -
getExecutionTime
public double getExecutionTime() -
getPreviousExecutionTime
public double getPreviousExecutionTime() -
update
public void update(double dt) Description copied from class:Node
Called every frame. -
getPathStart
-
getSolver
-
getNextGoal
-
setSolver
Set the solver to use. solver must be in the same node tree as this instance.- Parameters:
limbSolver
- the solver to use.
-
setPathStart
Set the start of the path. pose must be in the same node tree as this instance.- Parameters:
pose
- the pose to use.
-
setLinearVelocity
public void setLinearVelocity(double v)
-