ros_sensor_subscriber

package
v0.0.0-...-65acc58 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Model = resource.NewModel(utils.Namespace, "ros", "sensor-subscriber")

Functions

func NewRosSensorConsumer

func NewRosSensorConsumer(ctx context.Context, deps resource.Dependencies, conf resource.Config, logger logging.Logger) (sensor.Sensor, error)

Types

type RosBridgeConfig

type RosBridgeConfig struct {
	PrimaryUri string        `json:"primary_uri"`
	Host       string        `json:"host"`
	Sensor     *SensorConfig `json:"sensor"`
}

func (*RosBridgeConfig) Validate

func (cfg *RosBridgeConfig) Validate(path string) ([]string, error)

type RosSensorSubscriber

type RosSensorSubscriber struct {
	resource.Named
	// contains filtered or unexported fields
}

func (*RosSensorSubscriber) Close

func (r *RosSensorSubscriber) Close(ctx context.Context) error

Close implements resource.Resource.

func (*RosSensorSubscriber) DoCommand

func (*RosSensorSubscriber) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)

DoCommand implements resource.Resource.

func (*RosSensorSubscriber) Readings

func (r *RosSensorSubscriber) Readings(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)

Readings implements resource.Sensor.

func (*RosSensorSubscriber) Reconfigure

func (r *RosSensorSubscriber) Reconfigure(ctx context.Context, deps resource.Dependencies, conf resource.Config) error

Reconfigure implements resource.Resource.

type SensorConfig

type SensorConfig struct {
	Topic string `json:"topic"`
	Type  string `json:"message_type"`
}

Jump to

Keyboard shortcuts

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