ros板块

ros基本板块

ros初始化

sudo rosdep init
rosdep update

source制定二进制文件 为了给系统说明可执行文件一级其他文件位置,第二条命令是为了每次加载bashrc配置,第三条是为了使配置生效

source /opt/ros/kinetic/setup.bash
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc 
source ~/.bashrc
		emmm 如果你搞坏了bashrc文件

cd /etc/skel
cp .bashrc ~/ (覆盖了搞坏的文件

或者catkin_make成功之后

source devel/setup.bash
gedit ~/.bashrc

加入

source ~/catkin_ws/devel/setup.bash

安装python下载工具
只需要ros安装首次运行即可

 sudo apt-get install python-rosinstall

ros 创建工作空间
注意catkin_init_workspace 是在src下,

cd ~
mkdir catkin_ws
cd catkin_ws
mkdir src
cd src
catkin_init_workspace
cd ..
catkin_make

创建工作空间报错 见错误2

ros纠误板块

错误1
bash: /home/apin/catkin_ws/devel/setup.bash: No such file or directory

解决

getdit ~/.bashrc

错误2 catkin_make报错合集

2.1 Make sure that you have installed “catkin_pkg”, it is up to date and on the PYTHONPATH. 问题分析 install文件缺失,
是python文件,结合上文中安装的python安装工具,给出以下命令: solution:

cd catkin_ws
pip install catkin_pkg
	重新catkin_make 得到以下内容,得不到100%进度条,但不会报错.

2.2 Could not find the required component ‘move_base_msgs’ move_base_msgs缺失,安装即可

sudo apt-get install ros-kinetic-move-base-msgs

2.3 缺失rospkg

cd catkin_ws
pip install rospkg

错误3 roscore报错
3.1 the network is not configured properly.
解决
打开setup.sh

sudo vim /opt/ros/kinetic/setup.sh

加入下面两行

 export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311

使配置生效

 source /opt/ros/kinetic/setup.sh
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值