ubuntu16.04 安装ros kinetic(orbslam_semantic_nav_ros依赖库3)

2023-11-05

参考
https://blog.csdn.net/weixin_42623382/article/details/106251330
使用中科大的源

sudo sh -c '. /etc/lsb-release && echo "deb https://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'

设置key

sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

更新
sudo apt-get update
数字签名无效或者过期时参考,一般不会,注意尽量不要连校园网https://www.cnblogs.com/lishanlei/p/10707819.html

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8C718D3B5072E1F5
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 58712A2291FA4AD5
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654

安装kinetic完整版
sudo apt-get install ros-kinetic-desktop-full

安装中断时可以

sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full

和校验失败可以

 sudo dpkg --configure -a
 sudo apt-get install ros-kinetic-desktop-full

初始化rosdep

sudo rosdep init
rosdep update

若出现ERROR

sudo gedit /etc/hosts

添加
199.232.28.133 raw.githubusercontent.com

配置环境变量

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

或者

sudo gedit  ~/.bashrc

添加source /opt/ros/kinetic/setup.bash

安装依赖项

sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

测试
三个窗口分别打开

roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key

在三个窗口打开以上命令,出现小乌龟,并可以在第三个窗口使用键盘控制乌龟移动,则成功
出现: 程序“roscore”尚未安装。 您可以使用以下命令安装:apt install python-roslaunch,参考[https://www.jianshu.com/p/bfbc833c719b],可能还是配置环境变量时有问题(https://www.jianshu.com/p/bfbc833c719b)
https://github.com/ros/catkin.git 下载kinetic-devel分支

mkdir build
cd build
cmake ..
sudo chmod +x Makefile
make -j8  
sudo make install
cd ..
python2 setup.py install

实在不行

 sudo apt-get install aptitude
sudo aptitude install python-roslaunch

不接受第一种方案,n
用第二种方案y

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ubuntu16.04 安装ros kinetic(orbslam_semantic_nav_ros依赖库3) 的相关文章

随机推荐