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 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). |
public rotate(tunedAngle: *, options: *): 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: *): Promise source
Move robot forward or backward depending on param millimeters
Params:
Name | Type | Attribute | Description |
millimeters | * | {Number} - Path that needs to be passed. If negative robot will go backward |