rclgo

package
v0.0.0-...-d004830 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Overview

Deliberate trial and error have been conducted in finding the best way of interfacing with rcl or rclc.

rclc was initially considered, but: Executor subscription callback doesn't include the subscription, only the ros2 message. Thus we cannot intelligently and dynamically dispatch the ros2 message to the correct subscription callback on the golang layer. rcl wait_set has much more granular way of defining how the received messages are handled and allows for a more Golang-way of handling dynamic callbacks.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLoggingOutputHandler

func DefaultLoggingOutputHandler(
	location *C.rcutils_log_location_t,
	severity C.int,
	name *C.char,
	timestamp C.rcutils_time_point_value_t,
	format *C.char,
	args *C.va_list,
)

DefaultLoggingOutputHandler is the logging output handler used by default, which logs messages based on ROS parameters used to initialize the logging system.

func InitLogging

func InitLogging(args *Args) error

InitLogging initializes the logging system, which is required for using logging functionality.

Logging configuration can be updated by calling InitLogging again with the desired args.

If the logging system has not yet been initialized on the first call of NewContext, logging is initialized by NewContext using the arguments passed to it. Unlike InitLogging, NewContext will not update logging configuration if logging has already been initialized.

func PublisherBundle

func PublisherBundle(rclContext *Context, wg *sync.WaitGroup, namespace, nodeName, topicName, msgTypeName string, rosArgs *Args) (*Context, *Publisher, error)

func SetLoggingOutputHandler

func SetLoggingOutputHandler(h LoggingOutputHandler)

SetLoggingOutputHandler sets the current logging output handler to h. If h == nil, DefaultLoggingOutputHandler is used.

func SubscriberBundleReturnWaitSet

func SubscriberBundleReturnWaitSet(ctx context.Context, rclContext *Context, wg *sync.WaitGroup, namespace, nodeName, topicName, msgTypeName string, rosArgs *Args, subscriberCallback SubscriptionCallback) (*Context, *WaitSet, error)

Types

type AlreadyInit

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

AlreadyInit rcl specific ret codes start at 100rcl_init() already called return code.

func (*AlreadyInit) Error

func (e *AlreadyInit) Error() string

type AlreadyShutdown

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

AlreadyShutdown rcl_shutdown() already called return code.

func (*AlreadyShutdown) Error

func (e *AlreadyShutdown) Error() string

type Args

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

ROS2 is configured via CLI arguments, so merge them from different sources. See http://design.ros2.org/articles/ros_command_line_arguments.html for details.

func ParseArgs

func ParseArgs(args []string) (*Args, []string, error)

ParseArgs parses ROS 2 command line arguments from the given slice. Returns the parsed ROS 2 arguments and the remaining non-ROS arguments.

ParseArgs expects ROS 2 arguments to be wrapped between a pair of "--ros-args" and "--" arguments. See http://design.ros2.org/articles/ros_command_line_arguments.html for details.

Example
rosArgs, restArgs, err := ParseArgs([]string{"--extra0", "args0", "--ros-args", "--log-level", "DEBUG", "--", "--extra1", "args1"})
if err != nil {
	panic(err)
}
fmt.Printf("rosArgs: [%v]\n", rosArgs)
fmt.Printf("restArgs: %+v\n\n", restArgs)

rosArgs, restArgs, err = ParseArgs([]string{"--ros-args", "--log-level", "INFO"})
if err != nil {
	panic(err)
}
fmt.Printf("rosArgs: [%v]\n", rosArgs)
fmt.Printf("restArgs: %+v\n\n", restArgs)

rosArgs, restArgs, err = ParseArgs([]string{"--extra0", "args0", "--extra1", "args1"})
if err != nil {
	panic(err)
}
fmt.Printf("rosArgs: [%v]\n", rosArgs)
fmt.Printf("restArgs: %+v\n\n", restArgs)

