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
2 changes: 2 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ and collecting telemetry in the background. CAN/CAN FD communication is provided

L6 defaults to Classic CAN. Devices with compatible CAN FD firmware can explicitly select the
[optional HOP protocol](docs/en/guides/usage.md#optional-l6-can-fd-protocol).
O6 firmware that supports HOP 0.0.4 can use CAN FD or Classic CAN with explicit protocol selection.
See [O6 HOP connection and CAN mode switching](docs/en/tutorials/o6.md#o6-hop).
See [platform and hardware validation scope](docs/en/reference/compatibility.md#platform-and-hardware-validation-scope)
for tested platforms, adapters, and limitations.

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ and collecting telemetry in the background. CAN/CAN FD communication is provided

L6 defaults to Classic CAN. Devices with compatible CAN FD firmware can explicitly select the
[optional HOP protocol](docs/en/guides/usage.md#optional-l6-can-fd-protocol).
O6 firmware that supports HOP 0.0.4 can use CAN FD or Classic CAN with explicit protocol selection.
See [O6 HOP connection and CAN mode switching](docs/en/tutorials/o6.md#o6-hop).
See [platform and hardware validation scope](docs/en/reference/compatibility.md#platform-and-hardware-validation-scope)
for tested platforms, adapters, and limitations.

Expand Down
1 change: 1 addition & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
| O30 | 20 | HOP / CAN FD 标准帧,无 BRS | 请求 ID 默认 `0x001` |

L6 默认使用 Classic CAN;支持 CAN FD 的设备可显式选择[可选 HOP 协议](docs/zh/guides/usage.md#l6-可选-can-fd-协议)。
O6 固件支持 HOP 0.0.4 时,可显式选择 CAN FD 或 Classic CAN。详见 [O6 HOP 接入与 CAN 模式切换](docs/zh/tutorials/o6.md#o6-hop)。
平台、适配器和实测限制统一见
[平台与硬件验证范围](docs/zh/reference/compatibility.md#平台与硬件验证范围)。

Expand Down
4 changes: 4 additions & 0 deletions docs/en/connections/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ For optional L6 HOP firmware, explicitly set `config.l6_protocol = L6Protocol::k
and verify the corresponding address, bitrate, and capabilities. You cannot infer the device protocol from the FD interface configuration.
See [Optional HOP connection](../guides/usage.md#optional-l6-can-fd-protocol).

Connect to O6 HOP firmware manually. Set `config.o6_protocol = O6Protocol::kHopV004` for a device currently using CAN FD,
or select `O6Protocol::kHopV004Can` for CAN 2.0 and configure SocketCAN to match the device. The default request ID is `0x001`.
See the connection example and device-side mode switch in [Manual O6 HOP connection](../tutorials/o6.md#o6-hop).

<a id="pcan-slcan"></a>

## PCAN and SLCAN (Windows)
Expand Down
6 changes: 6 additions & 0 deletions docs/en/reference/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ close/recovery and injected abnormal-reply timing acceptance is claimed. Offline
regressions cover these lifecycle and isolation rules independently. The scheduling
runs do not establish frequency maxima or dynamic motion accuracy.

## O6 HOP hardware validation

On 2026-11-25, a Release build from the local C++ SDK source was tested on a right O6 (firmware `5.0.1`, HOP `0.0.4`) on Ubuntu 24.04 x86_64.
candleLightFD / SocketCAN passed common CAN FD operations and single-joint movement with restoration. MiniCANFD verified the C++ FD-to-CAN 2.0 switch and used the vendor API to verify Classic frame I/O and return to FD.
See adapter versions and coverage in the [O6 HOP hardware record](../../hardware-acceptance/o6/report.md#o6-hop-2026-11-25).

## Historical common-feature hardware baseline

Historical hardware acceptance applies to the SDK revision and configuration recorded
Expand Down
23 changes: 21 additions & 2 deletions docs/en/reference/model-capabilities.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Model Capabilities

This reference covers control, telemetry, configuration, and model-specific features in C++ SDK `0.3.4`.
This reference covers control, telemetry, configuration, and model-specific features in the C++ SDK.
Compare models in the [Capabilities overview](#capabilities-overview), then read the corresponding section:
[L6](#l6), [O6](#o6), [L20 Lite](#l20-lite), [L20](#l20), [L30](#l30), [O30](#o30).

Expand All @@ -19,6 +19,7 @@ for operating systems, adapters, and hardware validation, see [Platform and hard
hardware-tested scope is listed separately in [Validation records](#validation-records), not inferred from API existence.
- `—` means unsupported by the current unified API. L6 in all overview tables means **default Classic CAN**;
CAN FD is an [Explicitly selected optional protocol](#optional-l6-can-fd-protocol), without all Classic features.
- O6 in the overview tables uses the original Classic CAN protocol. See [O6 HOP 0.0.4](#o6-hop-capabilities) for HOP capabilities in the current source.

## Capabilities overview

Expand Down Expand Up @@ -132,6 +133,8 @@ For complete connection examples, ACK semantics, and pending hardware checks, se

## O6

### Default Classic CAN

6 joints, with the same order as L6; Classic CAN, default left `0x28`, right `0x27`.
The native model entry point is `o6::O6`.

Expand Down Expand Up @@ -160,6 +163,21 @@ Limitations and usage notes:
- Unified measured speed, torque, gains, limit compensation, voltage, fault clearing, and enable/disable are unsupported.
- Speed, current limits, and measured current have no reliably established uniform physical conversion; retain raw values and unit confidence.

<a id="o6-hop-capabilities"></a>

### O6 HOP 0.0.4

The model-specific entry point is `o6::HopO6`. For the unified API, explicitly select a HOP protocol in `HandDevice`.

| Feature | HOP semantics |
| --- | --- |
| Angles and motion parameters | Device reads and writes for angles, configured speeds, accelerations, current limits, and the three stall protection settings. Per-joint raw range is `0..255` |
| Live telemetry | Reads angles, current, temperature, faults, and tactile data for five fingers using the sensor descriptors for fields and shapes |
| CAN configuration | `get_can_configuration()` reads the mode, request ID, BRS, and bitrates. `set_can_interface_mode()` writes the mode field |

Use raw counts for numeric data. Physical conversions for speed, acceleration, and current remain unverified.
See the [O6 HOP guide](../tutorials/o6.md#o6-hop) for connection setup, mode switching, and adapter limitations.

## L20 Lite

10 joints, Classic CAN, default left `0x28`, right `0x27`; native entry point `l20lite::L20lite`.
Expand Down Expand Up @@ -363,7 +381,8 @@ original per-model reports are in the source repository at `docs/hardware-accept
| --- | --- | --- |
| L6 Classic | `V2.4.5` | Common reads, angles, speed/current limits, and recovery have hardware records; advanced gains, torque output, and persistence are outside this acceptance scope |
| L6 HOP CAN FD (optional) | No hardware acceptance record yet | Offline protocol vectors and FakeTransport do not establish device integration or motion passes |
| O6 | `V1.3.2` | Common APIs and recovery have hardware records; native speed-query configuration changes remain a limitation |
| O6 Classic | `V1.3.2` | Hardware records cover common APIs and recovery. The native speed query can change the configured speed |
| O6 HOP 0.0.4 | `5.0.1` | Common CAN FD APIs and single-joint movement with restoration passed on a right hand. See the [O6 HOP hardware record](../../hardware-acceptance/o6/report.md#o6-hop-2026-11-25) for FD-to-CAN 2.0 switching and Classic frame coverage |
| L20 Lite | `V4.6.10` | Common APIs, caches, and recovery have hardware records; scalar tactile fields unsupported; joint 7/8 motion issues retained |
| L20 | `V3.0.6` | Common APIs and recovery have hardware records; speed/current-limit writes verify sending only, without configuration readback; intermittent faults retained |
| L30 | `V6.1.6` | Common APIs, enable/disable, and recovery have hardware records; one historical skip cannot count as a hardware pass |
Expand Down
110 changes: 99 additions & 11 deletions docs/en/tutorials/o6.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# O6 Feature Guide

O6 uses Classic CAN and has 6 joints.
O6 has 6 joints. The SDK defaults to the original O6 Classic CAN protocol. Select HOP explicitly on firmware that supports HOP 0.0.4.
This page uses C++ `HandDevice` for common operations. The examples follow the current C++ SDK API.

## Contents

- [Usage](#usage)
- [Manual HOP 0.0.4 connection](#o6-hop)
- [Switching HOP CAN modes](#hop-can-mode)
- [Joint order](#joint-order)
- [Device identity](#identity)
- [Capabilities](#capabilities)
Expand All @@ -18,7 +20,7 @@ This page uses C++ `HandDevice` for common operations. The examples follow the c

## Usage

First configure your environment using [Prepare the communication interface](../connections/prepare-interface.md), then choose [Automatic connection](../connections/automatic.md)
For firmware using the original O6 Classic CAN protocol, configure your environment using [Prepare the communication interface](../connections/prepare-interface.md), then choose [Automatic connection](../connections/automatic.md)
or [Manual connection](../connections/manual.md). The complete read-only Linux SocketCAN program below
provides the `hand` object, chrono literals, and printing/waiting helpers used by the snippets later on this page.
For Windows, replace the device construction code with a verified adapter factory; the feature snippets remain the same.
Expand Down Expand Up @@ -144,6 +146,93 @@ Your application must separately verify mechanical positioning and control effec
Check `meta.valid` first, then use `meta.stale` to determine whether a sample has expired; a cached reading is not a live measurement.
If closing fails, a long-running application should retain the same object and schedule cleanup retries rather than immediately opening another connection.

<a id="o6-hop"></a>

## Manual HOP 0.0.4 connection

HOP defines device registers and messages. CAN 2.0 and CAN FD carry those messages. Set `HandDeviceConfig::o6_protocol` to match the device's **current** protocol and frame format.
This setting selects how the SDK communicates. To change the device's frame format, use the [HOP mode-switching API](#hop-can-mode).

| Setting | Frame format | Addresses |
| --- | --- | --- |
| `O6Protocol::kClassic` (default) | Original O6 Classic CAN | Left `0x28`, right `0x27` |
| `O6Protocol::kHopV004` | HOP 0.0.4, standard CAN FD frames with BRS off on SDK transmissions | Default request ID `0x001`; response ID is the request ID OR `0x400` |
| `O6Protocol::kHopV004Can` | HOP 0.0.4, standard CAN 2.0 frames | Same ID rules as HOP CAN FD |

Connect to HOP devices manually. Specify the actual hand side, request ID, and adapter channel. `open()` reads the device identity and checks the hand side.
Check the CAN_H and CAN_L wiring and bus termination. The tested right hand used `0x001/0x401`, a 1 Mbit/s nominal bitrate, a 5 Mbit/s data bitrate, and BRS off.
For a Linux SocketCAN device with these settings, configure `can0` as follows.

```bash
sudo ip link set can0 down
sudo ip link set can0 up type can bitrate 1000000 dbitrate 5000000 fd on
ip -details link show can0
```

This program reads CAN configuration and angles. For a device already using HOP CAN 2.0, select `kHopV004Can` and configure SocketCAN with the nominal bitrate and `fd off`.

```cpp
#include <exception>
#include <iostream>
#include <linkerbot/hand/api/device.hpp>

int main() try {
using namespace linkerbot::hand;
HandDeviceConfig config;
config.model = Model::kO6;
config.side = HandSide::kRight;
config.interface_name = "can0";
config.address = 0x001;
config.o6_protocol = O6Protocol::kHopV004;

HandDevice hand(config);
hand.open();
const auto can = hand.get_can_configuration();
std::cout << "request_id=0x" << std::hex << can.request_id
<< " response_id=0x" << can.response_id() << std::dec
<< " mode=" << (can.interface_mode == HopCanInterfaceMode::kCanFd ? "canfd" : "can")
<< " nominal=" << can.nominal_bitrate << " data=" << can.data_bitrate
<< " brs=" << can.brs << '\n';
const auto angles = hand.get_angles();
for (const auto angle : angles.raw) {
std::cout << angle << ' ';
}
std::cout << '\n';
hand.close();
return angles.meta.valid ? 0 : 1;
} catch (const std::exception &error) {
std::cerr << error.what() << '\n';
return 1;
}
```

<a id="hop-can-mode"></a>

## Switching HOP CAN modes

`get_can_configuration()` reads the device's request ID, interface mode, BRS, nominal bitrate, and data bitrate.
Pass `HopCanInterfaceMode::kCan20` or `HopCanInterfaceMode::kCanFd` to `set_can_interface_mode()` to set the device's HOP frame format.
These modes correspond to values `1` and `2` in MI `0x35` / SI `0x06`. Disable device-side BRS before selecting CAN 2.0.
Connect in the device's current mode before switching. Each call sends at most one mode write. Configure the host interface separately.

The Linux SocketCAN example `hop_can_mode` reads identity and CAN configuration by default.

```bash
cmake -S . -B build -DLINKERBOT_BUILD_EXAMPLES=ON
cmake --build build --target hop_can_mode
./build/examples/hop_can_mode can0 o6 right --request-id 0x001
```

- `--from-mode canfd|can` selects the connection's frame format and defaults to `canfd`. `can` applies only to O6 HOP.
- `--mode can|canfd` writes the target mode to volatile configuration by default. Add `--save` to send one Flash save command. Power-cycle persistence remains untested.
- Check the actual reply format using the API result's `active_wire_is_fd`. CLI exit code `2` means the register was verified and replies still use the previous format. Recheck after a controlled restart. Once the new format is active, close the original connection, configure the host interface and adapter for the new mode, and open a new connection with the corresponding `o6_protocol`.
- Switching from CAN 2.0 to CAN FD requires a transport that can receive an immediate FD reply. A Classic SocketCAN connection cannot receive it.
The current SDK leaves the Classic frame format implicit on HOP CAN 2.0 requests. FD-enabled SocketCAN and MiniCANFD channels can send those requests as FD frames.
After a timeout, check the device using the target format before attempting another mode write.

The candleLightFD run verified common C++ `HandDevice` operations over HOP CAN FD. The MiniCANFD run verified the C++ FD-to-CAN 2.0 switch and used the vendor API for Classic frame reads and writes and the return to FD.
See the [O6 HOP hardware record](../../hardware-acceptance/o6/report.md#o6-hop-2026-11-25).

## Joint order

The SDK reads and sets joint data in the following order.
Expand Down Expand Up @@ -253,9 +342,8 @@ wait_command(hand.set_speeds(std::vector<double>(6, 100.0)));

### Reading configured speeds

Configured-speed reads use the cache of complete speed-write responses from the current connection; they do not send a new speed query.
Set the speed first, then read it in the same connection. The measured-speed API `get_speeds()` is not supported.
On O6 V1.3.2 firmware, do not actively query speeds through the native `speed.get_blocking()` method; this request may set the speed to 0.
HOP reads the device register through `get_configured_speeds()`. The original Classic protocol uses the complete speed-write response cached in the current connection, so set the speed first in that connection.
On Classic V1.3.2 firmware, a native `speed.get_blocking()` query may set the device speed to 0.

```cpp
print_sample(hand.get_configured_speeds(1s));
Expand All @@ -267,13 +355,13 @@ print_sample(hand.get_configured_speeds(1s));

### Setting accelerations

`set_accelerations()` takes 6 raw counts in the range `0..254`; do not interpret them directly as physical acceleration.
`set_accelerations()` takes 6 raw counts. The original Classic protocol accepts `0..254`. HOP accepts `0..255`.

```cpp
wait_command(hand.set_accelerations(std::vector<double>(6, 100.0)));
```

For O6, `0` is a special protocol encoding for maximum acceleration, not zero acceleration.
The original Classic protocol uses `0` to encode special maximum acceleration. The physical conversion for HOP acceleration remains unverified.

### Reading configured accelerations

Expand All @@ -297,24 +385,24 @@ print_sample(hand.get_currents(1s));

### Reading temperatures

The capabilities for this model declare degrees Celsius as the temperature unit; you must still check sample validity.
The original Classic protocol declares temperatures in degrees Celsius. HOP capabilities report raw counts. Check the sample validity with either protocol.

```cpp
print_sample(hand.get_temperatures(1s));
```

### Reading tactile matrices

In C++, select fields with `get_force(vector<string>{"fn"}, timeout)` and access them through `field("fn")`,
rather than Python's `force.fn.raw`. Each optional vector in `raw` corresponds to one finger; `nullopt` means missing data,
Select fields with `get_force(vector<string>{"fn"}, timeout)` and access them through `field("fn")`.
Each optional vector in `raw` corresponds to one finger. `nullopt` means missing data,
and `false` in `valid_values` means an invalid value. The `print_field()` helper above displays this information without filling in zeros or computing sums.

```cpp
const auto force = hand.get_force(std::vector<std::string>{"fn"}, 1s);
print_field(force, "fn");
```

The default matrix layout is 5 fingers with 10×4 points per finger. The returned fields and `force.tactile` retain the actual data; use the current capabilities and firmware as the reference.
The original Classic protocol defaults to 5 fingers with 10×4 points per finger. HOP reads fields and shapes from each finger's sensor descriptor.

For more features, firmware limitations, and physical units, see [Model capabilities](../reference/model-capabilities.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/hardware-acceptance/README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ retains its revisions, firmware, commands, failures and follow-up results.
| Model | Recorded coverage and remaining limits |
| --- | --- |
| [L6](l6/report.md) | 34 common Linux checks passed; Windows Debug PCAN and SLCAN Classic discovery, reads and single-joint movement/restoration recorded |
| [O6](o6/report.md) | 33 common Linux checks eventually passed; Windows Debug PCAN and SLCAN Classic discovery, reads and single-joint movement/restoration recorded |
| [O6](o6/report.md) | Classic CAN records cover Linux and Windows. The [HOP 0.0.4 run](o6/report.md#o6-hop-2026-11-25) passed 10 CAN FD checks, including single-joint movement and restoration, and recorded the FD-to-CAN 2.0 switch |
| [L20 Lite](l20lite/report.md) | Linux joint arrival/coupling differences retained; Windows Debug PCAN and SLCAN Classic checks include joint 0 movement/restoration |
| [L20](l20/report.md) | 32 common checks passed; Windows Debug PCAN/SLCAN Classic recorded, with earlier fault and snapshot-expiry observations retained |
| [L30](l30/report.md) | 34 Linux checks passed with additional skipped cases; Windows Debug SLCAN FD recorded; previous pose-range and CLI failures remain documented |
Expand Down
2 changes: 1 addition & 1 deletion docs/hardware-acceptance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MiniCANFD 需使用该场次验证的配套 DLL,旧版 DLL 的发送失败记
| 型号 | 报告 / 状态 |
| --- | --- |
| L6 | [Linux 常用功能 34 项通过;Windows PCAN / SLCAN Classic 读取及单关节收发恢复通过](l6/report.md) |
| O6 | [Linux 常用接口 33 项最终通过;Windows PCAN / SLCAN Classic 发现、读取及单关节收发恢复通过](o6/report.md) |
| O6 | [Classic 的 Linux 和 Windows 验收](o6/report.md)。[HOP 0.0.4 实测](o6/report.md#o6-hop-2026-11-25)覆盖 CAN FD 常用接口 10 项、单关节运动恢复及 FD→CAN 2.0 切换 |
| L20Lite | [Linux 角度到位/联动差异保留;Windows PCAN / SLCAN Classic 发现、读取及关节 0 运动恢复通过](l20lite/report.md) |
| L20 | [常用接口 32 项通过;Windows PCAN / SLCAN Classic 发现、读取及单关节收发恢复通过,历史设备故障及复测记录见报告](l20/report.md) |
| L30 | [Linux 34 项通过、另有跳过项;Windows SLCAN FD 发现、读取及单关节运动恢复通过](l30/report.md) |
Expand Down
Loading
Loading