public interface IPilot
IObjectFactory.createPilot(EMotorPort,EMotorPort,float,float)
).
The following units apply to parameters and return values of method calls:
distances and tachometer count in cm,
(changes of) robot orientation in ° (degrees),
velocities in cm/s,
accelerations in cm/s² and
time periods in ms.Modifier and Type | Method and Description |
---|---|
float |
getMaxAcceleration()
• Returns the maximum acceleration.
|
float |
getMaxSpeed()
• Returns the maximum velocity.
|
float |
getOrientation()
• Return the current orientation of the robot.
|
float |
getSpeed()
• Returns the instantaneous (that is "real") velocity of the robot's center motion.
|
float |
getTachoCount()
• Returns the current tachometer count of the robot.
|
float |
getTargetAcceleration()
• Returns the stored target acceleration.
|
float |
getTargetSpeed()
• Returns the currently stored target velocity.
|
float |
getTrackWidth()
• Returns the currently stored track width.
|
float |
getWheelbase()
Deprecated.
|
float |
getWheelDiameter()
• Returns the currently stored wheel diameter.
|
boolean |
isMoving()
• Checks if the robot is currently in motion.
|
void |
moveArc(float distance,
float rotationAngle,
EWaitingMode waitingMode)
• Starts or completes a curved motion with given distance (arc length) and rotation angle.
|
void |
moveCurvature(float curvature,
EDirection direction)
• Starts an unlimited motion with given curvature parameter and direction.
|
void |
moveRadius(float radius,
EDirection direction)
• Starts an unlimited motion with given radius and direction.
|
void |
moveRadius(float radius,
float rotationAngle,
EWaitingMode waitingMode)
• Starts or completes a curved motion with given radius and rotation angle.
|
void |
moveStraight(EDirection direction)
• Starts an unlimited straight motion with given direction.
|
void |
moveStraight(float distance,
EWaitingMode waitingMode)
• Starts or completes a straight motion with given distance.
|
void |
resetCounters()
• Resets the tachometer count and the current orientation angle of the robot.
|
void |
rotateByAngle(float angle,
EWaitingMode waitingMode)
• Starts or completes a rotation of the robot by the given rotation angle.
|
void |
rotateToOrientation(float orientation,
EWaitingMode waitingMode)
• Starts or completes a rotation of the robot to the given orientation angle.
|
void |
setTargetAcceleration(float acceleration)
• Sets the target acceleration to the given value.
|
void |
setTargetAccelerationToMax()
• Sets the target acceleration to its maximum value.
|
void |
setTargetSpeed(float speed)
• Sets the target velocity to the given value.
|
void |
setTargetSpeedToMax()
• Sets the target velocity to its maximum value.
|
void |
setTrackWidth(float trackWidth)
• Sets the track width to the given value.
|
void |
setWheelbase(float trackWidth)
Deprecated.
|
void |
setWheelDiameter(float diameter)
• Sets the wheel diameter to the given value.
|
void |
stopMotion(EWaitingMode waitingMode)
• Stops the current motion obeying the current target acceleration (here: deceleration).
|
void |
waitUntilMotionCompleted()
• Waits for the end of the current robot motion.
|
float getMaxAcceleration()
float getMaxSpeed()
float getOrientation()
float getSpeed()
float getTachoCount()
float getTargetAcceleration()
float getTargetSpeed()
float getTrackWidth()
@Deprecated float getWheelbase()
getTrackWidth()
.float getWheelDiameter()
boolean isMoving()
void moveArc(float distance, float rotationAngle, EWaitingMode waitingMode)
EWaitingMode
).distance
- distance (arc length) of the curved motion (in cm)rotationAngle
- change of orientation angle during the motion (in °)waitingMode
- determines whether program execution will be halted during robot motionvoid moveCurvature(float curvature, EDirection direction)
curvature
- determines the curvature of the robot motiondirection
- direction of motion (see EDirection
)void moveRadius(float radius, EDirection direction)
radius
- radius of the curved motion (in cm)direction
- direction of motion (see EDirection
)void moveRadius(float radius, float rotationAngle, EWaitingMode waitingMode)
EWaitingMode
).radius
- radius of the curved motion (in cm)rotationAngle
- change of orientation angle during the motion (in °)waitingMode
- determines whether program execution will be halted during robot motionvoid moveStraight(EDirection direction)
direction
- direction of motion (see EDirection
)void moveStraight(float distance, EWaitingMode waitingMode)
EWaitingMode
).distance
- the target distance (in cm)waitingMode
- determines whether program execution will be halted during robot motionvoid resetCounters()
void rotateByAngle(float angle, EWaitingMode waitingMode)
EWaitingMode
).angle
- change of orientation angle during the motion (in °)waitingMode
- determines whether program execution will be halted during robot motionvoid rotateToOrientation(float orientation, EWaitingMode waitingMode)
EWaitingMode
).orientation
- target orientation of the robot (in °)waitingMode
- determines whether program execution will be halted during robot motionvoid setTargetAcceleration(float acceleration)
acceleration
- the new target acceleration (in cm/s²)void setTargetAccelerationToMax()
void setTargetSpeed(float speed)
speed
- the new target velocity (in cm/s)void setTargetSpeedToMax()
void setTrackWidth(float trackWidth)
trackWidth
- track width to be stored (in cm)@Deprecated void setWheelbase(float trackWidth)
setTrackWidth(float)
.trackWidth
- track width to be stored (in cm)void setWheelDiameter(float diameter)
diameter
- wheel diameter to be stored (in cm)void stopMotion(EWaitingMode waitingMode)
EWaitingMode
).waitingMode
- determines whether program execution will be halted until robot really stoppedvoid waitUntilMotionCompleted()