Documentation ¶
Overview ¶
Package base defines the base that a robot uses to move around.
Package base contains a gRPC based base client ¶
Package base contains a gRPC based arm service server.
Index ¶
- Constants
- Variables
- func CollisionGeometry(cfg *referenceframe.LinkConfig) (spatialmath.Geometry, error)
- func CreateStatus(ctx context.Context, b Base) (*commonpb.ActuatorStatus, error)
- func DoMove(ctx context.Context, move Move, base Base) error
- func Named(name string) resource.Name
- func NamesFromRobot(r robot.Robot) []string
- func NewRPCServiceServer(coll resource.APIResourceCollection[Base]) interface{}
- type Base
- type KinematicBase
- type LocalBase
- type Move
Constants ¶
const SubtypeName = "base"
SubtypeName is a constant that identifies the component resource API string "base".
Variables ¶
var API = resource.APINamespaceRDK.WithComponentType(SubtypeName)
API is a variable that identifies the component resource API.
Functions ¶
func CollisionGeometry ¶ added in v0.2.35
func CollisionGeometry(cfg *referenceframe.LinkConfig) (spatialmath.Geometry, error)
CollisionGeometry returns a spherical geometry that will encompass the base if it were to rotate the geometry specified in the config 360 degrees about the Z axis of the reference frame specified in the config.
func CreateStatus ¶
CreateStatus creates a status from the base.
func NamesFromRobot ¶
NamesFromRobot is a helper for getting all base names from the given Robot.
func NewRPCServiceServer ¶ added in v0.2.36
func NewRPCServiceServer(coll resource.APIResourceCollection[Base]) interface{}
NewRPCServiceServer constructs a base gRPC service server. It is intentionally untyped to prevent use outside of tests.
Types ¶
type Base ¶
type Base interface { resource.Resource resource.Actuator // MoveStraight moves the robot straight a given distance at a given speed. // If a distance or speed of zero is given, the base will stop. // This method blocks until completed or cancelled MoveStraight(ctx context.Context, distanceMm int, mmPerSec float64, extra map[string]interface{}) error // Spin spins the robot by a given angle in degrees at a given speed. // If a speed of 0 the base will stop. // This method blocks until completed or cancelled Spin(ctx context.Context, angleDeg, degsPerSec float64, extra map[string]interface{}) error SetPower(ctx context.Context, linear, angular r3.Vector, extra map[string]interface{}) error // linear is in mmPerSec // angular is in degsPerSec SetVelocity(ctx context.Context, linear, angular r3.Vector, extra map[string]interface{}) error }
A Base represents a physical base of a robot.
func FromDependencies ¶
func FromDependencies(deps resource.Dependencies, name string) (Base, error)
FromDependencies is a helper for getting the named base from a collection of dependencies.
type KinematicBase ¶ added in v0.2.28
type KinematicBase interface { Base referenceframe.ModelFramer referenceframe.InputEnabled }
KinematicBase is an interface for Bases that also satisfy the ModelFramer and InputEnabled interfaces.
Directories ¶
Path | Synopsis |
---|---|
Package limo implements the AgileX Limo base
|
Package limo implements the AgileX Limo base |
Package boat implements a base for a boat with support for N motors in any position or angle This is an Experimental package
|
Package boat implements a base for a boat with support for N motors in any position or angle This is an Experimental package |
Package fake implements a fake base.
|
Package fake implements a fake base. |
Package register registers all relevant bases
|
Package register registers all relevant bases |
Package wheeled implements some bases, like a wheeled base.
|
Package wheeled implements some bases, like a wheeled base. |