Interface Motion

A service that coordinates motion planning across all of the components in a given robot.

interface Motion {
    doCommand: ((command) => Promise<StructType>);
    getPlan: ((componentName, lastPlanOnly?, executionId?, extra?) => Promise<motionApi.GetPlanResponse.AsObject>);
    getPose: ((componentName, destinationFrame, supplementalTransforms, extra?) => Promise<commonApi.PoseInFrame.AsObject>);
    listPlanStatuses: ((onlyActivePlans?, extra?) => Promise<motionApi.ListPlanStatusesResponse.AsObject>);
    move: ((destination, componentName, worldState?, constraints?, extra?) => Promise<boolean>);
    moveOnGlobe: ((destination, componentName, movementSensorName, heading?, obstaclesList?, motionConfiguration?, extra?) => Promise<string>);
    moveOnMap: ((destination, componentName, slamServiceName, motionConfiguration?, obstacles?, extra?) => Promise<string>);
    stopPlan: ((componentName, extra?) => Promise<null>);
}

Hierarchy (view full)

Implemented by

Properties

doCommand: ((command) => Promise<StructType>)

Send/Receive arbitrary commands to the resource.

Type declaration

getPlan: ((componentName, lastPlanOnly?, executionId?, extra?) => Promise<motionApi.GetPlanResponse.AsObject>)

By default: returns the plan history of the most recent moveOnGlobe() or moveOnMap() call to move a component. The plan history for executions before the most recent can be requested by providing an ExecutionID in the request. Returns a result if both of the following conditions are met:

  • The execution (call to moveOnGlobe() or moveOnMap()) is still executing or changed state within the last 24 hours
  • The robot has not reinitialized

Plans never change. Replans always create new plans. Replans share the ExecutionID of the previously executing plan. All repeated fields are in chronological order.

Type declaration

getPose: ((componentName, destinationFrame, supplementalTransforms, extra?) => Promise<commonApi.PoseInFrame.AsObject>)

Get the current location and orientation of a component.

Type declaration

listPlanStatuses: ((onlyActivePlans?, extra?) => Promise<motionApi.ListPlanStatusesResponse.AsObject>)

Returns the statuses of plans created by MoveOnGlobe calls that meet at least one of the following conditions since the motion service initialized:

  • The plan’s status is in progress
  • The plan’s status changed state within the last 24 hours

All repeated fields are in chronological order.

Type declaration

move: ((destination, componentName, worldState?, constraints?, extra?) => Promise<boolean>)

Move any component on the robot to a specified destination which can be from the reference frame of any other component on the robot.

Type declaration

    • (destination, componentName, worldState?, constraints?, extra?): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

moveOnGlobe: ((destination, componentName, movementSensorName, heading?, obstaclesList?, motionConfiguration?, extra?) => Promise<string>)

Move a component to a specific latitude and longitude, using a MovementSensor to check the location. moveOnGlobe() is non blocking, meaning the motion service will move the component to the destination GPS point after moveOnGlobe() returns. Each successful moveOnGlobe() call retuns a unique ExectionID which you can use to identify all plans generated durring the moveOnGlobe() call. You can monitor the progress of the moveOnGlobe() call by querying getPlan() and listPlanStatuses().

Type declaration

    • (destination, componentName, movementSensorName, heading?, obstaclesList?, motionConfiguration?, extra?): Promise<string>
    • Parameters

      Returns Promise<string>

moveOnMap: ((destination, componentName, slamServiceName, motionConfiguration?, obstacles?, extra?) => Promise<string>)

Move a component to a Pose in respect to the origin of the SLAM map, using a SLAM service to check the location. moveOnMap()is non blocking, meaning the motion service will move the component to the destination Pose aftermoveOnMap()returns. Each successfulmoveOnMap()call retuns a unique ExectionID which you can use to identify all plans generated durring themoveOnMap()call. You can monitor the progress of themoveOnMap()call by queryinggetPlan()andlistPlanStatuses()`.

@param destination - Specify a destination to, which can be any Pose with respect to the SLAM map's origin. @param componentName - Component on the robot to move to the specified destination. @param slamServiceName - Name of the SLAM service from which the SLAM map is requested

Type declaration

stopPlan: ((componentName, extra?) => Promise<null>)

Stop a component being moved by an in progress moveOnGlobe() or moveOnMap() call.

Type declaration

Generated using TypeDoc