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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidfromJSON(org.json.JSONObject from) Deserialize this node and its children from a JSON object and its children.voidgetComponents(List<JPanel> list) Build a Swing Component that represents this Node.doublegetIcon()Set a custom icon for this node.doublebooleanvoidvoidsetLinearVelocity(double v) voidsetPathStart(Pose pose) Set the start of the path.voidsetSolver(LimbSolver limbSolver) Set the solver to use.voidstartRun()voidstopRun()org.json.JSONObjecttoJSON()Serialize this node and its children to a JSON object and its children.voidupdate(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:NodeBuild a Swing Component that represents this Node.- Overrides:
getComponentsin 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:NodeSerialize 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:NodeDeserialize 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:
actionPerformedin interfaceActionListener
-
isRunning
public boolean isRunning() -
getExecutionTime
public double getExecutionTime() -
getPreviousExecutionTime
public double getPreviousExecutionTime() -
update
-
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) -
getIcon
-