|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.robokind.api.motion.utils.PositionTargetFrameSource
public class PositionTargetFrameSource
A FrameSource which moves the Joints of a Robot towards a set of target positions with a limited velocity.
| Constructor Summary | |
|---|---|
PositionTargetFrameSource(double velocity,
Robot.RobotPositionMap targetPositions)
Creates a new MotionTargetFrameSource |
|
| Method Summary | |
|---|---|
void |
clearPositions()
Clears all target positions and disables this MotionTargetFrameSource. |
boolean |
getEnabled()
Returns true if enabled |
MotionFrame |
getMovements(long time,
long interval)
Creates a MotionFrame starting at the Robot's goal positions, and moving towards the target positions as much as the velocity will allow in the given time interval. |
Robot |
getRobot()
|
boolean |
getStopOnGoalFlag()
Returns the StopOnGoalFlag. |
double |
getVelocity()
Returns the velocity, measured as (change in NormalizedDouble)/millisecond |
void |
putPosition(Robot.JointId id,
NormalizedDouble position)
Set the target position for the given JointId and enables this MotionTargetFrameSource. |
void |
putPositions(Robot.RobotPositionMap targetPositions)
Puts the given positions in the target position map and enables this MotionTargetFrameSource. |
void |
setEnabled(boolean enabled)
If false, this MotionTargetFrameSource will return null when queried for Movements. |
void |
setRobot(Robot robot)
Sets the Robot to |
void |
setStopOnGoal(boolean val)
When StopOnGoal is set true, the MotionTargetFrameSource will disable itself after reaching the target positions. |
void |
setVelocity(double velocity)
Set the max velocity, measured as (change in NormalizedDouble)/millisecond. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PositionTargetFrameSource(double velocity,
Robot.RobotPositionMap targetPositions)
context - BundleContext used to retrieve the RobotrobotId - Id of the Robot to movevelocity - maximum allowed velocity. The velocity is measured in
terms of (change in NormalizedDouble)/millisecondtargetPositions - initial target positions to move towards.
Positions for Joints not belonging to the Robot with the given robotId
are ignored| Method Detail |
|---|
public void setRobot(Robot robot)
RobotFrameSource
setRobot in interface RobotFrameSourcepublic Robot getRobot()
getRobot in interface RobotFrameSourcepublic void setEnabled(boolean enabled)
enabled - public boolean getEnabled()
public void setVelocity(double velocity)
velocity - max velocity, measured as
(change in NormalizedDouble)/millisecondpublic double getVelocity()
public void setStopOnGoal(boolean val)
val - value for StopOnGoalpublic boolean getStopOnGoalFlag()
public void putPositions(Robot.RobotPositionMap targetPositions)
targetPositions - positions to add
public void putPosition(Robot.JointId id,
NormalizedDouble position)
id - JointId to setposition - new position to setpublic void clearPositions()
public MotionFrame getMovements(long time,
long interval)
getMovements in interface FrameSource<Robot.RobotPositionMap>time - the time of this movement, often the current timeinterval - time length of the movement in milliseconds
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||