rosArgs, restArgs, err = ParseArgs(nil)
if err != nil {
	panic(err)
}
fmt.Printf("rosArgs: [%v]\n", rosArgs)
fmt.Printf("restArgs: %+v\n", restArgs)
Output:

rosArgs: [--log-level DEBUG]
restArgs: [--extra0 args0 --extra1 args1]

rosArgs: [--log-level INFO]
restArgs: []

rosArgs: []
restArgs: [--extra0 args0 --extra1 args1]

rosArgs: []
restArgs: []

func (*Args) String

func (a *Args) String() string

type BadAlloc

type BadAlloc = RmwBadAlloc

BadAlloc Failed to allocate memory return code.

type Client

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

Client is used to send requests to and receive responses from a service.

Calling Send and Close is thread-safe. Creating clients is not thread-safe.

func (*Client) Close

func (c *Client) Close() error

func (*Client) Send

type ClientInvalid

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

ClientInvalid rcl service client specific ret codes in 5XXInvalid rcl_client_t given return code.

func (*ClientInvalid) Error

func (e *ClientInvalid) Error() string

type ClientOptions

type ClientOptions struct {
	Qos RmwQosProfile
}

func NewDefaultClientOptions

func NewDefaultClientOptions() *ClientOptions

type ClientTakeFailed

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

ClientTakeFailed Failed to take a response from the client return code.

func (*ClientTakeFailed) Error

func (e *ClientTakeFailed) Error() string

type Clock

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

func (*Clock) Close

func (self *Clock) Close() error

Close frees the allocated memory

type ClockType

type ClockType uint32
const (
	ClockTypeUninitialized ClockType = 0
	ClockTypeROSTime       ClockType = 1
	ClockTypeSystemTime    ClockType = 2
	ClockTypeSteadyTime    ClockType = 3
)

type Context

type Context struct {
	WG *sync.WaitGroup

	Clock *Clock
	// contains filtered or unexported fields
}

Context manages resources for a set of RCL entities.

func NewContext

func NewContext(wg *sync.WaitGroup, clockType ClockType, rclArgs *Args) (ctx *Context, err error)

NewContext initializes a new RCL context.

If clockType == 0, no clock is created. You can always create a clock by calling NewClock.

A nil rclArgs is treated as en empty argument list.

If logging has not yet been initialized, NewContext will initialize it automatically using rclArgs for logging configuration.

func PublisherBundleTimer

func PublisherBundleTimer(ctx context.Context, rclContext *Context, wg *sync.WaitGroup, namespace, nodeName, topicName, msgTypeName string, rosArgs *Args, interval time.Duration, payload string, publisherCallback func(*Publisher, types.Message) bool) (*Context, error)

func SubscriberBundle

func SubscriberBundle(ctx context.Context, rclContext *Context, wg *sync.WaitGroup, namespace, nodeName, topicName, msgTypeName string, rosArgs *Args, subscriberCallback SubscriptionCallback) (*Context, error)

Creates a ROS2 RCL context with a single subscriber subscribing to the given topic and waiting for termination via the given/returned context. All parameters except the first one are optional.

func (*Context) Close

func (c *Context) Close() error

func (*Context) NewClock

func (c *Context) NewClock(clockType ClockType) (clock *Clock, err error)

func (*Context) NewNode

func (c *Context) NewNode(node_name, namespace string) (node *Node, err error)

func (*Context) NewTimer

func (c *Context) NewTimer(timeout time.Duration, timer_callback func(*Timer)) (timer *Timer, err error)

func (*Context) NewWaitSet

func (c *Context) NewWaitSet(timeout time.Duration) (ws *WaitSet, err error)

type Error

type Error = RmwError

Error Unspecified error return code.

type EventInvalid

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

EventInvalid rcl event specific ret codes in 20XXInvalid rcl_event_t given return code.

func (*EventInvalid) Error

func (e *EventInvalid) Error() string

type EventTakeFailed

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

