MotionClient class Services

A client for the motion service.

Inheritance
Implemented types
Mixed-in types

Constructors

MotionClient(String name, ClientChannelBase channel)

Properties

callOptions CallOptions
no setterinherited
channel ClientChannelBase
getter/setter pairoverride
client MotionServiceClient
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

disableDebugLogging() → void
Disable debug logging for gRPC calls by removing the trace key from the metadata.
inherited
doCommand(Map<String, dynamic> command) Future<Map<String, dynamic>>
Send/Receive arbitrary commands to the Resource
override
enableDebugLogging({String? traceKey}) → void
Enable debug logging for gRPC calls by setting a trace key in the metadata. If no trace key is provided, a random one will be generated.
inherited
getPlan(String componentName, {bool? lastPlanOnly, String? executionId, Map<String, dynamic>? extra}) Future<MotionPlan>
Get the plan and status of the most recent execution for the component named componentName, along with the replan history of that execution. Pass an executionId to look up a specific execution rather than the most recent one, and set lastPlanOnly to true to omit the replan history.
getPose(String componentName, String destinationFrame, {List<Transform>? supplementalTransforms, Map<String, dynamic>? extra}) Future<PoseInFrame>
Get the current location and orientation of the component named componentName as a common_pb.PoseInFrame relative to destinationFrame. The robot's frame system can be augmented for the duration of the call with supplementalTransforms.
getStatus() Future<Map<String, dynamic>>
Get the status of the Resource
inherited
listPlanStatuses({bool? onlyActivePlans, Map<String, dynamic>? extra}) Future<List<PlanStatusWithID>>
Get the statuses of plans created by moveOnMap or moveOnGlobe calls that meet at least one of the following conditions since the motion service initialized: the plan's status is in progress, or the plan's status changed state within the last 24 hours. When onlyActivePlans is true, only plans that are currently in progress are returned.
move(PoseInFrame destination, String componentName, {WorldState? worldState, Constraints? constraints, Map<String, dynamic>? extra}) Future<bool>
Move the component named componentName to the destination, which can be a pose in the reference frame of any frame in the robot's frame system. Obstacles can be avoided by describing their geometries in worldState, and the path taken can be restricted with constraints. Returns whether the move succeeded.
moveOnGlobe(GeoPoint destination, String componentName, String movementSensorName, {double? heading, List<GeoGeometry>? obstacles, List<GeoGeometry>? boundingRegions, MotionConfiguration? motionConfiguration, Map<String, dynamic>? extra}) Future<String>
Move the base named componentName to the destination GPS point, using the movement sensor named movementSensorName to determine the robot's location. An optional compass heading in degrees [0-360) can be requested at the destination, travel can be restricted to boundingRegions, and obstacles can be avoided. Returns the execution ID of the resulting plan, which can be passed to getPlan.
moveOnMap(Pose destination, String componentName, String slamServiceName, {MotionConfiguration? motionConfiguration, List<Geometry>? obstacles, Map<String, dynamic>? extra}) Future<String>
Move the base named componentName to the destination in the SLAM map produced by the SLAM service named slamServiceName. Returns the execution ID of the resulting plan, which can be passed to getPlan.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stopPlan(String componentName, {Map<String, dynamic>? extra}) Future<void>
Stop the plan currently being executed for the component named componentName.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromRobot(RobotClient robot, String name) MotionClient
Get the MotionClient named name from the provided robot.
getResourceName(String name) ResourceName
Get the common_pb.ResourceName for this MotionClient with the given name

Constants

subtype → const Subtype