Ros class

The class through which all data to and from a ROS node goes through. Manages status and key information about the connection and node.

Constructors

Ros({dynamic url})
Initializes the _statusController as a broadcast. The url of the ROS node can be optionally specified at this point.

Properties

advertisers int
Total number of advertisers to ever connect.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
ids int
The sum to generate IDs with.
no setter
publishers int
Total number of publishers to ever connect.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceCallers int
Total number of callers to ever call a service.
getter/setter pair
status Status
Status variable that can be used when not interested in getting live updates.
getter/setter pair
statusStream Stream<Status>
Subscribable stream to listen for connection status changes.
no setter
stream Stream<Map<String, dynamic>>
JSON broadcast websocket stream.
getter/setter pair
subscribers int
Total subscribers to ever connect.
getter/setter pair
url ↔ dynamic
The url of ROS node running the rosbridge server.
getter/setter pair

Methods

authenticate({required String mac, required String client, required String dest, required String rand, required DateTime t, required String level, required DateTime end}) → void
close([int? code, String? reason]) Future<void>
Close the connection to the ROS node, an exit code and reason can be optionally specified.
connect({dynamic url}) → void
Connect to the ROS node, the url can override what was provided in the constructor.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestAdvertiser(String name) String
Request an advertiser ID.
requestPublisher(String name) String
Request a publisher ID.
requestServiceCaller(String name) String
Request a service caller ID.
requestSubscriber(String name) String
Request a subscription ID.
send(dynamic message) bool
Send a message to the ROS node
setStatusLevel({String? level, int? id}) → void
Sends a set_level request to the server. level can be one of {none, error, warning, info}, and id is the optional operation ID to change status level on
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override