EventTakeFailed Failed to take an event from the event handle

func (*EventTakeFailed) Error

func (e *EventTakeFailed) Error() string

type InvalidArgument

type InvalidArgument = RmwInvalidArgument

InvalidArgument Invalid argument return code.

type InvalidLogLevelRule

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

InvalidLogLevelRule Argument is not a valid log level rule

func (*InvalidLogLevelRule) Error

func (e *InvalidLogLevelRule) Error() string

type InvalidParamRule

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

InvalidParamRule Argument is not a valid parameter rule

func (*InvalidParamRule) Error

func (e *InvalidParamRule) Error() string

type InvalidRemapRule

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

InvalidRemapRule rcl argument parsing specific ret codes in 1XXXArgument is not a valid remap rule

func (*InvalidRemapRule) Error

func (e *InvalidRemapRule) Error() string

type InvalidRosArgs

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

InvalidRosArgs Found invalid ros argument while parsing

func (*InvalidRosArgs) Error

func (e *InvalidRosArgs) Error() string

type LogSeverity

type LogSeverity uint32

The severity levels of log messages / loggers.

const (
	LogSeverityUnset LogSeverity = 0  ///< The unset log level
	LogSeverityDebug LogSeverity = 10 ///< The debug log level
	LogSeverityInfo  LogSeverity = 20 ///< The info log level
	LogSeverityWarn  LogSeverity = 30 ///< The warn log level
	LogSeverityError LogSeverity = 40 ///< The error log level
	LogSeverityFatal LogSeverity = 50 ///< The fatal log level
)

func (LogSeverity) String

func (s LogSeverity) String() string

type Logger

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

Logger can be used to log messages using the ROS 2 logging system.

Loggers are usable only after logging has been initialized. See InitLogging.

Logging methods prefixed with "Log" take the logging level as the first parameter. Methods prefixed with the name of a logging level are shorthands to "Log" methods, and log using the prefixed logging level.

Logging methods suffixed with "", "f" or "ln" format their arguments in the same way as fmt.Print, fmt.Printf and fmt.Println, respectively.

func GetLogger

func GetLogger(name string) *Logger

GetLogger returns the logger named name. If name is empty, the default logger is returned. Returns nil if name is invalid.

func (*Logger) Child

func (l *Logger) Child(name string) *Logger

Child returns the child logger of l named name. Returns nil if name is invalid.

func (*Logger) Debug

func (l *Logger) Debug(a ...interface{}) error

func (*Logger) Debugf

func (l *Logger) Debugf(format string, a ...interface{}) error

func (*Logger) Debugln

func (l *Logger) Debugln(a ...interface{}) error

func (*Logger) EffectiveLevel

func (l *Logger) EffectiveLevel() (LogSeverity, error)

EffectiveLevel returns the effective logging level of l, which considers the logging levels of l's ancestors as well as the logging level of l itself. Note that this is not necessarily the same as Level.

func (*Logger) Error

func (l *Logger) Error(a ...interface{}) error

func (*Logger) Errorf

func (l *Logger) Errorf(format string, a ...interface{}) error

func (*Logger) Errorln

func (l *Logger) Errorln(a ...interface{}) error

func (*Logger) Fatal

func (l *Logger) Fatal(a ...interface{}) error

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, a ...interface{}) error

func (*Logger) Fatalln

func (l *Logger) Fatalln(a ...interface{}) error

func (*Logger) Info

func (l *Logger) Info(a ...interface{}) error

func (*Logger) Infof

func (l *Logger) Infof(format string, a ...interface{}) error

func (*Logger) Infoln

func (l *Logger) Infoln(a ...interface{}) error

func (*Logger) IsEnabledFor

func (l *Logger) IsEnabledFor(level LogSeverity) bool

IsEnabledFor returns true if l can log messages whose severity is at least level and false if not.

func (*Logger) Level

func (l *Logger) Level() (LogSeverity, error)

