You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contents/specification/annotation-sync.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: "API specification for synchronizing annotations between external s
5
5
6
6
> **Note:** Annotation synchronization is currently an experimental feature with partial support in the InOrbit platform.
7
7
8
-
The annotation synchronization framework enables connectors to synchronize waypoint annotations between external systems and InOrbit's Config API.
8
+
The annotation synchronization feature enables connectors to synchronize waypoint annotations between external systems and InOrbit's Config API.
9
9
10
10
For Config API models and client, see [Config API](config-api).
11
11
@@ -30,10 +30,6 @@ config = AnnotationSyncConfig(
30
30
)
31
31
```
32
32
33
-
**Note**: `frame_id` is not configured. The framework automatically starts sync for each unique `frame_id` as robot poses are published.
34
-
35
-
**Note**: The ownership signature property is `syncOrigin`, with value set to `ConnectorConfig.connector_type`. The manager automatically injects this.
|`sync_interval_seconds`| No |`300`| Interval between syncs |
54
+
|`location_id`| Yes*| - | Location tag ID for scoping |
104
55
105
56
## Ownership Signatures
106
57
107
58
The sync uses **signature properties** to identify annotations it manages:
108
59
109
-
The ownership signature uses a fixed property name (`syncOrigin`) and the connector type as value:
60
+
The ownership signature uses a fixed property name (`syncOrigin`) and the `connector_type`as value.
110
61
111
-
```yaml
112
-
connector_type: my-connector
113
-
```
114
-
115
-
This adds a property to each synced annotation:
62
+
This adds a property to each synchronized annotation:
116
63
117
64
```json
118
65
{
@@ -124,41 +71,29 @@ This adds a property to each synced annotation:
124
71
}
125
72
```
126
73
127
-
**Why this matters**:
128
-
- Prevents deletion of manually created annotations
129
-
- Enables multiple connectors to manage separate annotation sets
130
-
- Provides clear ownership tracking
74
+
This prevents the deletion of manually created annotations and enables multiple connectors to manage separate annotation sets.
131
75
132
-
## Implementing in Your Connector
76
+
## Usage
133
77
134
-
### 1. Define Position Model (Pydantic BaseModel)
135
-
136
-
External positions **must** be Pydantic `BaseModel` subclasses. This is required for:
137
-
- Type-safe serialization via `model_dump()`
138
-
- Automatic change detection in sync operations
78
+
1. Define a Pydantic model for your external positions. This is required for type-safe serialization via `model_dump()` and automatic change detection in sync operations.
139
79
140
80
```python
141
81
from pydantic import BaseModel
142
82
143
83
classMyPosition(BaseModel):
144
-
"""External system position model (must inherit from BaseModel)."""
84
+
"""External system position model."""
145
85
id: str
146
86
name: str
147
87
x: float
148
88
y: float
149
89
orientation: float
150
90
```
151
91
152
-
### 2. Implement ExternalAnnotationProvider
153
-
154
-
Provides CRUD operations for your external system's positions:
92
+
2. Implement the `ExternalAnnotationProvider` protocol.
0 commit comments