Documentation ¶
Overview ¶
Package motion is the service that allows you to plan and execute movements.
Index ¶
Constants ¶
const SubtypeName = "motion"
SubtypeName is the name of the type of service.
Variables ¶
var API = resource.APINamespaceRDK.WithServiceType(SubtypeName)
API is a variable that identifies the motion service resource API.
Functions ¶
func Named ¶ added in v0.0.8
Named is a helper for getting the named motion service's typed resource name.
func NewRPCServiceServer ¶ added in v0.2.36
func NewRPCServiceServer(coll resource.APIResourceCollection[Service]) interface{}
NewRPCServiceServer constructs a motion gRPC service server. It is intentionally untyped to prevent use outside of tests.
Types ¶
type Localizer ¶ added in v0.3.0
type Localizer interface {
CurrentPosition(context.Context) (*referenceframe.PoseInFrame, error)
}
Localizer is an interface which both slam and movementsensor can satisfy when wrapped respectively.
func NewMovementSensorLocalizer ¶ added in v0.6.0
func NewMovementSensorLocalizer(ms movementsensor.MovementSensor, origin *geo.Point, calibration spatialmath.Pose) Localizer
NewMovementSensorLocalizer creates a Localizer from a MovementSensor. An origin point must be specified and the localizer will return Poses relative to this point. A calibration pose can also be specified, which will adjust the location after it is calculated relative to the origin.
func NewSLAMLocalizer ¶ added in v0.6.0
NewSLAMLocalizer creates a new Localizer that relies on a slam service to report Pose.
type Service ¶
type Service interface { resource.Resource Move( ctx context.Context, componentName resource.Name, destination *referenceframe.PoseInFrame, worldState *referenceframe.WorldState, constraints *servicepb.Constraints, extra map[string]interface{}, ) (bool, error) MoveOnMap( ctx context.Context, componentName resource.Name, destination spatialmath.Pose, slamName resource.Name, extra map[string]interface{}, ) (bool, error) MoveOnGlobe( ctx context.Context, componentName resource.Name, destination *geo.Point, heading float64, movementSensorName resource.Name, obstacles []*spatialmath.GeoObstacle, linearVelocity float64, angularVelocity float64, extra map[string]interface{}, ) (bool, error) MoveSingleComponent( ctx context.Context, componentName resource.Name, destination *referenceframe.PoseInFrame, worldState *referenceframe.WorldState, extra map[string]interface{}, ) (bool, error) GetPose( ctx context.Context, componentName resource.Name, destinationFrame string, supplementalTransforms []*referenceframe.LinkInFrame, extra map[string]interface{}, ) (*referenceframe.PoseInFrame, error) }
A Service controls the flow of moving components.
func FromDependencies ¶ added in v0.2.47
func FromDependencies(deps resource.Dependencies, name string) (Service, error)
FromDependencies is a helper for getting the named motion service from a collection of dependencies.
Directories ¶
Path | Synopsis |
---|---|
Package builtin implements a motion service.
|
Package builtin implements a motion service. |
Package register registers all relevant motion services and API specific functions.
|
Package register registers all relevant motion services and API specific functions. |