修改于2019年8月26号!!!:遇到這個問題現在建議大家去看一下我的另一篇部落格:
https://blog.csdn.net/qq_36219010/article/details/100084777
前幾天在x寶上買了個樂視的體感三合一攝像頭(astra pro套了個外殼),白菜價。拿回來按照這裡:(https://github.com/orbbec/ros_astra_camera)給的教程裝上了,然而卻隻能顯示IR ,和depth圖像,color image 不顯示。逛論壇,逛git。來來回回折騰了有兩天,還沒結果。最後按照Dear.L大佬的方法,解決了,終于出圖像了。現在趁熱重新梳理一下過程,幹啥都得趁熱丫。首先假設已經安裝好ros。
1 安裝依賴項
sudo apt install ros-$ROS_DISTRO-rgbd-launch ros-$ROS_DISTRO-libuvc ros-$ROS_DISTRO-libuvc-camera ros-$ROS_DISTRO-libuvc-ros
2 建立工作空間
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make
3 git clone 代碼
cd ~/catkin_ws/src
git clone https://github.com/orbbec/ros_astra_camera
4 Create astra udev rule(這裡中文翻譯好别扭感覺就粘過來了)
roscd astra_camera
sudo sh ./scripts/create_udev_rules
5 編譯源碼包
cd ~/catkin_ws
catkin_make --pkg astra_camera
6 修改astra.launch的代碼
cd 到/catkin_ws/src/ros_astra_camera/launch
vim astra.launch
直接到翻到最後面,複制以下代碼到“< /launch >”的前面。
<node pkg="uvc_camera" type="uvc_camera_node" name="uvc_camera" output="screen" />
<param name="width" type="int" value="320" />
<param name="height" type="int" value="240" />
<param name="fps" type="int" value="30" />
<param name="frame" type="string" value="wide_stereo" />
<param name="auto_focus" type="bool" value="False" />
<param name="focus_absolute" type="int" value="0" />
<!-- other supported params: auto_exposure, exposure_absolute, brightness, power_line_frequency -->
<param name="device" type="string" value="/dev/video2" />
<param name="camera_info_url" type="string" value="file://$(find uvc_camera)/example.yaml" />
7 直接啟動launch
source ~/catkin_ws/devel/setup.bash
roslaunch astra_camera astra.launch
啟動rviz
rviz
現在在rviz中應該可以看到color圖像了。

最後還是非常感謝原文作者,Dear.L大佬給的啟動代碼。