Use Orbbec cameras compatible with v2 of the Orbbec CPP SDK. This module provides access to the color and depth sensors and creates pointclouds from them.
- Darwin ARM64
- Linux x64: Ubuntu 24.04
- Linux ARM64: NVIDIA Jetson AGX Orin, NVIDIA Jetson Orin NX, NVIDIA Jetson Orin Nano, NVIDIA Jetson AGX Xavier, NVIDIA Jetson Xavier NX
- Windows AMD64: Windows 11
Official Orbbec Astra 2 Camera Webpage.
The following attribute template can be used to configure this model:
{
"serial_number": "AARY14100EF",
"sensors": {
"depth": {
"height": 1200,
"width": 1600,
"format": "Y16"
},
"color": {
"width": 1920,
"height": 1080,
"format": "RGB"
}
}
}The following attributes are available for the Astra 2 model:
| Name | Type | Inclusion | Description |
|---|---|---|---|
serial_number |
string | Required | The serial number of the specific Orbbec camera to use. This number is printed on the device. The serial number of each plugged-in and available orbbec camera will be logged on module startup. |
sensors |
struct | Optional | The configuration of the color and depth sensors. If set, it must contain both color and depth, each with all of the sensor attributes below. |
| Name | Type | Inclusion | Description |
|---|---|---|---|
height |
int | Required | Native camera sensor height in pixels |
width |
int | Required | Native camera sensor width in pixels |
format |
string | Required | Native camera format |
| Sensor | Formats |
|---|---|
color |
MJPG, RGB |
depth |
Y16 |
| Color | Depth |
|---|---|
1920x1080 |
1600x1200, 800X600, 400X300 |
1440X1080 |
1600x1200, 800X600, 400X300 |
1280X720 |
1600x1200, 800X600, 400X300 |
800X600 |
800X600, 400X300 |
640X480 |
800X600, 400X300 |
640X360 |
800X600, 400X300 |
Official Orbbec Gemini 335Le Camera Webpage.
The following attribute template can be used to configure this model:
{
"serial_number": "AARY14100EF",
"sensors": {
"depth": {
"height": 1200,
"width": 1600,
"format": "Y16"
},
"color": {
"width": 1920,
"height": 1080,
"format": "MJPG"
}
}
}The following attributes are available for the Gemini 335Le model:
| Name | Type | Inclusion | Description |
|---|---|---|---|
serial_number |
string | Required | The serial number of the specific Orbbec camera to use. This number is printed on the device. The serial number of each plugged-in and available orbbec camera will be logged on module startup. |
sensors |
struct | Optional | The configuration of the color and depth sensors. If set, it must contain both color and depth, each with all of the sensor attributes below. |
| Name | Type | Inclusion | Description |
|---|---|---|---|
height |
int | Required | Native camera sensor height in pixels |
width |
int | Required | Native camera sensor width in pixels |
format |
string | Required | Native camera format |
| Sensor | Formats |
|---|---|
color |
MJPG |
depth |
Y16 |
| Color | Depth |
|---|---|
1280X800 |
1280X800, 848X530, 640X400, 424X266, 320X200 |
848X530 |
640X400, 424X266, 320X200 |
640X400 |
640X400, 424X266, 320X200 |
640X480 |
640X480 |
get_images supports two source names for use with filter_source_names:
| Source Name | MIME Type | Description |
|---|---|---|
color |
image/jpeg or image/png |
Color image from the RGB sensor |
depth |
image/vnd.viam.dep |
Depth map from the depth sensor |
If filter_source_names is empty, both color and depth images are returned. If populated, only the matching source names are returned. Unrecognized names are ignored.
A call to get_attributes will return the camera attributes in this struct
Bear in mind that the distortion parameters contained in that struct are not named, i.e. they are contained in a vector of doubles. So they must be parsed following the order in which they are being stored, which is as follows:
| index | parameter |
|---|---|
| 0 | k1 |
| 1 | k2 |
| 2 | k3 |
| 3 | k4 |
| 4 | k5 |
| 5 | k6 |
| 6 | p1 |
| 7 | p2 |
You can use DoCommand to upgrade the firmware of your device to the required version.
Update the astra 2 firmware to v2.8.20 and gemini_335le to v1.5.55. If running on macOS, you must manually unplug and replug the device after this returns. WARNING: Do not unplug the device while the firmware update is in progress.
{ "update_firmware": "" }
This model is used to locate orbbec cameras connected to your machine. No configuration is needed. Expand the test card or look at the discovery control card to obtain configurations for all connected Orbbecs.
Unable to connect to camera
The first_run.sh script included in this module should automatically install the udev rules for connecting to the camera on Linux devices.
If there is an issue, try copying 99-obsensor-libusb.rules in the root directory of this repo to /etc/udev/rules.d/ on the Viam machine and calling the following command on the system:
sudo udevadm control --reload-rules && sudo udevadm trigger
When running on macos, viam-server must be run with sudo in order to have sufficient permissions to call uvc_open.
canon make setupcanon makecanon make buildThe integration tests in tests/ start the module under viam-server and call the camera API. They run against a camera, or against a recording when no camera is available.
-
Build the module and the test binary:
canon make setup canon make build canon make orbbec-test-bin
-
Run the tests.
make buildplaces the module binary inbuild-conan/build/RelWithDebInfo../orbbec-test-bin --module <PATH_TO_LOCAL_MODULE> --serial_number <YOUR_CAMERA_SERIAL_NUMBER>
--module: Path to the module executable.--serial_number: The serial number of your Orbbec camera. It is on a sticker on Astra 2 devices and is logged on module startup.--sensors: Optional JSON for the camera'ssensorsattribute. Without it the module defaults apply.
CI runs the same tests against a short recording of an Astra 2, tests/testdata/astra2_640x480_400x300_10fps.bag. The recording is stored in Git LFS, so fetch it first:
git lfs pull
make module.tar.gz
make integration-test-playbackThe tests that read or write device properties are skipped, because a recording has none.
The tests pass --playback_bag, which sets VIAM_ORBBEC_PLAYBACK_BAG for the module. That variable is for testing only: when it is set, the module serves the recording as its only device, ignores any connected camera, and logs a warning at startup.