Level returns the logging level of l. Note that this is not necessarily the same as EffectiveLevel.

func (*Logger) Log

func (l *Logger) Log(level LogSeverity, a ...interface{}) error

func (*Logger) Logf

func (l *Logger) Logf(level LogSeverity, format string, a ...interface{}) error

func (*Logger) Logln

func (l *Logger) Logln(level LogSeverity, a ...interface{}) error

func (*Logger) Name

func (l *Logger) Name() string

func (*Logger) Parent

func (l *Logger) Parent() *Logger

Parent returns the parent logger of l. If l has no parent, the default logger is returned.

func (*Logger) SetLevel

func (l *Logger) SetLevel(level LogSeverity) error

SetLevel sets the logging level of l.

func (*Logger) Warn

func (l *Logger) Warn(a ...interface{}) error

func (*Logger) Warnf

func (l *Logger) Warnf(format string, a ...interface{}) error

func (*Logger) Warnln

func (l *Logger) Warnln(a ...interface{}) error

type LoggingOutputHandler

type LoggingOutputHandler = func(
	location *C.rcutils_log_location_t,
	severity C.int,
	name *C.char,
	timestamp C.rcutils_time_point_value_t,
	format *C.char,
	args *C.va_list,
)

LoggingOutputHandler is the function signature of logging output handling. Backwards compatibility is not guaranteed for this type alias. Use it only if necessary.

func GetLoggingOutputHandler

func GetLoggingOutputHandler() LoggingOutputHandler

GetLoggingOutputHandler returns the current logging output handler.

type MismatchedRmwId

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

MismatchedRmwId Mismatched rmw identifier return code.

func (*MismatchedRmwId) Error

func (e *MismatchedRmwId) Error() string

type Node

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

func (*Node) Close

func (self *Node) Close() error

Close frees the allocated memory

func (*Node) Logger

func (n *Node) Logger() *Logger

Logger returns the logger associated with n.

func (*Node) NewClient

func (n *Node) NewClient(
	serviceName string,
	typeSupport types.ServiceTypeSupport,
	options *ClientOptions,
) (c *Client, err error)

NewClient creates a new client.

options must not be modified after passing it to this function. If options is nil, default options are used.

func (*Node) NewPublisher

func (self *Node) NewPublisher(
	topicName string,
	ros2msg types.MessageTypeSupport,
	options *PublisherOptions,
) (pub *Publisher, err error)

NewPublisher creates a new publisher.

options must not be modified after passing it to this function. If options is nil, default options are used.

func (*Node) NewService

func (n *Node) NewService(
	name string,
	typeSupport types.ServiceTypeSupport,
	options *ServiceOptions,
	handler ServiceRequestHandler,
) (s *Service, err error)

NewService creates a new service.

options must not be modified after passing it to this function. If options is nil, default options are used.

func (*Node) NewSubscription

func (n *Node) NewSubscription(
	topicName string,
	typeSupport types.MessageTypeSupport,
	callBack SubscriptionCallback,
) (*Subscription, error)

func (*Node) NewSubscriptionWithOpts

func (self *Node) NewSubscriptionWithOpts(
	topicName string,
	ros2msg types.MessageTypeSupport,
	opts *SubscriptionOptions,
	subscriptionCallback SubscriptionCallback,
) (sub *Subscription, err error)

type NodeInvalid

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

NodeInvalid rcl node specific ret codes in 2XXInvalid rcl_node_t given return code.

func (*NodeInvalid) Error

func (e *NodeInvalid) Error() string

type NodeInvalidName

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

NodeInvalidName

func (*NodeInvalidName) Error

func (e *NodeInvalidName) Error() string

type NodeInvalidNamespace

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

NodeInvalidNamespace

func (*NodeInvalidNamespace) Error

func (e *NodeInvalidNamespace) Error() string

type NodeNameNonExistent

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

