Ubuntu16.04在ROS kinetic下使用Astra Mini摄像头(亲测有效)

1.先在Ubuntu16.04安装ROS kinetic参考以下文章

Ubuntu16.04安装ROS kinetic_NovenBae的博客-CSDN博客_ros安装

若初始化rosdep出问题,参考以下链接

rosdep update 出现time out 解决办法(绝对有效)_叶子长红的博客-CSDN博客_rosdep update出错timeout

------------------------------------2022/5/5  更新----------------------------------------------------------------------

初始化 rosdep报错解决方法

若打不开链接,可以参考以下方法:

 【来源:https://python.iitter.com/other/48361.html,转载请注明】

初始化 rosdep
sudo rosdep init由于域名污染,这一步往往会报下面的错误:

ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.
 

1.为解决该问题,首先,克隆 rosdistro 仓库:

git clone https://github.com/ros/rosdistro.git

2.本地新建对应目录:

sudo mkdir -p /etc/ros/rosdep/sources.list.d

3.将克隆下来的 rosdistro 仓库中的 list 文件拷贝到上述目录:

cd rosdistro
sudo cp rosdep/sources.list.d/20-default.list /etc/ros/rosdep/sources.list.d/

4.更新本地 rosdep 数据库

rosdep update

同样是由于域名污染,这一步往往会报下面的错误:

reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml]:
    Failed to download target platform data for gbpdistro:
    <urlopen error [Errno 111] Connection refused>
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
ERROR: error loading sources list:
    <urlopen error <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)>

5.假设已经解决上面步骤中 rosdep init 遇到的问题,现在需要编辑以下四个文件:

/etc/ros/rosdep/sources.list.d/20-default.list

/usr/lib/python2.7/dist-packages/rosdep2/gbpdistro_support.py

/usr/lib/python2.7/dist-packages/rosdep2/rep3.py

/usr/lib/python2.7/dist-packages/rosdistro/__init__.py

搜索文件中的 https://raw.githubusercontent.com/ros/rosdistro/master 字段,将其替换为本地 rosdistro 仓库的绝对地址,例如本示例中为 file:///home/xxx/rosdistro。(xxx对应自己的安装路径)

编辑后的 list 文件如下所示:

# os-specific listings first
yaml file:///home/xxx/rosdistro/rosdep/osx-homebrew.yaml osx
​
# generic
yaml file:///home/xxx/rosdistro/rosdep/base.yaml
yaml file:///home/xxx/rosdistro/rosdep/python.yaml
yaml file:///home/xxx/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/xxx/rosdistro/releases/fuerte.yaml fuerte
​
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

然后重新执行 rosdep update 命令即可:

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit file:///home/xxx/rosdistro/rosdep/osx-homebrew.yaml
Hit file:///home/xxx/rosdistro/rosdep/base.yaml
Hit file:///home/xxx/rosdistro/rosdep/python.yaml
Hit file:///home/xxx/rosdistro/rosdep/ruby.yaml
Hit file:///home/xxx/rosdistro/releases/fuerte.yaml
Query rosdistro index file:///home/xxx/rosdistro/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Add distro "foxy"
Add distro "galactic"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /home/xxx/.ros/rosdep/sources.cache

------------------------------------2022/5/5  更新----------------------------------------------------------------------

2.Ubuntu16.4中安装ORBBEC Astra Mimi 驱动

Ubuntu16.4中安装ORBBEC Astra Mimi 系列摄像头SDK:OpenNI SDK_Stephen__W的博客-CSDN博客

3.ROS下Astra Mini摄像头配置参考以下文章

https://www.johneyzheng.top/2018/04/ROS_Astra_RealaSense/

其中,ROS下使用Astra摄像头步骤与上述文章有一点差异

安装astra_camera和astra_launch驱动:

sudo apt-get install ros-kinetic-astra-camera ros-kinetic-astra-launch

打开一个新终端,执行astra_launch:

roslaunch astra_launch astra.launch

正常的话可以通过rqt_image_view进行显示:

rosrun rqt_image_view rqt_image_view

补充:配置rviz软件的一些内容,可参考这篇文章部分内容

ubuntu16.04下usb相机和kinect1相机_huapiaoxiang21的博客-CSDN博客

最后结果如下图:

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值