ar_track_alvar
sudo apt-get install ros-melodic-ar-track-alvar
测试
rosrun ar_track_alvar createMarker
sudo apt install ros-$ROS_DISTRO-rgbd-launch ros-$ROS_DISTRO-libuvc ros-$ROS_DISTRO-libuvc-camera ros-$ROS_DISTRO-libuvc-ros
git clone https://gitee.com/kay2020/ros_astra_launch.git git clone https://gitee.com/kay2020/ros_astra_camera.git
奥比中光
#check udev version, Orbbec Driver need libudev.so.1, if can't find it, can make symbolic link from libudev.so.x.x, #which usually locate in /lib/aarch64-linux-gnu ldconfig -p | grep libudev.so.1 cd /lib/aarch64-linux-gnu sudo ln -s libudev.so.x.x.x libudev.so.1
下载安装驱动
unzip OpenNI-Linux-Arm64-2.3.zip cd OpenNI-Linux-Arm64-2.3 sudo chmod a+x install.sh sudo ./install.sh source OpenNIDevEnvironment
vim /etc/udev/rules.d/orbbec-usb.rules
SUBSYSTEM==“usb”, ATTR{idProduct}“0401”, ATTR{idVendor}“2bc5”, MODE:=“0666”, OWNER:=“root”, GROUP:=“video”, SYMLINK+=“astra” SUBSYSTEM==“usb”, ATTR{idProduct}“0402”, ATTR{idVendor}“2bc5”, MODE:=“0666”, OWNER:=“root”, GROUP:=“video”, SYMLINK+=“astra_s” SUBSYSTEM==“usb”, ATTR{idProduct}“0403”, ATTR{idVendor}“2bc5”, MODE:=“0666”, OWNER:=“root”, GROUP:=“video”, SYMLINK+=“astra_pro” SUBSYSTEM==“usb”, ATTR{idProduct}“0404”, ATTR{idVendor}“2bc5”, MODE:=“0666”, OWNER:=“root”, GROUP:=“video”, SYMLINK+=“astra_mini” SUBSYSTEM==“usb”, ATTR{idProduct}“0407”, ATTR{idVendor}“2bc5”, MODE:=“0666”, OWNER:=“root”, GROUP:=“video”, SYMLINK+=“astra_mini_s”
sudo service udev reload sudo service udev restart
插拔相机
rosrun image_view image_view image:=/camera/depth/image_raw rosrun image_view image_view image:=/camera/rgb/image_raw
RGB图像
sudo apt-get install libv4l-dev sudo apt-get install libsdl2-dev
安装
sudo apt-get install ros-melodic-uvc-camera
添加代码
SUBSYSTEM=="usb", ATTR{idProduct}=="0502", ATTR{idVendor}=="2bc5", MODE:="0666", OWNER:="root", GROUP:="video"
ros_astra_launch/launch/astra.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" />
<node name="rgb" pkg="usb_cam" type="usb_cam_node" output="screen" > <param name="video_device" value="/dev/video0" /> <param name="image_width" value="640" /> <param name="image_height" value="480" /> <param name="framerate" value="30" /> <param name="pixel_format" value="yuyv" /> <param name="camera_frame_id" value="usb_cam" /> <param name="io_method" value="mmap"/> <param name="camera_frame_id" value="camera_rgb_optical_frame"/> <!--param name="timestamp_method" value="start"/--> <!--param name="index" value="0"/--> <!--param name="camera_info_url" value=""/--> <!--remap from="/usb_cam/image_raw" to="/camera/rgb/image_raw"/--> <!--remap from="/usb_cam/image_raw/compressed" to="/camera/rgb/image_raw/compressed"/--> </node>
roscd astra_camera sudo sh ./scripts/create_udev_rules
roslaunch astra_launch astra.launch
作者:kay 出处:https://www.cnblogs.com/kay2018/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 如果文中有什么错误,欢迎指出。以免更多的人被误导。 |