Skip to content

Commit 34cf4ee

Browse files
committed
Add support for Astra Mini Pro and Astra Mini S Pro
1 parent a55d116 commit 34cf4ee

File tree

9 files changed

+31
-7
lines changed

9 files changed

+31
-7
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ It provides a simple and easy-to-use interface for accessing the Orbbec camera a
77
The v2-main branch is based the open source version of [Orbbec SDK v2](https://github.com/orbbec/OrbbecSDK_v2).
88

99

10-
**If you need to use .NET Framework, please use [this repository](https://github.com/orbbec/OrbbecSDK_CSharp). However, .NET Framework is maintained for bug fixes only, and no new features will be added. We recommend using Orbbec SDK DotNet Wrapper instead**
10+
**If you need to use .NET Framework, please use [this repository](https://github.com/orbbec/OrbbecSDK_CSharp). However, .NET Framework is maintained for bug fixes only, and no new features will be added. We recommend using Orbbec SDK DotNet Wrapper instead.**
1111

1212
# Support Platforms
1313

@@ -27,12 +27,14 @@ The v2-main branch is based the open source version of [Orbbec SDK v2](https://g
2727
| Gemini 330 | 1.2.20 | 1.6.00 | |
2828
| Gemini 330L | 1.2.20 | 1.6.00 | |
2929
| Gemini 335 | 1.2.20 | 1.6.00 | |
30-
| Gemini 335L | 1.2.20 | 1.6.00 |
30+
| Gemini 335L | 1.2.20 | 1.6.00 | |
3131
| Gemini 336 | 1.2.20 | 1.6.00 | |
3232
| Gemini 336L | 1.2.20 | 1.6.00 | |
3333
| Gemini 335Lg | 1.3.46 | 1.6.00 | |
3434
| Femto Bolt | 1.1.2 | 1.1.2 |TODO: Linux is currently not supported due to issues with the depth engine. |
3535
| Femto Mega | 1.3.0 | 1.3.1 | |
36+
| Astra Mini Pro | 2.0.03 | 2.0.03 | |
37+
| Astra Mini S Pro | 2.0.03 | 2.0.03 | |
3638

3739

3840
# Environment Setup

samples/0.basic.quick_start/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static void Main(string[] args)
3131
Console.WriteLine($"Color Profile: {colorProfile.GetWidth()}x{colorProfile.GetHeight()}@{colorProfile.GetFormat()}");
3232

3333
using var depthProfileList = pipe.GetStreamProfileList(SensorType.OB_SENSOR_DEPTH);
34-
using var depthProfile = depthProfileList.GetVideoStreamProfile(0, 0, Format.OB_FORMAT_Y16, 0);
34+
using var depthProfile = depthProfileList.GetVideoStreamProfile(0, 0, Format.OB_FORMAT_UNKNOWN, 0);
3535
Console.WriteLine($"Depth Profile: {depthProfile.GetWidth()}x{depthProfile.GetHeight()}@{depthProfile.GetFormat()}");
3636

3737
config.EnableStream(colorProfile);

samples/1.stream.multi_streams/Program.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ class Program
77
{
88
private static volatile bool _isRunning = true;
99
private static volatile bool _supportIMU = false;
10+
private static bool IsAstraMiniDevice(string pid) =>
11+
pid == "0x069D" || pid == "0x065B" || pid == "0x065E";
1012

1113
static void Main(string[] args)
1214
{
@@ -33,6 +35,14 @@ static void Main(string[] args)
3335

3436
foreach (var sensorType in availableTypes)
3537
{
38+
if(sensorType == SensorType.OB_SENSOR_IR)
39+
{
40+
if (IsAstraMiniDevice(device.GetDeviceInfo().Pid()))
41+
{
42+
continue;
43+
}
44+
}
45+
3646
if (sensorType == SensorType.OB_SENSOR_COLOR)
3747
{
3848
try

samples/2.device.record/Program.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ class Program
77
{
88
private static volatile bool _isRunning = true;
99
private static volatile bool _isPaused = false;
10+
private static bool IsAstraMiniDevice(string pid) =>
11+
pid == "0x069D" || pid == "0x065B" || pid == "0x065E";
1012

1113
static void Main(string[] args)
1214
{
@@ -69,6 +71,14 @@ static void Main(string[] args)
6971
continue;
7072
}
7173

74+
if (sensorType == SensorType.OB_SENSOR_IR)
75+
{
76+
if (IsAstraMiniDevice(device.GetDeviceInfo().Pid()))
77+
{
78+
continue;
79+
}
80+
}
81+
7282
if (sensorType == SensorType.OB_SENSOR_COLOR)
7383
{
7484
try

samples/3.advanced.coordinate_transform/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static void Main(string[] args)
2323
pipe = new Pipeline();
2424
using var config = new Config();
2525

26-
config.EnableVideoStream(StreamType.OB_STREAM_DEPTH, 0, 0, 0, Format.OB_FORMAT_Y16);
26+
config.EnableVideoStream(StreamType.OB_STREAM_DEPTH, 0, 0, 0, Format.OB_FORMAT_UNKNOWN);
2727
config.EnableVideoStream(StreamType.OB_STREAM_COLOR, 0, 0, 0, Format.OB_FORMAT_RGB);
2828

2929
config.SetFrameAggregateOutputMode(FrameAggregateOutputMode.OB_FRAME_AGGREGATE_OUTPUT_ALL_TYPE_FRAME_REQUIRE);

samples/3.advanced.hdr/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ static void Main(string[] args)
2929

3030
if (!device.IsPropertySupported(PropertyId.OB_STRUCT_DEPTH_HDR_CONFIG, PermissionType.OB_PERMISSION_READ_WRITE))
3131
{
32+
device?.Dispose();
33+
device = null;
3234
Console.WriteLine("Current default device does not support HDR merge");
3335
return;
3436
}

samples/3.advanced.point_cloud/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ static void Main(string[] args)
1414
{
1515
pipe = new Pipeline();
1616
using var config = new Config();
17-
config.EnableVideoStream(StreamType.OB_STREAM_DEPTH, 0, 0, 0, Format.OB_FORMAT_Y16);
17+
config.EnableVideoStream(StreamType.OB_STREAM_DEPTH, 0, 0, 0, Format.OB_FORMAT_UNKNOWN);
1818
config.EnableVideoStream(StreamType.OB_STREAM_COLOR, 0, 0, 0, Format.OB_FORMAT_RGB);
1919
config.SetFrameAggregateOutputMode(FrameAggregateOutputMode.OB_FRAME_AGGREGATE_OUTPUT_ALL_TYPE_FRAME_REQUIRE);
2020

samples/3.advanced.post_processing/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static void Main(string[] args)
3333
PrintFiltersInfo(filterList);
3434

3535
using var config = new Config();
36-
config.EnableVideoStream(StreamType.OB_STREAM_DEPTH, 0, 0, 0, Format.OB_FORMAT_Y16);
36+
config.EnableVideoStream(StreamType.OB_STREAM_DEPTH, 0, 0, 0, Format.OB_FORMAT_UNKNOWN);
3737

3838
pipe.Start(config);
3939

samples/3.advanced.sync_align/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static void Main(string[] args)
3030

3131
using var config = new Config();
3232
config.EnableVideoStream(StreamType.OB_STREAM_COLOR, 0, 0, 0, Format.OB_FORMAT_RGB);
33-
config.EnableVideoStream(StreamType.OB_STREAM_DEPTH, 0, 0, 0, Format.OB_FORMAT_Y16);
33+
config.EnableVideoStream(StreamType.OB_STREAM_DEPTH, 0, 0, 0, Format.OB_FORMAT_UNKNOWN);
3434
config.SetFrameAggregateOutputMode(FrameAggregateOutputMode.OB_FRAME_AGGREGATE_OUTPUT_ALL_TYPE_FRAME_REQUIRE);
3535

3636
pipe.Start(config);

0 commit comments

Comments
 (0)