agx 安装ros opencv_ROS安装

安装

  • 设置软件更新

c73c66453d51272e7ccc9187d6717cf2.png
  • 设置软件源,这里选择国内的源,速度相对较快
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
  • 设置密钥
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654
  • 安装
sudo apt-get update
sudo apt-get install ros-melodic-desktop-full
sudo apt-get install ros-melodic-rqt*
  • 初始化rosdep
sudo rosdep init
rosdep update
  • 问题:
  1. 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.

原因:网络问题

方法:尝试各种方法,最终在_风起了_博客找到最终解决方法

#打开hosts文件
sudo gedit /etc/hosts
#在文件末尾添加
151.101.84.133  raw.githubusercontent.com
#保存后退出再尝试

2. rosdep update出现问题

ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml]:
	<urlopen error ('_ssl.c:711: The handshake operation timed out',)> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml)

原因:网络问题,无法一次性成功,也尝试了网络上各种办法

方法:先将需要的yaml文件下载下来,放在对应的文件,参考super_sean同学中的方法,但依然会出现如:

/etc/ros/rosdistro/master/kinetic/distribition.yaml文件不存在

同样依次在对应的目录下建立文件夹,然后在/etc/ros/rosdistro/master/kinetic/目录下

sudo wget https://raw.githubusercontent.com/ros/rosdistro/master/kinetic/distribution.yaml

缺什么,下载什么

  • 设置环境变量
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
  • 安装rosinstall
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential

测试

roscore
  • 再打开一个终端
rosrun turtlesim turtlesim_node
  • 再打开一个终端
rosrun turtlesim turtle_teleop_key

此时可以通过方向键控制乌龟

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值