Skip to main content

Streaming/Unary Data Management

This documentation describes how to interact with robot streams for real-time data retrieval or command transmission. These APIs allow users to manage streaming data and send commands to robots when they are online. All streaming operations are rate-limited to 1 second.


Get All Streams

Endpoint

GET /robot/{robotId}/streams

Description

Retrieves a list of all available streams for a specific robot. This includes the component name, stream name, type, direction (input/output), and source type.

Response Fields

  • ComponentName: The name of the robot component providing the stream.
  • StreamName: The name of the stream.
  • StreamType: The data type of the stream, such as pose, laser scan, or marker.
  • Direction: Indicates whether the stream is an input or output.
  • StreamSourceType: The type of the stream source.

Example Response

{
"RobotStreams": [
{
"ComponentName": "nimbus/realsense-d435",
"StreamName": "tf_base_link_to_camera_depth_optical_frame",
"StreamType": "Nimbus.Messages.geometry_msgs.Pose",
"Direction": "output",
"StreamSourceType": 1
},
{
"ComponentName": "nimbus/ros2-legs-detector",
"StreamName": "scan",
"StreamType": "Nimbus.Messages.sensor_msgs.LaserScan",
"Direction": "input",
"StreamSourceType": 1
},
{
"ComponentName": "nimbus/ros2-legs-detector",
"StreamName": "legs_visualization_marker",
"StreamType": "Nimbus.Messages.visualization_msgs.Marker",
"Direction": "output",
"StreamSourceType": 1
}
]
}

Get Data from a Specific Stream

Endpoint

GET /robot/{robotId}/stream?componentName={ComponentName}&streamName={StreamName}&source={StreamSourceType}

Description

Fetches data published on a specific stream for a robot. Only streams with an output direction can be accessed.

warning

Before calling this endpoint, use Get All Streams (GET /robot/{robotId}/streams) to retrieve the available streams for your robot. Use the ComponentName and StreamName values from that response as the query parameters here.

Query Parameters

  • componentName: The name of the component providing the stream (obtained from Get All Streams).
  • streamName: The name of the stream (obtained from Get All Streams).
  • source: The type of the stream source.

Get Message Definition

Endpoint

GET /streams/{streamType}/stream

Description

Retrieves the structure (schema) of the desired message based on its type. This is useful for understanding the expected format of data.

Example Response


{
"EmptyMessage": {
"header": {
"seq": 0,
"stamp": "0",
"frameId": "map"
},
"childFrameId": "base_link",
"pose": {
"pose": {
"position": {
"x": 0,
"y": 0,
"z": 0.0
},
"orientation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
"covariance": [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
]
},
"twist": {
"twist": {
"linear": {
"x": 0,
"y": 0,
"z": 0
},
"angular": {
"x": 0,
"y": 0,
"z": 0
}
},
"covariance": [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
]
}
}
}

Post Data to a Specific Stream

Endpoint


POST /robot/{robotId}/streams/upload-stream

Description

Posts JSON data to a specific stream. The stream must be active, and the operation has a timeout of 1 second.

Request Body

  • componentname: The name of the component receiving the data.
  • streamname: The name of the target stream.
  • source: The type of the stream source.
  • streamjson: The JSON payload containing the data to be sent.
  • datatype: The data type of the stream (e.g., geometry_msgs.Point).

Example Request Body


{
"componentname": "data-publisher",
"streamname": "gps",
"source": "1",
"streamjson": {
"x": "1",
"y": "2",
"z": "3"
},
"datatype": "Nimbus.Messages.geometry_msgs.Point"
}