Forwarded ROS Services API
Conventions
Content-type & response format
The default response format is application/x-protobuf. Endpoints that support JSON respond with application/json when the request includes Accept: application/json. JSON bodies are generated by serializing the same protobuf message via google::protobuf::util::MessageToJsonString (proto3 JSON mapping — field names are snake_case).
Accept request header | Content-Type response | Body |
|---|---|---|
| (absent) | application/x-protobuf | binary protobuf |
application/x-protobuf | application/x-protobuf | binary protobuf |
application/json | application/json | proto3 JSON |
| (any other) | text/plain | 415 Unsupported Media Type |
Protobuf definitions
Protobuf message definitions are published as part of the @kingsimba/axbot-sdk TypeScript SDK on npm. The .proto source files are available in the axbot-ts-sdk repository. Each endpoint references its own response message.
Service index
| Method | Path | ROS source |
|---|---|---|
GET | /ros/slam/submaps/{uuid}/{trajectory_id}/{submap_index} | /submap_query_v2 (cartographer_ros_msgs/SubmapQueryV2) |
GET | /ros/rosmaster/topics | ROS master API (getTopics + getSystemState) |
GET | /ros/rosmaster/topics/published_names | ROS master API (getSystemState — publishers only) |
Submap Query V2
Route
GET /ros/slam/submaps/{uuid}/{trajectory_id}/{submap_index}
Request
| Param | Type | Where | Notes |
|---|---|---|---|
uuid | string | path | Passed through to the ROS request |
trajectory_id | integer | path | Decimal integer |
submap_index | integer | path | Decimal integer |
ver | string | query | Optional; affects cache behavior only |
No request body.
Response
ros_messages.SubmapQueryV2Response — see submap_query.proto and geometry.proto.
Cache behavior
- With
?ver=...:Cache-Control: public, max-age=31536000, immutable - Without
ver:Cache-Control: no-cache+ weakETag - Matching
If-None-Match:304 Not Modified
Additional error codes
| Status | Meaning |
|---|---|
404 | ROS service reported not found |
502 | ROS service call failed |
504 | ROS service was unavailable before timeout |
Example
curl -i \
'http://192.168.25.25:8090/ros/slam/submaps/681dc447472ac49d7b074fa1/12/3?ver=42' \
-o submap_query.pb
Topic List
Lists all currently published ROS topics with type, publisher count, and subscriber count. Queries the ROS master directly.
Route
GET /ros/rosmaster/topics
Request
No parameters, no request body.
Response
ros_messages.TopicListResponse — repeated TopicInfo (name, type, publisher_count, subscriber_count). Only topics with at least one publisher are included.
See topics.proto.
Cache behavior
Cache-Control: no-cache — topic state is dynamic; no ETags.
Example
# protobuf (default)
curl http://192.168.25.25:8090/ros/rosmaster/topics | protoc --decode_raw
# JSON
curl -H "Accept: application/json" \
http://192.168.25.25:8090/ros/rosmaster/topics | jq .
{
"topics": [
{
"name": "/tf",
"type": "tf2_msgs/TFMessage",
"publisher_count": 1,
"subscriber_count": 3
}
]
}
Published Topic Names
Returns only the names of topics that have at least one publisher.
Route
GET /ros/rosmaster/topics/published_names
Request
No parameters, no request body.
Response
ros_messages.PublishedTopicNamesResponse — repeated names fields.
See topics.proto.
Cache behavior
Cache-Control: no-cache — topic state is dynamic.
Example
# protobuf (default)
curl http://192.168.25.25:8090/ros/rosmaster/topics/published_names | protoc --decode_raw
# JSON
curl -H "Accept: application/json" \
http://192.168.25.25:8090/ros/rosmaster/topics/published_names | jq .
{
"names": ["/tf", "/scan", "/odom"]
}