NodeNameNonExistent Failed to find node name

func (*NodeNameNonExistent) Error

func (e *NodeNameNonExistent) Error() string

type NotInit

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

NotInit rcl_init() not yet called return code.

func (*NotInit) Error

func (e *NotInit) Error() string

type Ok

type Ok = RmwOk

Ok Success return code.

type Publisher

type Publisher struct {
	TopicName string
	// contains filtered or unexported fields
}

func (*Publisher) Close

func (self *Publisher) Close() error

Close frees the allocated memory

func (*Publisher) Publish

func (self *Publisher) Publish(ros2msg types.Message) error

type PublisherInvalid

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

PublisherInvalid rcl publisher specific ret codes in 3XXInvalid rcl_publisher_t given return code.

func (*PublisherInvalid) Error

func (e *PublisherInvalid) Error() string

type PublisherOptions

type PublisherOptions struct {
	Qos RmwQosProfile
}

func NewDefaultPublisherOptions

func NewDefaultPublisherOptions() *PublisherOptions

type RCLArgs deprecated

type RCLArgs = Args

RCLArgs is a deprecated alias of Args.

Deprecated: use Args instead.

func NewRCLArgs deprecated

func NewRCLArgs(s string) (args *RCLArgs, err error)

NewRCLArgs is a deprecated wrapper of ParseArgs.

Deprecated: use ParseArgs instead.

func NewRCLArgsMust deprecated

func NewRCLArgsMust(s string) *RCLArgs

NewRCLArgsMust is like NewRCLArgs but panics on errors.

Deprecated: use ParseArgs instead.

func (*RCLArgs) Close deprecated

func (a *RCLArgs) Close() error

Close is a no-op.

Deprecated: Close is not needed anymore.

type RmwBadAlloc

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

RmwBadAlloc Failed to allocate memory

func (*RmwBadAlloc) Error

func (e *RmwBadAlloc) Error() string

type RmwError

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

RmwError Generic error to indicate operation could not complete successfully

func (*RmwError) Error

func (e *RmwError) Error() string

type RmwIncorrectRmwImplementation

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

RmwIncorrectRmwImplementation Incorrect rmw implementation.

func (*RmwIncorrectRmwImplementation) Error

func (e *RmwIncorrectRmwImplementation) Error() string

type RmwInvalidArgument

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

RmwInvalidArgument Argument to function was invalid

func (*RmwInvalidArgument) Error

func (e *RmwInvalidArgument) Error() string

type RmwMessageInfo

type RmwMessageInfo struct {
	SourceTimestamp   time.Time
	ReceivedTimestamp time.Time
	FromIntraProcess  bool
}

type RmwNodeNameNonExistent

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

RmwNodeNameNonExistent rmw node specific ret codes in 2XXFailed to find node nameUsing same return code than in rcl

func (*RmwNodeNameNonExistent) Error

func (e *RmwNodeNameNonExistent) Error() string

type RmwOk

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

RmwOk Return code for rmw functionsThe operation ran as expected

func (*RmwOk) Error

func (e *RmwOk) Error() string

type RmwQosDurabilityPolicy

type RmwQosDurabilityPolicy int
const (
	RmwQosDurabilityPolicySystemDefault RmwQosDurabilityPolicy = iota
	RmwQosDurabilityPolicyTransientLocal
	RmwQosDurabilityPolicyVolatile
	RmwQosDurabilityPolicyUnknown
)

type RmwQosHistoryPolicy

type RmwQosHistoryPolicy int
const (
	RmwQosHistoryPolicySystemDefault RmwQosHistoryPolicy = iota
	RmwQosHistoryPolicyKeepLast
	RmwQosHistoryPolicyKeepAll
	RmwQosHistoryPolicyUnknown
)

type RmwQosLivelinessPolicy

