# astra_camera
The ros_astra_camera package is an OpenNI2 ROS wrapper created for Orbbec 3D cameras.
This package allows the usage of Orbbec 3D cameras with ROS Kinetic, Melodic, and Noetic distributions
## Install dependencies
### ROS
- Please refer directly to ROS [wiki](http://wiki.ros.org/ROS/Installation).
### other dependencies
- Install dependencies (be careful with your ROS distribution)
```bash
# Assuming you have sourced the ros environment, same below
sudo apt install libgflags-dev ros-$ROS_DISTRO-image-geometry ros-$ROS_DISTRO-camera-info-manager\
ros-$ROS_DISTRO-image-transport ros-$ROS_DISTRO-image-publisher libgoogle-glog-dev libusb-1.0-0-dev libeigen3-dev
```
- Install libuvc.
```bash
git clone https://github.com/libuvc/libuvc.git
cd libuvc
mkdir build && cd build
cmake .. && make -j4
sudo make install
sudo ldconfig
```
## Getting start
- Create a ros workspace( if you don't have one).
```bash
mkdir -p ~/ros_ws/src
```
- Clone code from github.
```bash
cd ~/ros_ws/src
git clone https://github.com/orbbec/ros_astra_camera.git
```
- Build
```bash
cd ~/ros_ws
catkin_make
```
- Install udev rules.
```bash
cd ~/ros_ws
source ./devel/setup.bash
roscd astra_camera
./scripts/create_udev_rules
sudo udevadm control --reload && sudo udevadm trigger
```
Start the camera
- In terminal 1
```bash
source ./devel/setup.bash
roslaunch astra_camera astra.launch
```
- In terminal 2
```bash
source ./devel/setup.bash
rviz
```
Select the topic you want to display
- Check topics / services/ parameters (open a new terminal)
```bash
rostopic list
rosservice list
rosparam list
```
- Check camera extrinsic parameter(from depth to color)
```bash
rostopic echo /camera/extrinsic/depth_to_color
```
- Get camera parameter
```bash
rosservice call /camera/get_camera_params "{}"
```
- Check camera parameter, please refer to the ROS documentation for the meaning of the specific fields of the camera
parameter [camera info](http://docs.ros.org/en/melodic/api/sensor_msgs/html/msg/CameraInfo.html)
```bash
rostopic echo /camera/depth/camera_info
rostopic echo /camera/color/camera_info
```
- Check device information
```bash
rosservice call /camera/get_device_info "{}"
```
- Get the SDK version (Include firmware and OpenNI version )
```bash
rosservice call /camera/get_version "{}"
```
- Set/get (auto) exposure
```bash
rosservice call /camera/set_color_auto_exposure '{data: false}'
rosservice call /camera/set_uvc_auto_exposure '{data: false}'
rosservice call /camera/set_ir_auto_exposure "{data: false}"
# Setting exposure values (Be careful with the data range, the following example may not be correct.)
rosservice call /camera/set_ir_exposure "{data: 2000}"
roservice call /camera/set_color_exposure "{data: 2000}"
rosservice call /camera/set_uvc_exposure "{data: 2000}"
# Get exposure
rosservice call /camera/get_ir_exposure "{}"
rosservice call /camera/get_color_exposure "{}"
rosservice call /camera/get_uvc_exposure "{}"
```
- Set/get gain
```bash
# Get Gain
rosservice call /camera/get_color_gain '{}' # OpenNI camera
rosservice call /camera/get_ir_gain '{}' # OpenNI camera
rosservice call /camera/get_uvc_gain "{}" # UVC camera
# Setting the gain (Be careful with the data range, the following example may not be correct.)
rosservice call /camera/set_color_gain "{data: 200}"
rosservice call /camera/set_ir_gain "{data: 200}"
roservice call /camera/set_uvc_gain "{data: 200}"
```
- Set/get mirror
```bash
rosservice call /camera/set_color_mirror "{data: true}"
rosservice call /camera/set_depth_mirror "{data: true}"
rosservice call /camera/set_ir_mirror "{data: true}"
rosservice call /camera/set_uvc_mirror "{data: true}"
```
- Set/get (auto) white balance
```bash
rosservice call /camera/set_uvc_auto_white_balance "{data: false}"
#(Be careful with the data range, the following example may not be correct.)
rosservice call /camera/set_uvc_white_balance "{data: 200}"
```
- Turn on/off laser
```bash
rosservice call /camera/set_laser '{data: true}' # Turn on
rosservice call /camera/set_laser '{data: false}' # Turn off
```
- Turn on/off fans
```bash
rosservice call /camera/set_fan '{data: true}' # Turn on
rosservice call /camera/set_fan '{data: false}' # Turn off
```
- Turn on/off LDP
```bash
rosservice call /camera/set_ldp '{data: true}'
rosservice call /camera/set_ldp '{data: false}'
```
- Turn on/off sensors
```bash
rosservice call /camera/toggle_ir "{data: true}"
rosservice call /camera/toggle_color "{data: true}"
rosservice call /camera/toggle_depth "{data: true}"
rosservice call /camera/toggle_uvc_camera "{data : true}"
```
- Save image
```bash
rosservice call /camera/save_images "{}"
```
For dabai and dabai dcw (RGB camera is UVC protocol), run:
```bash
rosservice call /camera/save_uvc_image "{}"
```
NOTE: The images are saved under ~/.ros/image and are only available when the sensor is on.
- Save point cloud
```bash
rosservice call /camera/save_point_cloud_xyz "{}" # xyz
rosservice call /camera/save_point_cloud_xyz_rgb "{}" # xyzrgb
```
NOTE: Point cloud are only available if it is running and saved under ~/.ros/point_cloud.
### **Multiple cameras**
- First, you need to enumerate the serial number of the camera, plug in the cameras,
and run the following command:
```bash
roslaunch astra_camera list_devices.launch
```
- **Set the parameter `device_num` to the number of cameras**
- Next, go to ros_astra_camera/launch/multi_xxx.launch and change the serial number. Currently, the different cameras can only be distinguished by the serial number.
```
<launch>
<!-- unique camera name-->
<arg name="camera_name" default="camera"/>
<!-- Hardware depth registration -->
<arg name="3d_sensor" default="astra"/>
<!-- stereo_s_u3, astrapro, astra -->
<arg name="camera1_prefix" default="01"/>
<arg name="camera2_prefix" default="02"/>
<arg name="camera1_serila_number" default="AALXB1301YW"/>
<arg name="camera2_serila_number" default="AD7J7230031"/>
<arg name="device_num" default="2"/>
<include file="$(find astra_camera)/launch/$(arg 3d_sensor).launch">
<arg name="camera_name" value="$(arg camera_name)_$(arg camera1_prefix)"/>
<arg name="serial_number" value="$(arg camera1_serila_number)"/>
<arg name="device_num" value="$(arg device_num)"/>
</include>
<include file="$(find astra_camera)/launch/$(arg 3d_sensor).launch">
<arg name="camera_name" value="$(arg camera_name)_$(arg camera2_prefix)"/>
<arg name="serial_number" value="$(arg camera2_serila_number)"/>
<arg name="device_num" value="$(arg device_num)"/>
</include>
<node pkg="tf2_ros" type="static_transform_publisher" name="camera_tf" args="0 0 0 0 0 0 camera01_link camera02_link"/>
</launch>
```
- The Astra camera will use a semaphore for process synchronization. If the camera fails to start, the semaphore file may be left in the /dev/shm, causing the next start to get stuck. To prevent this issue, please run the following command before launching:
```bash
rosrun astra_camera cleanup_shm_node
```
This command will clean up all semaphore files in the /dev/shm directory, ensuring that the camera will not get stuck during the next start.
- Launch
``` bash
roslaunch astra_camera multi_astra.launch
```
## Use calibration camera parameter
- Set camera info uri, Go to `xxx.launch`
```xml
<launch>
<!--...-->
<arg name="ir_info_uri" default="file:///you_ir_camera_calib_path/depth_camera.yaml"/>
<arg name="color_info_uri" default="file:///you_depth_camera_calib_path/rgb_camera.yaml"/>
<!--...-->
</launch>
```
- calibration file should like
```yaml
image_width: 640
image_height: 480
# The camera name is fixed. The color camera is rgb_camera, the depth/IR camera name is ir_camera
camera_name: rgb_camera
camera_matrix:
rows: 3
cols: 3
data: [517.301, 0, 326.785, 0, 519.291, 244.563, 0,
没有合适的资源?快使用搜索试试~ 我知道了~
奥比中光Astra驱动安装包
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共129个文件
h:36个
launch:22个
cpp:13个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
需积分: 0 2 下载量 194 浏览量
2024-05-25
21:20:27
上传
评论
收藏 5.24MB ZIP 举报
温馨提示
astra驱动安装包
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083646.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![txt](https://img-home.csdnimg.cn/images/20210720083642.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 129 条
- 1
- 2
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/5a8c0b5f449c4813900201ed94a16ce5_2301_80467135.jpg!1)
资深可爱鉴定师
- 粉丝: 29
- 资源: 2
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
- JAVA-线程的入门记录
- Python毕设基于Django网络在线求职招聘网站+源代码+文档说明+数据库.zip
- Python基于Django网络在线求职招聘网站+源代码+文档说明+数据库.zip
- 春节主题社交媒体情绪分析电商销售分析*新闻媒体报道分析
- 实验2 修改表结构和插入记录.docx
- Dockerfile: Ubuntu18.04 + Python3.10
- Invicti Professional v24.6.0
- Python毕业设计-基于深度学习的水果识别系统的源代码+文档说明+数据集+模型(高分项目)
- YOLO 一种流行的实时目标检测算法快速且准确地检测图像中的对象
- PyTorch 开源的机器学习框架结合了动态计算图的灵活性和深度学习库的强大功能
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)