1.安装软件包:
sudo apt-get install gazebo2 ros-indigo-qt-build ros-indigo-driver-common ros-indigo-gazebo-ros-control ros-indigo-gazebo-ros-pkgs ros-indigo-ros-control ros-indigo-control-toolbox ros-indigo-realtime-tools ros-indigo-ros-controllers ros-indigo-xacro python-wstool ros-indigo-tf-conversions ros-indigo-kdl-parser
2.安装baxter_simulator仿真环境:
$ 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/indigo/setup.bash
$ cd ~/ros_ws
$ catkin_make
4.Use baxter.sh - it has a special hook for sim:
cp src/baxter/baxter.sh .
5.编辑baxter.sh文件
- Edit the following values in
baxter.sh
:your_ip value
ros_version
这里我们之前操作过了,就不用动了
7.仿真
$ ./baxter.sh sim
$ roslaunch baxter_gazebo baxter_world.launch
上面可能会报一些错误,并且等待时间比较长,这是因为它在下载模型。这没有关系,多运行几次就好了。
上面的这个它是不会动的,我们需要先将其使能。
rosrun baxter_tools enable_robot.py -e
之后我们可以运行下面第一个官方的例子:
$ ./baxter.sh sim
$ rosrun baxter_examples joint_velocity_wobbler.py
$ ./baxter.sh sim
$ rosrun baxter_examples joint_position_keyboard.py
然后他就开始摇起来了:
我们可以进入下面的这些文件夹里面去看一下还有哪些例子:
原文链接:http://sdk.rethinkrobotics.com/wiki/Simulator_Installation