ROS安装以及程序运行问题总结

1.总教程
https://blog.csdn.net/qq_41450811/article/details/99079041

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*
sudo pip install rosdepc 
sudo rosdepc init
rosdepc update
sudo apt-get install python-rosinstall
source /opt/ros/melodic/setup.bash

mkdir -p ~/catkin_ws/src
 cd ~/catkin_ws/src
 catkin_init_workspace

cd ~/catkin_ws/
 catkin_make

sudo apt install net-tools
gedit ~/.bashrc
source ~/.bashrc

# ~~~~~~~~~~~~~~~~~~
# Set ROS melodic
source /opt/ros/melodic/setup.bash
source ~/catkin_ws/devel/setup.bash
# Set ROS Network
#ifconfig查看你的电脑ip地址
export ROS_HOSTNAME=**    #(终端输入hostname,替换)**   (**ROS-Tower**)
export ROS_MASTER_URI=http://${ROS_HOSTNAME}:11311
 # Set ROS alias command 快捷指令
alias cw='cd ~/catkin_ws'
alias cs='cd ~/catkin_ws/src'
alias cm='cd ~/catkin_ws && catkin_make'
#~~~~~~~~~~~~~~~~~~~~

#测试
roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key

2.ERROR: default sources list file already exists: /etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize
解决方法:sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
或者不用管

3.关于ROS中roscore启动失败: Unable to contact my own server at [http://192.168.211.130:41957/].
https://blog.csdn.net/chenshazhou/article/details/112621165


               以下是关于传感器使用过程中遇到的问题,可以忽略

4.编译问题:catkin_make报错
缺少库:sudo apt-get install ros-melodic-jsk-rviz-plugins(中间横线不是下划线)
make: /usr/bin/cmake: Command not found
https://blog.csdn.net/e3399/article/details/106135560

5.sudo ip link set can0 up type can bitrate 500000
报错:RTNETLINK answers: Device or resource busy
传感器拔了,重新插
https://www.icode9.com/content-1-633306.html
安装ROS时执行到sudo rosdep init时出现sudo rosdep:找不到命令提示
解决方法:需要输入:sudo apt-get install python-rosdep

6.roslaunch ars_40X ars_40X.launch
RLException: [ars_40X.launch] is neither a launch file in package [ars_40X] nor is [ars_40X] a launch file name
The traceback for the exception was written to the log file
没有链接上ros,看一下环境变量

7.roslaunch ars_40X ars_40X.launch10. ROS安装以及程序运行问题总结_第1张图片解决方法:升级cmake。https://blog.csdn.net/dulingwen/article/details/100141687

  1. Could not find a package configuration file provided by “costmap_converter“ with any of the follow
    https://blog.csdn.net/ben_xiao_hai_123/article/details/123280518
  2. No CMAKE_CUDA_COMPILER could be found.
    https://blog.csdn.net/weixin_39123145/article/details/108724923#commentBox
  3. Ros删除
    https://blog.csdn.net/jacka654321/article/details/83037485

参考文献
https://blog.csdn.net/qq_38340979/article/details/122140155
https://blog.csdn.net/qq_37510774/article/details/107869831
https://blog.csdn.net/qq_39779233/article/details/119381123#commentBox
https://blog.csdn.net/leida_wt/article/details/115120940#commentBox
注意:正文中对第五个地址的补充gbpdistro_url = “https://ghproxy.com/” + gbpdistro_url中,中文引号“ ”应改为’ ',否则会出现编码错误。
https://www.bilibili.com/read/cv15922933
https://blog.csdn.net/linyijiong/article/details/81413329#commentBox
https://blog.csdn.net/Numberors/article/details/105614301
系统会提示:update-alternatives: 错误: 无 python 的候选项
原因是将python代替python2和python3了,python3优先级为1,换过来就好了
https://www.icode9.com/content-1-633306.html
安装ROS时执行到sudo rosdep init时出现sudo rosdep:找不到命令提示
解决方法:需要输入:sudo apt-get install python-rosdep

你可能感兴趣的:(ROS,装机&刷机,linux)