RosbridgeTransport class
RobotTransport implementation over rosbridge v2 WebSockets.
Emits fused map poses at odometry rate by composing the latest map pose with
the incremental odometry displacement since that anchor. Before a map pose
arrives, raw odometry poses are emitted with their original frameId.
- Implemented types
Constructors
- RosbridgeTransport({required String robotId, RosbridgeTopics topics = const RosbridgeTopics(), Duration poseThrottle = const Duration(milliseconds: 100), Duration heartbeatInterval = const Duration(milliseconds: 200), Duration driveInterval = const Duration(milliseconds: 100), RosbridgeClient? client, RosbridgeClient? actionClient, HttpClient? httpClient})
-
Creates a RosbridgeTransport for
robotIdwith topic mappingtopics, throttling and safety intervals, and optional custom clients or TLShttpClient.
Properties
-
battery
→ Stream<
BatteryState> -
Stream of battery telemetry updates.
latefinal
- currentBattery → BatteryState?
-
Latest known battery state, or
nullif none received yet.no setteroverride - currentDeadman → String?
-
Current deadman state, or
nullwhen disconnected or whendeadman_nodeis not running.no setter - currentLink → LinkState
-
Most recent connection state.
no setteroverride
-
Most recent navigation goal activity on the robot (including goals not
sent by this app), or
nullif unknown.no setteroverride -
Latest vendor-specific navigation mode, or
nullif none received.no setter - currentPose → RobotPose?
-
Latest known robot pose, typically in the map frame.
no setteroverride
-
currentWaypoints
→ List<
NamedWaypoint> ? -
Latest list of robot-defined named waypoints, or
nullif not received.no setteroverride -
deadman
→ Stream<
String> -
Stream of robot deadman states (
idle,armed,tripped).latefinal - driveInterval → Duration
-
Republish interval for active teleoperation velocity commands.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heartbeatInterval → Duration
-
Interval for publishing heartbeats to robot-side
deadman_node.final -
lastStopAck
↔ Future<
bool?> ? -
Acknowledgement future from the most recent stop call:
trueif Nav2 returnedERROR_NONE,falseif rejected, ornullif no reply arrived.getter/setter pair -
link
→ Stream<
LinkState> -
Stream of connection state transitions.
no setteroverride
-
Emits whenever a goal starts or changes state.
latefinal
-
Stream of vendor-specific navigation modes (when RosbridgeTopics.navModeTopic
is configured).
latefinal
-
pose
→ Stream<
RobotPose> -
Stream of robot pose updates.
latefinal
- poseThrottle → Duration
-
Minimum interval between odometry updates requested from rosbridge.
final
- robotId → String
-
Identifier of the robot this transport communicates with.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionId → String
-
Random 8-hex-character session ID for this transport instance, used by
deadman_nodeto distinguish the active controller from passive viewers.final - topics → RosbridgeTopics
-
Configured ROS 2 topic, service, and action names.
final
-
waypoints
→ Stream<
List< NamedWaypoint> > -
Stream of updated waypoint lists published by the robot.
latefinal
Methods
-
connect(
Uri endpoint, {String? token}) → Future< void> -
Connects to the robot transport at
endpointwith an optional bearertoken.override -
dispose(
) → Future< void> -
Closes connections and releases all resources.
override
-
drive(
double linear, double angular) → bool -
Sends a manual teleoperation velocity command.
override
-
goToWaypoint(
String name) → bool -
Commands the robot to navigate to a robot-defined waypoint by
name.override -
Sends a 2D navigation
goal(for example, Nav2NavigateToPose).override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stop(
) → bool -
Stops all active navigation and manual motion.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited