Sawyer 机械臂仿真环境配置
1.安装INTERA 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 ros-kinetic-xacro ros-kinetic-tf2-ros ros-kinetic-rviz ros-kinetic-cv-bridge ros-kinetic-actionlib ros-kinetic-actionlib-msgs ros-kinetic-dynamic-reconfigure ros-kinetic-trajectory-msgs ros-kinetic-rospy-message-converter
2.安装INTERA ROBOT SDK
cd ROS工作空间/src
wstool init .
git clone https://github.com/RethinkRobotics/sawyer_robot.git
wstool merge sawyer_robot/sawyer_robot.rosinstall
wstool update
Build
cd ROS工作空间
catkin_make
复制 intera.sh 到ROS工作空间
cp ~/ROS工作空间/src/intera_sdk/intera.sh ~/ROS工作空间
修改intera.sh
ros_version=“kinetic”
3.配置仿真环境(使用Gazebo)
(注:此处不需要与Sawyer通讯,intera.sh ip,hostname 不做修改)
安装依赖
sudo apt-get install ros-kinetic-qt-build 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 ros-kinetic-sns-ik-lib
进入src目录
cd ROS工作空间/src
git clone https://github.com/RethinkRobotics/sawyer_simulator.git
wstool merge sawyer_simulator/sawyer_simulator.rosinstall
wstool update
若上方设置了自动配置环境
则
cd ROS工作空间
catkin_make
若未配置,则
source /opt/ros/kinetic/setup.bash
cd ROS工作空间
catkin_make
4.启动仿真
在ROS工作空间内
./intera.sh sim
roslaunch sawyer_gazebo sawyer_world.launch
(均视为已配置环境)
注:初次进入较慢 官方建议使用Nvidia显卡
If any visualization (RViz) or simulation (Gazebo) is required for your application, a dedicated NVidia graphics card with proprietary NVidia drivers is recommended
至此,Sawyer仿真环境已配置完成
高级应用
1.开启夹子
编辑sawyer_world.launch
将<arg name="electric_gripper" default="false"/>
false改为true
错误集锦:
1.使用VMware虚拟机会导致Gazebo闪退
I.关闭硬件加速
echo " export SVGA_VGPU10=0" >> ~/.bashrc
source ~/.bashrc
II. 关闭虚拟机的3d加速
在关机情况下,编辑虚拟机 -显示器-3D加速 取消勾选
2.Gazebo一直处于黑屏状态
打开gazebo窗口的时候会发现一直处于黑屏状态,这是因为model库加载不正确导致的,安装好gazebo后一定会出现这个问题。
此时还得下载model库:
直接下载包
全部模型有170M,然后将其解压至~/.gazebo/models里。
链接:http://pan.baidu.com/s/1pKaeg0F 密码:cmxc (来自rosclub.cn)