public class MotionControl
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MotionControl.Direction
Parameters for movement direction
|
static class |
MotionControl.SpeedLevel
Parameters for speed level
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAvoidanceStatus()
Return on/off status of the obstacle-avoidance.
|
int |
moveBody(float relativeX,
float relativeY,
float relativeThetaRadian)
Move body to a new location and turn head to a new angle relative to original
pose.
|
int |
moveBody(float relativeX,
float relativeY,
float relativeThetaRadian,
MotionControl.SpeedLevel.Body speedLevel)
Move body to a new location and turn head to a new angle relative to original
pose with specified speed level.
|
int |
moveBody(float relativeX,
float relativeY,
int relativeThetaDegree)
Move body to a new location and turn head to a new angle relative to original
pose.
|
int |
moveBody(float relativeX,
float relativeY,
int relativeThetaDegree,
MotionControl.SpeedLevel.Body speedLevel)
Move body to a new location and turn head to a new angle relative to original
pose with specified speed level.
|
int |
moveHead(float yawRadian,
float pitchRadian,
MotionControl.SpeedLevel.Head speedLevel)
Turn head with specified speed level.
|
int |
moveHead(int yawDegree,
int pitchDegree,
MotionControl.SpeedLevel.Head speedLevel)
Ask robot to turn its head, use SpeedLevel.Head to control moving speed.
|
int |
remoteControlBody(MotionControl.Direction.Body direction)
Control body to move until remoteControlBody(STOP) or stopMoving() command is received.
|
int |
remoteControlHead(MotionControl.Direction.Head direction)
Control head to move until remoteControlHead(STOP) or stopMoving() command is received.
|
int |
setAvoidanceStatus(boolean enable)
Turn on/off the obstacle-avoidance
|
int |
stopMoving()
Stop robot's movement in motion subclass, including neck and body.
|
public int getAvoidanceStatus()
public int moveBody(float relativeX,
float relativeY,
float relativeThetaRadian)
relativeX - relative distance (in meters) in x-axis direction,
positive value would go forward, allowed
value is -32.768 to 32.767relativeY - relative distance (in meters) in y-axis direction,
positive value would go right, allowed
value is -32.768 to 32.767relativeThetaRadian - relative rotational angle (in radian), allowed
value is -57.18 to 57.18public int moveBody(float relativeX,
float relativeY,
float relativeThetaRadian,
MotionControl.SpeedLevel.Body speedLevel)
relativeX - relative distance (in meters) in x-axis direction,
positive value would go forward, allowed
value is -32.768 to 32.767relativeY - relative distance (in meters) in y-axis direction,
positive value would go right, allowed
value is -32.768 to 32.767relativeThetaRadian - relative rotational angle (in radians),
value is -57.18 to 57.18speedLevel - speed level from L1 to L7, L1 is slowest, and L7 is fastestpublic int moveBody(float relativeX,
float relativeY,
int relativeThetaDegree)
relativeX - relative distance (in meters) in x-axis direction,
positive value would go forward, allowed
value is -32.768 to 32.767relativeY - relative distance (in meters) in y-axis direction,
positive value would go right, allowed
value is -32.768 to 32.767relativeThetaDegree - relative rotational angle (in degrees), allowed
value is -3277 to 3276public int moveBody(float relativeX,
float relativeY,
int relativeThetaDegree,
MotionControl.SpeedLevel.Body speedLevel)
relativeX - relative distance (in meters) in x-axis direction,
positive value would go forward, allowed
value is -32.768 to 32.767relativeY - relative distance (in meters) in y-axis direction,
positive value would go right, allowed
value is -32.768 to 32.767relativeThetaDegree - relative rotational angle (in degree), allowed
value is -3277 to 32776speedLevel - speed level from L1 to L7, L1 is slowest, and L7 is fastestpublic int moveHead(float yawRadian,
float pitchRadian,
MotionControl.SpeedLevel.Head speedLevel)
yawRadian - the angle in radians, the range is -0.7853(left) to 0.7853(right)
pitchRadian - the angle in radians, the range is -0.2617(down) to 0.9599(up),
speedLevel - speed level from L1 to L3, L1 is slowest, and L3 is fastestpublic int moveHead(int yawDegree,
int pitchDegree,
MotionControl.SpeedLevel.Head speedLevel)
yawDegree - the angle in degrees, the range is -45(left) to 45(right)
* pitchDegree - the angle in degrees, the range is -15(down) to 55(up)
speedLevel - speed level from 1 to 3, L1 is slowest, and L3 is fastestpublic int remoteControlBody(MotionControl.Direction.Body direction)
direction - STOP, FORWARD, BACKWARD, TURN_LEFT, TURN_RIGHTMotionControl.stopMoving()public int remoteControlHead(MotionControl.Direction.Head direction)
direction - STOP, UP, DOWN, LEFT, RIGHTMotionControl.stopMoving()public int setAvoidanceStatus(boolean enable)
enable - true to enable obstacle-avoidance or
false to disable obstacle-avoidancepublic int stopMoving()