|
||||||||||
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(org.osgi.framework.BundleContext context,
Robot.Id robotId,
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.Id |
getRobotId()
Returns the Id used by this MotionTargetFrameSource. |
boolean |
getStopOnGoalFlag()
Returns the StopOnGoalFlag. |
double |
getVelocity()
Returns the velocity, measured as (change in NormalizedDouble)/millisecond |
void |
putPosition(Robot.JointId id,
org.robokind.api.common.position.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 |
setRobotId(Robot.Id robotId)
Sets the Id used by this MotionTargetFrameSource. |
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(org.osgi.framework.BundleContext context, Robot.Id robotId, 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 ignoredMethod Detail |
---|
public Robot.Id getRobotId()
public void setRobotId(Robot.Id robotId)
robotId
- Id to usepublic 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 addpublic void putPosition(Robot.JointId id, org.robokind.api.common.position.NormalizedDouble position)
id
- JointId to setposition
- new position to setpublic void clearPositions()
public MotionFrame getMovements(long time, long interval)
getMovements
in interface FrameSource
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 |