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 flowstate/services/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bpc_pose_estimator.tar
bpc_pose_estimator.bundle.tar
16 changes: 16 additions & 0 deletions flowstate/services/Dockerfile.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Use the bpc pose estimator image as the base image.
ARG BASE_IMAGE=bpc_pose_estimator:example

FROM ${BASE_IMAGE}

# Copy the zenoh config file.
# TODO(Yadunund): Switch to ZENOH_CONFIG_OVERRIDE after the next jazzy sync.
COPY zenoh_config.json5 /opt/zenoh_config.json5

# Set environment variables
ENV ZENOH_SESSION_CONFIG_URI=/opt/zenoh_config.json5
ENV ZENOH_ROUTER_CHECK_ATTEMPTS=5
# (Optional) If you need to override the entrypoint or command, do it here.
# For example:
# ENTRYPOINT ["/your/new/entrypoint.sh"]
# CMD ["your", "new", "command"]
53 changes: 53 additions & 0 deletions flowstate/services/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
## Flowstate Service

The Pose Estimators developed can be run as a service on [Intrinsic Flowstate](https://www.intrinsic.ai/) solutions to build applications with robotic systems.

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.

```bash
# Replace POSE_ESTIMATOR_DOCKER_TAG with tag of the pose estimator image generated previously.
# Replace "bpc_pose_estimator_fs:team_name" with a different tag if needed.
cd ~/bpc_ws/bpc/flowstate
docker buildx build -t bpc_pose_estimator_fs:team_name \
--file Dockerfile.service \
--build-arg BASE_IMAGE=<POSE_ESTIMATOR_DOCKER_TAG> \
.

```

Next, save this Docker image locally. Note, the name of the output file must remain `bpc_pose_estimator.tar`.

```bash
docker save bpc_pose_estimator_fs:example -o bpc_pose_estimator.tar

```

Then build a Flowstate Service bundle.

```bash
cd ~/
git clone https://github.com/intrinsic-ai/sdk.git
cd sdk
bazel run //intrinsic/tools/inbuild -- service bundle \
--manifest ~/bpc_ws/src/bpc/services/flowstate/bpc_pose_estimator.manifest.textproto \
--oci_image ~/bpc_ws/src/bpc/services/flowstate/bpc_pose_estimator.tar \
--output ~/bpc_ws/src/bpc/services/flowstate/bpc_pose_estimator.bundle.tar
```

Finally install the Service in a running solution.

```bash
bazel run //intrinsic/tools/inctl -- service install ~/bpc_ws/src/bpc/services/flowstate/bpc_pose_estimator.bundle.tar \
--cluster CLUSTER_ID \
--org ORG \
--registry REGISTRY \
--skip_direct_upload
```

To uninstall the Service,

```bash
bazel run //intrinsic/tools/inctl -- service uninstall ai.intrinsic.bpc_pose_estimator \
--solution SOLUTION_ID \
--org ORG
```
25 changes: 25 additions & 0 deletions flowstate/services/bpc_pose_estimator.manifest.textproto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
metadata {
id {
package: "ai.intrinsic"
name: "bpc_pose_estimator"
}
vendor {
display_name: "Intrinsic"
}
documentation {
description: "A 6D pose estimator for objects in the BPC challenge."
}
display_name: "BPC Pose Estimator"
}
service_def {
real_spec {
image {
archive_filename: "bpc_pose_estimator.tar"
}
}
sim_spec {
image {
archive_filename: "bpc_pose_estimator.tar"
}
}
}
Loading
Loading