Documentation
¶
Overview ¶
Package baseremotecontrol implements a remote control for a base.
Index ¶
Constants ¶
const (
SubtypeName = resource.SubtypeName("base_remote_control")
)
Constants for the system including the max speed and angle (TBD: allow to be set as config vars) as well as the various control modes including oneJoystick (control via a joystick), triggerSpeed (triggers control speed and joystick angle), button (four buttons X, Y, A, B to control speed and angle) and arrow (arrows buttons used to control speed and angle).
Variables ¶
var Name = resource.NameFromSubtype(Subtype, "")
Name is the BaseRemoteControlService's typed resource name.
var Subtype = resource.NewSubtype( resource.ResourceNamespaceRDK, resource.ResourceTypeService, SubtypeName, )
Subtype is a constant that identifies the remote control resource subtype.
Functions ¶
func New ¶
func New(ctx context.Context, r robot.Robot, config config.Service, logger golog.Logger) (interface{}, error)
New returns a new remote control service for the given robot.
func WrapWithReconfigurable ¶
func WrapWithReconfigurable(s interface{}) (resource.Reconfigurable, error)
WrapWithReconfigurable wraps a BaseRemoteControl as a Reconfigurable.
Types ¶
type Config ¶
type Config struct { BaseName string `json:"base"` InputControllerName string `json:"input_controller"` ControlModeName string `json:"control_mode"` MaxAngularVelocity float64 `json:"max_angular"` MaxLinearVelocity float64 `json:"max_linear"` }
Config describes how to configure the service.