type RmwQosLivelinessPolicy int
const (
	RmwQosLivelinessPolicySystemDefault RmwQosLivelinessPolicy = iota
	RmwQosLivelinessPolicyAutomatic

	RmwQosLivelinessPolicyManualByTopic
	RmwQosLivelinessPolicyUnknown
)

type RmwQosProfile

type RmwQosProfile struct {
	History                      RmwQosHistoryPolicy
	Depth                        int
	Reliability                  RmwQosReliabilityPolicy
	Durability                   RmwQosDurabilityPolicy
	Deadline                     time.Duration
	Lifespan                     time.Duration
	Liveliness                   RmwQosLivelinessPolicy
	LivelinessLeaseDuration      time.Duration
	AvoidRosNamespaceConventions bool
}

func NewRmwQosProfileDefault

func NewRmwQosProfileDefault() RmwQosProfile

func NewRmwQosProfileServicesDefault

func NewRmwQosProfileServicesDefault() RmwQosProfile

type RmwQosReliabilityPolicy

type RmwQosReliabilityPolicy int
const (
	RmwQosReliabilityPolicySystemDefault RmwQosReliabilityPolicy = iota
	RmwQosReliabilityPolicyReliable
	RmwQosReliabilityPolicyBestEffort
	RmwQosReliabilityPolicyUnknown
)

type RmwRequestID

type RmwRequestID struct {
	WriterGUID     [16]int8
	SequenceNumber int64
}

type RmwServiceInfo

type RmwServiceInfo struct {
	SourceTimestamp   time.Time
	ReceivedTimestamp time.Time
	RequestID         RmwRequestID
}

type RmwTimeout

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

RmwTimeout The operation was halted early because it exceeded its timeout critera

func (*RmwTimeout) Error

func (e *RmwTimeout) Error() string

type RmwUnsupported

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

RmwUnsupported The operation or event handling is not supported.

func (*RmwUnsupported) Error

func (e *RmwUnsupported) Error() string

type Service

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

func (*Service) Close

func (s *Service) Close() (err error)

type ServiceInvalid

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

ServiceInvalid rcl service server specific ret codes in 6XXInvalid rcl_service_t given return code.

func (*ServiceInvalid) Error

func (e *ServiceInvalid) Error() string

type ServiceNameInvalid

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

ServiceNameInvalid Service name (same as topic name) does not pass validation.

func (*ServiceNameInvalid) Error

func (e *ServiceNameInvalid) Error() string

type ServiceOptions

type ServiceOptions struct {
	Qos RmwQosProfile
}

func NewDefaultServiceOptions

func NewDefaultServiceOptions() *ServiceOptions

type ServiceRequestHandler

type ServiceRequestHandler func(*RmwServiceInfo, types.Message, ServiceResponseSender)

type ServiceResponseSender

type ServiceResponseSender interface {
	SendResponse(resp types.Message) error
}

type ServiceTakeFailed

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

ServiceTakeFailed Failed to take a request from the service return code.

func (*ServiceTakeFailed) Error

func (e *ServiceTakeFailed) Error() string

type Subscription

type Subscription struct {
	TopicName   string
	Ros2MsgType types.MessageTypeSupport
	Callback    SubscriptionCallback
	// contains filtered or unexported fields
}

func (*Subscription) Close

func (self *Subscription) Close() error

Close frees the allocated memory

func (*Subscription) Spin

func (s *Subscription) Spin(ctx context.Context, timeout time.Duration) error

func (*Subscription) TakeMessage

func (s *Subscription) TakeMessage(out types.Message) (*RmwMessageInfo, error)

type SubscriptionCallback

type SubscriptionCallback func(*Subscription)

type SubscriptionInvalid

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

SubscriptionInvalid rcl subscription specific ret codes in 4XXInvalid rcl_subscription_t given return code.

func (*SubscriptionInvalid) Error

func (e *SubscriptionInvalid) Error() string

type SubscriptionOptions

type SubscriptionOptions struct {
	Qos RmwQosProfile
}

