MotionService
Extends:
Provides a very abstract way to control and estimate robot position
Method Summary
Public Methods | ||
public |
go(tunedPoint: TunedPoint, parameters: Object): Promise Move the robot, set new position of the robot |
|
public |
rotate(tunedAngle: TunedAngle, options: Object): Promise Rotate robot for an angle |
|
public |
Stop the robot |
|
public |
Move robot forward or backward depending on param |
Private Methods | ||
private |
_goSingleTarget(point: misc.Point, params: Object): Promise Go to single point without advanced features |
Public Methods
public go(tunedPoint: TunedPoint, parameters: Object): Promise source
Move the robot, set new position of the robot
Params:
Name | Type | Attribute | Description |
tunedPoint | TunedPoint | Point that should be reached |
|
parameters | Object |
|
Configuration options. |
parameters.pf | Boolean |
|
Use terrain finding algorithm. |
parameters.backward | Boolean |
|
Set backward robot moving. |
parameters.rerouting | Boolean |
|
Enable rerouting during the movement. |
parameters.relative | Boolean |
|
Use relative to previous position. |
parameters.tolerance | Number |
|
Position will consider as reached if Euclid's distance between current and required position is less than tolerance. |
parameters.speed | Number |
|
Speed of the robot movement in range (0, 255). |
parameters.obstacle | Number |
|
Time [ms] after command will be rejected (with TaskError.action === 'obstacle') if obstacle is detected in hazard region |
parameters.friend | Number |
|
Time [ms] after command will be rejected (with TaskError.action === 'friend') if friend is detected in hazard region |
public rotate(tunedAngle: TunedAngle, options: Object): Promise source
Rotate robot for an angle
Params:
Name | Type | Attribute | Description |
tunedAngle | TunedAngle | Angle to rotate |
|
options | Object | Additional options |
public stop(softStop: Boolean): * source
Stop the robot
Params:
Name | Type | Attribute | Description |
softStop | Boolean | If true robot will turn of motors |
Return:
* |
public straight(millimeters: Number, params: Object): Promise source
Move robot forward or backward depending on param millimeters