Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/axon_config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ Nested JSON values can also be addressed with dotted names, for example
`{{ endpoints.transfer_ws_url }}`. Unknown placeholders fail the command and leave
existing rendered configs unchanged.

The repository samples are Keystone-ready starting points:

- `apps/axon_recorder/config/default_config_ros1.yaml` -> Keystone `recorder.yaml`
- `apps/axon_recorder/config/default_config_ros2.yaml` -> Keystone `recorder.yaml`
- `apps/axon_transfer/config/transfer_config.yaml` -> Keystone `transfer.yaml`

For a new robot type, edit the recorder `subscriptions` list for the ROS profile and adjust
the transfer S3 destination if needed. The registration identity and WebSocket URLs are
filled by `axon-config` after the device registers.

## Refreshing Configs

Use `refresh` after a device has already been registered and `/etc/axon/device.json`
Expand Down
18 changes: 14 additions & 4 deletions apps/axon_recorder/config/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
# Axon Recorder Configuration Files

This directory contains configuration files for the Axon recorder.
This directory contains configuration files for the Axon recorder. The ROS1 and ROS2
samples are also Keystone-ready `recorder.yaml` templates for `axon_config register`.

## Configuration Files

### ROS1 Configuration
- **[default_config_ros1.yaml](default_config_ros1.yaml)** - Default configuration for ROS1 (Noetic)
- Sets `profile: ros1`
- Sets `rpc.mode: ws_client` and fills the RPC URL during registration
- Use with ROS1 plugin: `libaxon_ros1_plugin.so`

### ROS2 Configuration
- **[default_config_ros2.yaml](default_config_ros2.yaml)** - Default configuration for ROS2 (Humble/Jazzy/Rolling)
- Sets `profile: ros2`
- Sets `rpc.mode: ws_client` and fills the RPC URL during registration
- Use with ROS2 plugin: `libaxon_ros2_plugin.so`

## Usage

### Method 1: Plugin path in config file (Recommended)
### Method 1: Keystone Template Workflow

Set the `plugin.path` in the config file:
Edit the `subscriptions` list for the robot type, then upload the file to Keystone as
`recorder.yaml`. `axon_config register` renders the WebSocket RPC URL and writes the final
config to `/etc/axon/recorder.yaml`.

### Method 2: Plugin path in config file

Set the `plugin.path` in the config file. For local-only runs without Keystone, also change
`rpc.mode` to `http_server` or replace `rpc.ws_client.url` with a concrete WebSocket URL:

```bash
# ROS1
Expand All @@ -28,7 +38,7 @@ Set the `plugin.path` in the config file:
./axon_recorder --config config/default_config_ros2.yaml
```

### Method 2: Plugin path via command line
### Method 3: Plugin path via command line

