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 |
goTo(Location targetLocation,
boolean locateAtTarget)
Move from current position to target position (x, y, theta),
based on the path-finding algorithm.
|
int |
goTo(java.lang.String destination)
Ask robot to go to the destination.
|
int |
goTo(java.lang.String destination,
boolean isActiveLocalization)
Ask robot to go to the destination.
|
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 |
stopMoving()
Stop robot's movement in motion subclass, including neck and body.
|
public int goTo(Location targetLocation, boolean locateAtTarget)
targetLocation - target location of the robotlocateAtTarget - true: robot will locate at target location
false: robot will not locate at target locationpublic int goTo(java.lang.String destination)
destination - location level which was recorded on the map's content provided by the userRobotContacts.AccessRoomData.getAllRoomInfo()public int goTo(java.lang.String destination,
boolean isActiveLocalization)
destination - location level which was recorded on the
map's content provided by the userisActiveLocalization - true enable active localizationpublic int moveBody(float relativeX,
float relativeY,
float relativeThetaRadian)
relativeX - relative distance (in meters) in x-axis direction, positive value would go forwardrelativeY - relative distance (in meters) in y-axis direction, positive value would go rightrelativeThetaRadian - relative rotational angle (in radian)public 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 forwardrelativeY - relative distance (in meters) in y-axis direction, positive value would go rightrelativeThetaRadian - relative rotational angle (in radians)speedLevel - 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 forwardrelativeY - relative distance (in meters) in y-axis direction, positive value would go rightrelativeThetaDegree - relative rotational angle (in degrees)public 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 forwardrelativeY - relative distance (in meters) in y-axis direction, positive value would go rightrelativeThetaDegree - relative rotational angle (in degree)speedLevel - 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 stopMoving()