安装Ubuntu18.04系统
参考网站:https://blog.csdn.net/baidu_36602427/article/details/86548203
下图只有部分关键步骤
下载wps
参考网站: https://blog.csdn.net/qq_36428171/article/details/88720452
下载时选择:For X64(按自己电脑配置选择)
ubuntu18安装ros
安装教程参考:https://blog.csdn.net/qq_41450811/article/details/99079041
遇到问题:
sudo rosdep init
sudo: rosdep:找不到命令
rosdep update
Command 'rosdep' not found, but can be installed with:
sudo apt install python-rosdep2
解决:
sudo apt install python-rosdep2
问题:
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.
解决:
sudo gedit /etc/hosts
添加:
199.232.28.133 raw.githubusercontent.com
151.101.228.133 raw.github.com
#保存退出
#重新执行 sudo rosdep initrosdep update
#运行超时,更换网络,不断尝试。
ros安装成功后:
检验是否成功方法
(1)启动ROS MASTER:
roscore
显示
started core service [/rosout]
(2)重新打开一个终端,我们要启动小海龟仿真器
rosrun turtlesim turtlesim_node
(3)重新打开一个终端哦,开启控制节点,小海龟要动起来
rosrun turtlesim turtle_teleop_key
在上面的终端窗口,按方向键就可以指挥小海龟了
安装pycharm参考网站:https://www.xdbcb8.com/archives/2450.html
搭建gazebo仿真环境:参考网站:https://blog.csdn.net/weixin_42646103/article/details/112585940
问题:
执行
pip2 install pandas jinja2 pyserial cerberus pyulog numpy toml pyquaternion
pip3 install packaging numpy empy toml pyyaml jinja2
报错
Could not find a version that satisfies the requirement pandas (from versions: )No matching distribution found for pandas
解决:
若未报错不需要输入这两行命令
pip install --upgrade setuptools -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
python -m pip install --upgrade pip -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
备注:出现报错(由于网络原因)在后面加上
-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
第四步
sudo ./install_geographiclib_datasets.shInstalling GeographicLib geoids egm96-5Installing GeographicLib gravity egm96
Error while installing GeographicLib gravity egm96Installing GeographicLib magnetic emm2015Error while installing GeographicLib magnetic emm2015
原因:网络问题,第二天白天就可以正常安装。
学习ros:
参考网站:https://www.guyuehome.com/17272 https://www.guyuehome.com/10086
执行
rqt_graph
报错
[ERROR] [1610791382.133737905]: Skipped loading plugin with error: XML Document '/opt/ros/melodic/share/rqt_virtual_joy/plugin.xml' has no Root Element. This likely means the XML is malformed or missing..
RosPluginProvider._parse_plugin_xml() plugin file "/opt/ros/melodic/share/rqt_virtual_joy/plugin.xml" in package "rqt_virtual_joy" not found
RosPluginProvider._parse_plugin_xml() plugin file "/opt/ros/melodic/share/rqt_virtual_joy/plugin.xml" in package "rqt_virtual_joy" not found
解决
参考网站:https://www.cnblogs.com/long5683/p/13847352.html
cd /opt/ros/melodic/share/rqt_virtual_joy/
sudo touch plugin.xml
sudo gedit plugin.xml
复制网页中内容进去,保存退出。
创建工作区间
mkdir -p ~/mkdir -p ~/catkin_ws /src
这里catkin_ws可以自己命名, src不可以
cd ~/catkin_ws /src
catkin_init_workspace
将该文件夹变为ros工作空间的属性
编译工作区间:
要回到工作区间根目录
cd ~/catkin_ws/
进行编译
catkin_make
设置环境变量
source devel/setup.bash
(只有设置了环境变量后才能让系统找到工作空间)
检查环境变量
echo $ROS_PACKAGE_PATH
创建功能包、编译功能包
避免每次编译前都设置环境变量,可以直接在.bashrc文件(主目录下的一个隐藏文件)中最后一行添加
source devel/setup.bash(路径不一定)