```bash
# ROS1
Expand Down
14 changes: 9 additions & 5 deletions apps/axon_recorder/config/default_config_ros1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Axon Recorder Configuration for ROS1 (Noetic)
# Usage: ./axon_recorder --config config/default_config_ros1.yaml
# This sample is also suitable as a Keystone recorder.yaml template. After
# axon_config register renders it, the recorder connects back to Keystone in
# WebSocket RPC client mode. For local-only panel workflows, change rpc.mode
# to http_server and use a concrete rpc.ws_client.url when needed.

# ============================================================================
# Plugin Configuration
Expand Down Expand Up @@ -44,6 +47,7 @@ dataset:
# ============================================================================
# Subscription Configuration
# ============================================================================
# Edit this section for each robot type before uploading the template to Keystone.
# High-frequency subscriptions (IMU, camera): Use larger batches (100-5000)
# Low-frequency subscriptions (status, diagnostics): Use small batches (1-10)
# Control signals: Use batch_size=1 for immediate persistence
Expand Down Expand Up @@ -196,16 +200,16 @@ http_server:
# RPC Mode Configuration
# ============================================================================
# Unified configuration for HTTP server and WebSocket client modes
# mode: "http_server" (default) or "ws_client"
# mode: "ws_client" for Keystone-rendered templates, or "http_server" for local panel control
# - http_server: Start HTTP RPC server on local port (for axon_panel)
# - ws_client: Connect as WebSocket client to keystone server (for fleet management)
rpc:
mode: http_server
mode: ws_client

# WebSocket client configuration (only used when mode: ws_client)
ws_client:
# WebSocket server URL (e.g., ws://keystone:8090/rpc or wss://keystone:8090/rpc)
url: ws://localhost:8090/rpc
# Filled by axon_config register from the Keystone registration context.
url: "{{ recorder_rpc_url }}"

# Optional JWT token for authentication during handshake
auth_token: ""
Expand Down
14 changes: 9 additions & 5 deletions apps/axon_recorder/config/default_config_ros2.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Axon Recorder Configuration for ROS2 (Humble/Jazzy/Rolling)
# Usage: ./axon_recorder --config config/default_config_ros2.yaml
# This sample is also suitable as a Keystone recorder.yaml template. After
# axon_config register renders it, the recorder connects back to Keystone in
# WebSocket RPC client mode. For local-only panel workflows, change rpc.mode
# to http_server and use a concrete rpc.ws_client.url when needed.

# ============================================================================
# Plugin Configuration
Expand Down Expand Up @@ -46,6 +49,7 @@ dataset:
# ============================================================================
# Subscription Configuration
# ============================================================================
# Edit this section for each robot type before uploading the template to Keystone.
# High-frequency subscriptions (IMU, camera): Use larger batches (100-5000)
# Low-frequency subscriptions (status, diagnostics): Use small batches (1-10)
# Control signals: Use batch_size=1 for immediate persistence
Expand Down Expand Up @@ -223,16 +227,16 @@ http_server:
# RPC Mode Configuration
# ============================================================================
# Unified configuration for HTTP server and WebSocket client modes
# mode: "http_server" (default) or "ws_client"
# mode: "ws_client" for Keystone-rendered templates, or "http_server" for local panel control
# - http_server: Start HTTP RPC server on local port (for axon_panel)
# - ws_client: Connect as WebSocket client to keystone server (for fleet management)
rpc:
mode: http_server
mode: ws_client

# WebSocket client configuration (only used when mode: ws_client)
ws_client:
# WebSocket server URL (e.g., ws://keystone:8090/rpc or wss://keystone:8090/rpc)
url: ws://localhost:8090/rpc
# Filled by axon_config register from the Keystone registration context.
url: "{{ recorder_rpc_url }}"

# Optional JWT token for authentication during handshake
auth_token: ""
Expand Down
4 changes: 4 additions & 0 deletions apps/axon_transfer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
recording directory, persists upload state in SQLite, uploads MCAP files to S3-compatible storage,
and reports operator-facing status over the fleet WebSocket.

`config/transfer_config.yaml` is also a Keystone-ready `transfer.yaml` template. `axon_config`
renders the device identity and fleet WebSocket base URL after registration; edit the S3 destination
and scanner settings per deployment before uploading it to Keystone.

## Completion Contract

The scanner supports two completion modes:
Expand Down
10 changes: 7 additions & 3 deletions apps/axon_transfer/config/transfer_config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Axon Transfer Configuration
# S3 transfer daemon for fleet management
# This sample is suitable as a Keystone transfer.yaml template. axon_config
# register renders the identity and WebSocket fields from the registration
# context before writing /etc/axon/transfer.yaml.

# Device identification
device_id: "robot_01"
factory_id: "factory_a"
device_id: "{{ device_id }}"
factory_id: "{{ factory_id }}"

# WebSocket client configuration
ws:
url: "ws://fleet.factory-a.local:8090/transfer"
# axon-transfer appends /<device_id> to this base URL at runtime.
url: "{{ transfer_ws_url }}"
ping_interval_ms: 30000
ping_timeout_ms: 10000
reconnect:
Expand Down
Loading