您的位置:首页 > 编程语言 > ASP

raspberri pi 3 + v2 camera 树莓派摄像头 发布到ros 节点上 远程电脑查看视频

2017-04-21 17:25 886 查看
树莓派3+ros kinetic 版本远程电脑+ros indigo 版本首先开启树莓派的摄像头功能
sudo raspi-config
启动摄像头功能然后重启树莓派在github 上打开 树莓派官方驱动节点https://github.com/UbiquityRobotics/raspicam_node做以下步骤进入工作空间的源目录
$cd ~/catkin_ws/src
复制该驱动包
$git clone https://github.com/UbiquityRobotics/raspicam_node.git[/code] 创建一个依赖文件 必须是下面这个路径 名字也一样
/etc/ros/rosdep/sources.list.d/30-ubiquity.list
然后将下面这句话复制进去
yaml https://raw.githubusercontent.com/UbiquityRobotics/rosdep/master/raspberry-pi.yaml[/code] 运行
$rosdep update
cd ~/catkin_ws
rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
最后
catkin_make
[/code]
双机通信
在树莓派的.bashrc 文件中写入
export ROS_HOSTNAME=
raspberrypi_ip
export
ROS_MASTER_URI=http://
raspberrypi_ip
:11311  
在远程电脑中
.bashrc文件中写入
export ROS_HOSTNAME=
laptop_ip
export
ROS_MASTER_URI=http://
raspberrypi_ip
:11311 
在树莓派和电脑都启动roscore在树莓派上Once you have the node built, you can run it using a launch file.For a V2.x camera, run 
roslaunch raspicam_node camerav2_1280x960.launch
For a V1.x camera, run
roslaunch raspicam_node camerav1_1280x720.launch
在电脑上运行
$rqt_image_view
最后如图

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