1. 点开软件库,确保下图的三条都勾选,然后选择阿里源
打开终端
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
3. 添加密钥
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
或者
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
4. 更新配置的源
sudo apt-get update
5. 安装ROS Kinetic完整版
sudo apt-get install ros-kinetic-desktop-full
6. 初始化rosdep
sudo rosdep init
rosdep update
7. 设置环境变量
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
8. 安装ros依赖项
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
9. 测试
打开新终端,启动ROS Master
roscore
1.创建工作空间
创建文件夹
mkdir -p ros_ws/src
进入/ros_ws目录
cd ~/ros_ws
编译工作空间
cakkin_make
cakkin_make install
文件夹中出现这五个文件,说明工作空间创建成功
所有的代码和功能包都要放到/src文件下
2.刷新source
source /opt/ros/kinetic/setup.bash
3.安装Baxter SDK依赖项
sudo apt-get update
sudo apt-get install git-core python-argparse python-wstool python-vcstools python-rosdep ros-kinetic-control-msgs ros-kinetic-joystick-drivers
4.安装Baxter SDK
进入/ros_ws/src目录
cd ~/ros_ws/src
wstool init .
wstool merge https://raw.githubusercontent.com/RethinkRobotics/baxter/master/baxter_sdk.rosinstall
wstool update
5.刷新source
source /opt/ros/kinetic/setup.bash
6.编译和安装
进入ros_ws目录
cd ~/ros_ws
catkin_make
catkin_make install
7.下载baxter.sh脚本
wget https://github.com/RethinkRobotics/baxter/raw/master/baxter.sh
chmod u+x baxter.sh
8.修改baxter.sh11脚本
在/ros_ws目录下
cd ~/ros_ws
gedit baxter.sh
修改下面三项
baxter_hostname="baxter_hostname.local"
your_ip="192.168.XXX.XXX"
ros_version="kinetic" 默认是indigo
baxter_hostname改为机器人名字
your_ip改为自己电脑的网络ip
ros_version改为安装的ROS版本
9. 初始化SDK环境
在/ros_ws目录下
cd ~/ros_ws
. baxter.sh
10. 验证环境
env | grep ROS
11. 设置工作空间环境变量
source ~/ros_ws/devel/setup.bash
检查环境变量
echo $ROS_PACKAGE_PATH
1. 安装依赖包
sudo apt-get install gazebo7 ros-kinetic-qt-build ros-kinetic-driver-common ros-kinetic-gazebo-ros-control ros-kinetic-gazebo-ros-pkgs ros-kinetic-ros-control ros-kinetic-control-toolbox ros-kinetic-realtime-tools ros-kinetic-ros-controllers ros-kinetic-xacro python-wstool ros-kinetic-tf-conversions ros-kinetic-kdl-parser
2. 下载安装Simulator功能包
进入/ros_ws/src目录
cd ~/ros_ws/src
wstool init .
wstool merge https://raw.githubusercontent.com/RethinkRobotics/baxter_simulator/master/baxter_simulator.rosinstall
wstool update
3. 刷新source
source /opt/ros/kinetic/setup.bash
4. 编译工作空间
进入目录
cd ~/ros_ws
catkin_make
5. 使用案例
打开终端,启动ROS Master
roscore
打开新终端,进入仿真环境,打开gazebo
cd ~/ros_ws
./baxter.sh sim
roslaunch baxter_gazebo baxter_world.launch
打开新终端,开启键盘控制脚本
rosrun baxter_examples joint_position_keyboard.py
1. 获取github上的功能包
进入目录
cd ~/ros_ws/src
git clone https://github.com/ros-planning/moveit_robots.git
2. 更新源
sudo apt-get update
3. 下载Moveit!
sudo apt-get install ros-kinetic-moveit
4. 编译工作空间
进入/ros_ws目录
cd ~/ros_ws
打开baxterSDK环境
./baxter.sh
编译
catkin_make
5. 刷新环境变量
cd ~/ros_ws
source devel/setup.bash
或者
source ~/ros_ws/devel/setup.bash