func NewDefaultSubscriptionOptions

func NewDefaultSubscriptionOptions() *SubscriptionOptions

type SubscriptionTakeFailed

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

SubscriptionTakeFailed Failed to take a message from the subscription return code.

func (*SubscriptionTakeFailed) Error

func (e *SubscriptionTakeFailed) Error() string

type Timeout

type Timeout = RmwTimeout

Timeout Timeout occurred return code.

type Timer

type Timer struct {
	Callback func(*Timer)
	// contains filtered or unexported fields
}

func (*Timer) Close

func (self *Timer) Close() error

Close frees the allocated memory

func (*Timer) GetTimeUntilNextCall

func (self *Timer) GetTimeUntilNextCall() (int64, error)

func (*Timer) Reset

func (self *Timer) Reset() error

type TimerCanceled

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

TimerCanceled Given timer was canceled return code.

func (*TimerCanceled) Error

func (e *TimerCanceled) Error() string

type TimerInvalid

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

TimerInvalid rcl timer specific ret codes in 8XXInvalid rcl_timer_t given return code.

func (*TimerInvalid) Error

func (e *TimerInvalid) Error() string

type TopicNameInvalid

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

TopicNameInvalid Topic name does not pass validation.

func (*TopicNameInvalid) Error

func (e *TopicNameInvalid) Error() string

type UnknownReturnCode

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

func (*UnknownReturnCode) Error

func (e *UnknownReturnCode) Error() string

type UnknownSubstitution

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

UnknownSubstitution Topic name substitution is unknown.

func (*UnknownSubstitution) Error

func (e *UnknownSubstitution) Error() string

type Unsupported

type Unsupported = RmwUnsupported

Unsupported Unsupported return code.

type WaitSet

type WaitSet struct {
	Timeout       time.Duration
	Subscriptions []*Subscription
	Timers        []*Timer
	// contains filtered or unexported fields
}

func (*WaitSet) AddClients

func (w *WaitSet) AddClients(clients ...*Client)

func (*WaitSet) AddServices

func (w *WaitSet) AddServices(services ...*Service)

func (*WaitSet) AddSubscriptions

func (w *WaitSet) AddSubscriptions(subs ...*Subscription)

func (*WaitSet) AddTimers

func (w *WaitSet) AddTimers(timers ...*Timer)

func (*WaitSet) Close

func (self *WaitSet) Close() error

Close frees the allocated memory

func (*WaitSet) Ready

func (w *WaitSet) Ready() bool

func (*WaitSet) Run

func (self *WaitSet) Run(ctx context.Context) error

Run causes the current goroutine to block on this given WaitSet. WaitSet executes the given timers and subscriptions and calls their callbacks on new events.

func (*WaitSet) RunGoroutine

func (self *WaitSet) RunGoroutine(ctx context.Context)

func (*WaitSet) WaitForReady

func (self *WaitSet) WaitForReady(timeout, interval time.Duration) error

type WaitSetEmpty

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

WaitSetEmpty Given rcl_wait_set_t is empty return code.

func (*WaitSetEmpty) Error

func (e *WaitSetEmpty) Error() string

type WaitSetFull

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

WaitSetFull Given rcl_wait_set_t is full return code.

func (*WaitSetFull) Error

func (e *WaitSetFull) Error() string

type WaitSetInvalid

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

WaitSetInvalid rcl wait and wait set specific ret codes in 9XXInvalid rcl_wait_set_t given return code.

func (*WaitSetInvalid) Error

func (e *WaitSetInvalid) Error() string

type WrongLexeme

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

WrongLexeme Expected one type of lexeme but got another

func (*WrongLexeme) Error

func (e *WrongLexeme) Error() string

Directories

Path Synopsis
These types implement the rosidl_runtime_c primitive types handling semantics.
These types implement the rosidl_runtime_c primitive types handling semantics.

Jump to

Keyboard shortcuts

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