sudo apt-get install cmake g ++ git ipython minizip python-dev python-h5py python-numpy python-scipy qt4-dev-tools
sudo apt-get install libassimp-dev libavcodec-dev libavformat-dev libavformat-dev libboost-all-dev libboost-date-time-dev libbullet-dev libfaac-dev libglew-dev libgsm1-dev liblapack-dev liblog4cxx-dev libmpfr-dev libode-dev libogg-dev libpcrecpp0v5 libpcre3-dev libqhull-dev libqt4-dev libsoqt-dev-common libsoqt4-dev libswscale-dev libswscale-dev libvorbis-dev libx264-dev libxml2-dev libxvidcore-dev
sudo apt-get install libcairo2-dev libjasper-dev libpoppler-glib-dev libsdl2-dev libtiff5-dev libxrandr-dev
git clone https://github.com/openscenegraph/OpenSceneGraph.git --branch OpenSceneGraph-3.4
cd OpenSceneGraph
mkdir build; cd build
cmake .. -DDESIRED_QT_VERSION=4
make -j$(nproc)
sudo make install
pip install --upgrade --user sympy==0.7.1
sudo apt remove python-mpmath
sudo apt-get install ros-kinetic-moveit-kinematics
sudo apt-get install ros-kinetic-openrave
将Baxter分为左臂和右臂URDF,最好克隆到baxter的工作空间
git clone https://github.com/RethinkRobotics/baxter_custom_ikfast.git
cd custom_baxter_ikfast
rosparam get -p /robot_description | tail -n +2 > baxter_urdf.xml
sudo apt-get install ros-kinetic-robot-model
rosrun collada_urdf urdf_to_collada baxter_arm.accurate.right.urdf baxter_arm.right.dae
rosrun collada_urdf urdf_to_collada baxter_arm.accurate.left.urdf baxter_arm.left.dae
openrave0.9-robot.py baxter_arm.right.dae --info links
openrave0.9-robot.py baxter_arm.right.dae --info joints
rosrun moveit_kinematics round_collada_numbers.py baxter_arm.right.dae baxter_arm.right.rounded.dae 5
rosrun moveit_kinematics round_collada_numbers.py baxter_arm.left.dae baxter_arm.left.rounded.dae 5
极为耗时,相当耗时
python 路径/ikfast.py --robot = baxter_arm.right.rounded.dae --iktype = transform6d --baselink = 1 --eelink = 10 --freeindex = 5 --savefile = baxter_right_arm_ikfast_solver.cpp
python 路径/ikfast.py --robot = baxter_arm.left.rounded.dae --iktype = transform6d --baselink = 1 --eelink = 10 --freeindex = 5 --savefile = baxter_left_arm_ikfast_solver.cpp
下载moveit_robots,并把生成的baxter_right_arm_ikfast_solver.cpp/baxter_left_arm_ikfast_solver.cpp 替换moveit_robots/baxter/baxter_ikfast_left_arm_plugin和moveit_robots/baxter/baxter_ikfast_right_arm_plugin原有的cpp
修改moveit_robots/baxter中baxter_moveit_config/ kinematics.yaml
left_arm:
# kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin
# uncomment to use ikfast kinematics plugin
kinematics_solver: baxter_left_arm_kinematics/IKFastKinematicsPlugin
kinematics_solver_attempts: 3
kinematics_solver_search_resolution: 0.005
kinematics_solver_timeout: 0.005
right_arm:
# kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin
# uncomment to use ikfast kinematics plugin
kinematics_solver: baxter_right_arm_kinematics/IKFastKinematicsPlugin
kinematics_solver_attempts: 3
kinematics_solver_search_resolution: 0.005
kinematics_solver_timeout: 0.005
执行一下命令
catkin_make
catkin_make install --pkg baxter_ikfast_right_arm_plugin
catkin_make install --pkg baxter_ikfast_left_arm_plugin
记录步骤方便以后使用,有错望指正
参考资料
IKFast运动学求解器
插件使用官方教程
自定义IKFast教程
网络资料