sdk

package module
v0.0.0-...-a41b70d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CameraHorizontalResolutionPoints = 1280
	CameraVerticalResolutionPoints   = 720
	CameraHorizontalFOVDegrees       = 96
	CameraVerticalFOVDegrees         = 54
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client enables controlling a RoboMaster robot through the plain-text SDK API (https://robomaster-dev.readthedocs.io/en/latest/).

func NewClient

func NewClient(ip net.IP) (*Client, error)

NewClient returns a new client instance associated with the given ip. If ip is nil, the Client will try to detect a robot broadcasting its ip in the network.

func NewClientUSB

func NewClientUSB() (*Client, error)

NewClientUSB creates a Client that tries to connect to the default USB connection ip.

func NewClientWifiDirect

func NewClientWifiDirect() (*Client, error)

NewClientWifiDirect creates a Client that tries to connect to the default WiFi Direct connection ip.

func (*Client) ArmorModule

func (c *Client) ArmorModule() *armor.Armor

ArmorModule returns a pointer to the associated Armor module. Used for setting/getting hit sensitivity and detecting hits.

func (*Client) BlasterModule

func (c *Client) BlasterModule() *blaster.Blaster

BlasterModule returns a pointer to the associated Video module. Used for firing beads.

func (*Client) ChassisModule

func (c *Client) ChassisModule() *chassis.Chassis

ChassisModule returns a pointer to the associated Chassis module. Used for doing chassis-related operations.

func (*Client) Close

func (c *Client) Close() error

Close exits SDk mode and closes the Client connection to the robot. Returns a nil error on success and a non-nil error on failure.

func (*Client) GimbalModule

func (c *Client) GimbalModule() *gimbal.Gimbal

GimbalModule returns a pointer to the associated Gimbal module. Used for doing gimbal-related operations.

func (*Client) Open

func (c *Client) Open() error

Open opens the Client connection to the robot and enters SDK mode. Returns a nil error on success and a non-nil error on failure.

func (*Client) RobotModule

func (c *Client) RobotModule() *robot.Robot

RobotModule returns a pointer to the associated Robot module. Used for doing generic robot-related operations.

func (*Client) SoundModule

func (c *Client) SoundModule() *sound.Sound

SoundModule returns a pointer to the associated Video module. Used for detecting applause (clapping) sounds.

func (*Client) VideoModule

func (c *Client) VideoModule() *video.Video

VideoModule returns a pointer to the associated Video module. Used for doing video-related operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL