一、安装
二、测试
使用ROS中的小海龟进行ROS的测试。参考http://blog.sina.com.cn/s/blog_661159d50100od99.html
在使用“rosrun turtle_teleop turtle_teleop_key ”命令时,提示找不到命令。上网查找原因是因为turtle_teleop这个包没有安装,需要从网上下载源码包进行安装。
首先从官网(http://ros.org/wiki/turtle_teleop)上下载源码包,然后最好放在自己的主文件夹下,否则后面的编译会产生权限问题。然后加入路径:
echo "export ROS_PACKAGE_PATH=~/ros_workspace:$ROS_PACKAGE_PATH" >> ~/.bashrc echo "export ROS_WORKSPACE=~/ros_workspace" >> ~/.bashrc . ~/.bashrc
为了确认你的package路径设置正确,回显 ROS_PACKAGE_PATH 变量:
echo $ROS_PACKAGE_PATH
然后输入命令查找并安装包:
rospack find turtle_teleop
rosmake turtle_teleop
安装完成后在运行命令,还是会有问题,提示没有turtle_teleop_key执行文件,解决方法:
(1) rosdep install turtle_teleop
(2) roscd turtle_teleop
(3) roslaunch launch/turtle_keyboard.launch
(2) roscd turtle_teleop
(3) roslaunch launch/turtle_keyboard.launch
注:
(1)在zsh中配置环境:
source /opt/ros/fuerte/setup.zsh
echo "source /opt/ros/fuerte/setup.zsh" >> ~/.zshrc
. ~/.zshrc
(2)ubuntu下使用源码安装ROS:http://ros.org/wiki/fuerte/Installation/Ubuntu/Source