Skip to content

Commit 4c6f4df

Browse files
committed
Add files and instructions to install pose estimators as flowstate services
Signed-off-by: Yadunund <[email protected]>
1 parent 2f272e1 commit 4c6f4df

File tree

5 files changed

+767
-0
lines changed

5 files changed

+767
-0
lines changed

flowstate/services/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bpc_pose_estimator.tar
2+
bpc_pose_estimator.bundle.tar
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
# Use the bpc pose estimator image as the base image.
3+
ARG BASE_IMAGE=bpc_pose_estimator:example
4+
5+
FROM ${BASE_IMAGE}
6+
7+
# Copy the zenoh config file.
8+
# TODO(Yadunund): Switch to ZENOH_CONFIG_OVERRIDE after the next jazzy sync.
9+
COPY zenoh_config.json5 /opt/zenoh_config.json5
10+
11+
# Set environment variables
12+
ENV ZENOH_SESSION_CONFIG_URI=/opt/zenoh_config.json5
13+
ENV ZENOH_ROUTER_CHECK_ATTEMPTS=5
14+
# (Optional) If you need to override the entrypoint or command, do it here.
15+
# For example:
16+
# ENTRYPOINT ["/your/new/entrypoint.sh"]
17+
# CMD ["your", "new", "command"]

flowstate/services/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## Flowstate Service
2+
3+
The Pose Estimators developed can be run as a service on the [Intrinsic Flowstate](https://www.intrinsic.ai/) to build application with robotic systems.
4+
5+
First build another Docker image that wraps the pose estimator Docker image generated [previously](../README.md#build-and-test-custom-bpc_pose_estimator-image) with some environment variables to communicate with the Intrinsic Platform.
6+
7+
```bash
8+
# Replace "bpc_pose_estimator_fs:team_name" with a different tag if needed.
9+
cd ~/bpc_ws/bpc/flowstate
10+
docker buildx build -t bpc_pose_estimator_fs:team_name \
11+
--file Dockerfile.service \
12+
--build-arg BASE_IMAGE=<POSE_ESTIMATOR_DOCKER_TAG> \
13+
.
14+
15+
```
16+
17+
Next, save this Docker image locally. Note, the name of the output file must remain `bpc_pose_estimator.tar`.
18+
19+
```bash
20+
docker save bpc_pose_estimator_fs:example -o bpc_pose_estimator.tar
21+
22+
```
23+
24+
Then build a Flowstate Service bundle that can be loaded into a solution.
25+
26+
```bash
27+
cd ~/
28+
git clone https://github.com/intrinsic-ai/sdk.git
29+
cd sdk
30+
bazel run //intrinsic/tools/inbuild -- service bundle \
31+
--manifest ~/bpc_ws/src/bpc/services/flowstate/bpc_pose_estimator.manifest.textproto \
32+
--oci_image ~/bpc_ws/src/bpc/services/flowstate/bpc_pose_estimator.tar \
33+
--output ~/bpc_ws/src/bpc/services/flowstate/bpc_pose_estimator.bundle.tar
34+
```
35+
36+
Finally install the Service in a running solution.
37+
38+
```bash
39+
bazel run //intrinsic/tools/inctl -- service install ~/bpc_ws/src/bpc/services/flowstate/bpc_pose_estimator.bundle.tar \
40+
--cluster CLUSTER_ID \
41+
--org ORG \
42+
--registry=REGISTRY \
43+
--skip_direct_upload
44+
```
45+
46+
To uninstall the Service,
47+
48+
```bash
49+
bazel run //intrinsic/tools/inctl -- service uninstall \
50+
--solution SOLUTION_ID \
51+
--org ORG ai.intrinsic.bpc_pose_estimator
52+
```
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
metadata {
2+
id {
3+
package: "ai.intrinsic"
4+
name: "bpc_pose_estimator"
5+
}
6+
vendor {
7+
display_name: "Intrinsic"
8+
}
9+
documentation {
10+
description: "A 6D pose estimator for objects in the BPC challenge."
11+
}
12+
display_name: "BPC Pose Estimator"
13+
}
14+
service_def {
15+
real_spec {
16+
image {
17+
archive_filename: "bpc_pose_estimator.tar"
18+
}
19+
}
20+
sim_spec {
21+
image {
22+
archive_filename: "bpc_pose_estimator.tar"
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)