Skip to content

Commit

Permalink
0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nan-Orbbec3d-US committed Aug 8, 2019
1 parent 815b9a8 commit 6c0fb15
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Changelog for package astra_camera
0.3.0 (2019-07-19)
------------
* Add UVC support
* Add OPENNI2 include files under include folder
* Add OPENNI2 include files under include folder
* Add more video modes
* Add useful services to control cameras
* Support Stereo S, Embedded S, and Gemini
* Support Stereo S, Embedded S, and Stereo S U3
* Merge astra_launch package
* 56-orbbec-usb.rules now includes uvc support
* CMakeLists.txt changes accordingly
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ This package provides multiple [ros services](http://wiki.ros.org/Services) for
* `/camera/set_uvc_gain`: set uvc gain
* `/camera/set_uvc_white_balance`: set uvc white balance (set **0** indicating auto mode)
* `/camera/set_ir_flood`: turn on (**true**) or turn off (**false**) ir flood
* `/camera/switch_ir_camera`: while using stereo_s/gemini, you can switch (left/right) ir camera
* `/camera/switch_ir_camera`: while using stereo_s/stereo_s_u3, you can switch (left/right) ir camera

### Examples

Expand Down
4 changes: 2 additions & 2 deletions include/astra_camera/astra_device_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

#define OB_STEREO_S "Orbbec Canglong"
#define OB_EMBEDDED_S "Astra SL1000S_U3"
#define OB_GEMINI "Astra SV1301S_U3"
#define OB_STEREO_S_U3 "Astra SV1301S_U3"
#define OB_ASTRA_PRO "Orbbec Astra Pro"

typedef enum
{
OB_ASTRA_NO,
OB_STEREO_S_NO,
OB_EMBEDDED_S_NO,
OB_GEMINI_NO,
OB_STEREO_S_U3_NO,
OB_ASTRA_PRO_NO
} OB_DEVICE_NO;

Expand Down
4 changes: 3 additions & 1 deletion launch/embedded_s.launch
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
<!-- Disable bond topics by default -->
<arg name="respawn" default="false" />

<arg name="index" default="0" />

<!-- Worker threads for the nodelet manager -->
<arg name="num_worker_threads" default="4" />
<group ns="$(arg camera)">
Expand All @@ -61,7 +63,7 @@
<param name="product" value="0x050b"/>
<param name="serial" value="0"/>
<!-- If the above parameters aren't unique, choose the first match: -->
<param name="index" value="0"/>
<param name="index" value="$(arg index)"/>

<!-- Image size and type -->
<param name="width" value="640"/>
Expand Down
4 changes: 2 additions & 2 deletions launch/multi_astra.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
into the "camera" namespace, and it is prepended to tf frame ids. -->
<arg name="camera" default="camera"/>
<arg name="publish_tf" default="true"/>
<arg name="3d_sensor" default="gemini"/> <!-- gemini, astrapro, astra -->
<arg name="3d_sensor" default="stereo_s_u3"/> <!-- stereo_s_u3, astrapro, astra -->

<arg name="device_1_prefix" default="01"/>
<arg name="device_2_prefix" default="02"/>
<arg name="device_1_id" default="AY053930173"/>
<arg name="device_2_id" default="AY053930051"/>
<arg name="device_2_id" default="AY053930032"/>
<arg name="has_uvc_serial" default="true"/>

<!-- Factory-calibrated depth registration -->
Expand Down
4 changes: 3 additions & 1 deletion launch/stereo_s.launch
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
<!-- Disable bond topics by default -->
<arg name="respawn" default="false" />

<arg name="index" default="0" />

<!-- Worker threads for the nodelet manager -->
<arg name="num_worker_threads" default="4" />
<group ns="$(arg camera)">
Expand All @@ -61,7 +63,7 @@
<param name="product" value="0x0508"/>
<param name="serial" value="0"/>
<!-- If the above parameters aren't unique, choose the first match: -->
<param name="index" value="0"/>
<param name="index" value="$(arg index)"/>

<!-- Image size and type -->
<param name="width" value="640"/>
Expand Down
2 changes: 1 addition & 1 deletion launch/gemini.launch → launch/stereo_s_u3.launch
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<!-- Worker threads for the nodelet manager -->
<arg name="num_worker_threads" default="4" />
<group ns="$(arg camera)">
<node pkg="astra_camera" type="camera_node" name="gemini" output="screen">
<node pkg="astra_camera" type="camera_node" name="stereo_s_u3">
<!-- Parameters used to find the camera -->
<param name="vendor" value="0x2bc5"/>
<param name="product" value="0x0511"/>
Expand Down
6 changes: 3 additions & 3 deletions src/astra_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ AstraDevice::AstraDevice(const std::string& device_URI):
{
device_type_no = OB_EMBEDDED_S_NO;
}
else if (strcmp(device_type, OB_GEMINI) == 0)
else if (strcmp(device_type, OB_STEREO_S_U3) == 0)
{
device_type_no = OB_GEMINI_NO;
device_type_no = OB_STEREO_S_U3_NO;
}
else if (strcmp(device_type, OB_ASTRA_PRO) == 0)
{
Expand Down Expand Up @@ -245,7 +245,7 @@ void AstraDevice::setIRFlood(bool enable)

void AstraDevice::switchIRCamera(int cam)
{
if (device_type_no == OB_STEREO_S_NO || device_type_no == OB_GEMINI_NO)
if (device_type_no == OB_STEREO_S_NO || device_type_no == OB_STEREO_S_U3_NO)
{
openni_device_->setProperty(XN_MODULE_PROPERTY_SWITCH_IR, (uint8_t*)&cam, 4);
}
Expand Down
2 changes: 1 addition & 1 deletion src/astra_device_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

bool astraWithUVC(OB_DEVICE_NO id)
{
if (id == OB_STEREO_S_NO || id == OB_EMBEDDED_S_NO || id == OB_ASTRA_PRO_NO || id == OB_GEMINI_NO)
if (id == OB_STEREO_S_NO || id == OB_EMBEDDED_S_NO || id == OB_ASTRA_PRO_NO || id == OB_STEREO_S_U3_NO)
return true;
return false;
}
4 changes: 2 additions & 2 deletions src/astra_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void AstraDriver::advertiseROSTopics()
reset_ir_gain_server = nh_.advertiseService("reset_ir_gain", &AstraDriver::resetIRGainCb, this);
reset_ir_exposure_server = nh_.advertiseService("reset_ir_exposure", &AstraDriver::resetIRExposureCb, this);
get_camera_info = nh_.advertiseService("get_camera_info", &AstraDriver::getCameraInfoCb, this);
if (device_->getDeviceTypeNo() == OB_STEREO_S_NO || device_->getDeviceTypeNo() == OB_GEMINI_NO)
if (device_->getDeviceTypeNo() == OB_STEREO_S_NO || device_->getDeviceTypeNo() == OB_STEREO_S_U3_NO)
{
switch_ir_camera = nh_.advertiseService("switch_ir_camera", &AstraDriver::switchIRCameraCb, this);
}
Expand Down Expand Up @@ -340,7 +340,7 @@ void AstraDriver::configCb(Config &config, uint32_t level)
}
uvc_flip_ = 1;
}
else if (device_->getDeviceTypeNo() == OB_GEMINI_NO)
else if (device_->getDeviceTypeNo() == OB_STEREO_S_U3_NO)
{
if (config.depth_mode != 13 && config.depth_mode != 14)
{
Expand Down
4 changes: 2 additions & 2 deletions src/libuvc_camera/camera_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ void CameraDriver::ImageCallback(uvc_frame_t *frame) {
{
device_type_no_ = OB_ASTRA_PRO_NO;
}
else if (strcmp(device_type_.c_str(), OB_GEMINI) == 0)
else if (strcmp(device_type_.c_str(), OB_STEREO_S_U3) == 0)
{
device_type_no_ = OB_GEMINI_NO;
device_type_no_ = OB_STEREO_S_U3_NO;
}
else
{
Expand Down

0 comments on commit 6c0fb15

Please sign in to comment.