小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
奥比中光深度相机ros2 humble安装测试分享
-
奥比中光官网只有ros2 galactic安装例子,我测试了一下,在humble也能用,下面介绍一下安装方法。
ros2 humble版本安装用小鱼的一键安装,这里不再介绍,下面是一键安装网址:
https://fishros.org.cn/forum/topic/20/小鱼的一键安装系列
我只介绍奥比中光代码在humble里面的安装方法● 安装依赖
sudo apt install libgflags-dev nlohmann-json3-dev
ros-humble-image-transport ros-humble-image-publisher● 安装glog
wget -c https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz -O glog-0.6.0.tar.gz
tar -xzvf glog-0.6.0.tar.gz
cd glog-0.6.0
mkdir build && cd build
cmake .. && make -j4
sudo make install
sudo ldconfig # 刷新链接库● 安装magic_enum
wget -c https://github.com/Neargye/magic_enum/archive/refs/tags/v0.8.0.tar.gz -O magic_enum-0.8.0.tar.gz
tar -xzvf magic_enum-0.8.0.tar.gz
cd magic_enum-0.8.0
mkdir build && cd build
cmake .. && make -j4
sudo make install
sudo ldconfig # 刷新链接库● 安装libuvc
git clone https://github.com/libuvc/libuvc.git
cd libuvc
mkdir build && cd build
cmake .. && make -j4
sudo make install
sudo ldconfig # 刷新链接库使用
用例● 新建ros2 workspace
mkdir -p ~/ros2_ws/src
● 将openNISDk_ROS2_xxx.tar.gz解压并复制到 ~/ros2_ws/src/
下载地址: https://developer.orbbec.com.cn/download.html?id=180
● 安装libusb rulescd ~/ros2_ws/src/ros2_astra_camera/astra_camera/scripts
sudo bash install.sh
sudo udevadm control --reload-rules && sudo udevadm trigger● 编译
cd ~/ros2_ws
source /opt/ros/humble/setup.bash
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=Release启动相机
● 在terminal 1
source /opt/ros/humble/setup.bash
source ./install/setup.bash
ros2 launch astra_camera astra_mini.launch.py● 在terminal 2
source /opt/ros/humble/setup.bash
source ./install/setup.bash
rviz2 -d src/ros2_astra_camera/astra_camera/rviz/pointcloud.rviz在rviz2中的深度图像
转载于:
https://developer.orbbec.com.cn/technical_library.html?id=61 -
你好,我运行launch文件会出现以下问题,这是怎么回事?
root@orangepi5:/home/orangepi/ros2_ws# ros2 launch astra_camera gemini.launch.py
[INFO] [launch]: All log files can be found below /root/.ros/log/2023-12-27-17-07-36-782376-orangepi5-20968
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [component_container-1]: process started with pid [20980]
[component_container-1] [INFO] [1703668057.436442354] [astra_camera_container]: Load Library: /home/orangepi/ros2_ws/install/astra_camera/lib/libastra_camera.so
[component_container-1] [INFO] [1703668058.893851663] [astra_camera_container]: Found class: rclcpp_components::NodeFactoryTemplate<astra_camera::OBCameraNodeFactory>
[component_container-1] [INFO] [1703668058.894184740] [astra_camera_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<astra_camera::OBCameraNodeFactory>
[component_container-1] [INFO] [1703668058.986299688] [device_listener]: onDeviceConnected
[component_container-1] [INFO] [1703668058.986390395] [camera.camera]: Device connected: Astra
[component_container-1] [INFO] [1703668058.986604766] [camera.camera]: Waiting for device to be ready
[component_container-1] [INFO] [1703668058.986847428] [camera.camera]: Trying to open device: 2bc5/0614@7/4
[component_container-1] [INFO] [1703668059.068997312] [camera.camera]: Device connected: Astra serial number: AY2FC22009A
[component_container-1] [INFO] [1703668059.069367430] [camera.camera]: starting device
[component_container-1] [INFO] [1703668059.165329014] [camera.camera]: open uvc camera
[component_container-1] [INFO] [1703668059.253122543] [camera.camera]: uvc config: vendor_id: 2bc5
[component_container-1] product_id: 511
[component_container-1] width: 640
[component_container-1] height: 480
[component_container-1] fps: 30
[component_container-1] serial_number:
[component_container-1] format: mjpeg
[component_container-1] frame_id: camera_color_frame
[component_container-1] optical_frame_id : camera_color_optical_frame
[component_container-1]
[component_container-1] unsupported descriptor subtype VS_COLORFORMAT
[component_container-1] [INFO] [1703668059.415385057] [camera.camera]: color is not enable
[component_container-1] [INFO] [1703668059.426383894] [camera.camera]: set depth video mode Resolution :320x200@30Hz
[component_container-1] format PIXEL_FORMAT_DEPTH_1_MM
[component_container-1] [INFO] [1703668059.429484544] [camera.camera]: set ir video mode Resolution :640x400@30Hz
[component_container-1] format
[ERROR] [component_container-1]: process has died [pid 20980, exit code -11, cmd '/opt/ros/humble/lib/rclcpp_components/component_container --ros-args -r __node:=astra_camera_container -r __ns:=/']. -
@3178261305 我也遇到这个问题,你解决了吗,我是ubuntu22版本的nvidia开发板上遇到这个问题
-
@358827115 可能是usb接口供电不足
-
感谢分享,这篇文章对我的帮助很大