标签:大于 x264 form recording 报错 mini 命令 strong min
Kinematics and Dynamics Library (KDL)是MoveIt!中的默认运动学插件,在使用MoveIt! Setup Assistant进行模型配置时,可以进行配置。KDL的优点是可以求解封闭情况下你运动学;但是速度慢、可能找不到解。
多时候我们在做运动规划的时候,MoveIt!经常会提示规划失败、求解失败等错误,很多都是因为KDL这款运动学插件导致的,所以,需要更换一个运动学插件。
将KDL更换成TRAC-IK呢,方法很简单,ROS的软件源中已经集成了TRAC-IK的安装包,可以直接使用以下命令安装:
?
然后修改机械臂MoveIt!配置功能包下的kinematics.yaml文件就可以使用啦:
1 arm: 2 kinematics_solver: trac_ik_kinematics_plugin/TRAC_IKKinematicsPlugin 3 kinematics_solver_attempts: 3 4 kinematics_solver_search_resolution: 0.005
接下来再次运行demo.launch,默认加载的就是TRAC-IK运动学插件了,试试规划求解的效率是不是高了很多!
IK_Fast比默认的KDL和现在用的Trac_IK安装起来也更麻烦。
查看boost的版本:
1 dpkg -S /usr/include/boost/version.hpp
IKFAST是一种基于解析算法的运动学插件,可以保证每次求解的一致性。IKFAST,机器人运动学的编译器,在Rosen Diankov OpenRAVE运动规划软件提供,是一个强大的逆运动学求解器。不像大多数的逆运动学求解,IKFAST可以求解任意复杂运动链的运动学方程,并产生特定语言的文件(如C++)后供使用。最终的结果是非常稳定的解决方案。
MoveIt! IKFast是一种可利用OpenRAVE生成的cpp文件来生成 IKFast 运动学插件的工具。
MoveIt! IKFast测试环境是ROS Groovy,使用catkin编译,使用带有6dof和7dof的机器臂的OpenRave 0.8 。
理论上可以工作在任何自动度的机械臂,但目前 IKFast插件生成器不能工作在大于7自动度的机械臂上。
1 sudo apt-get install cmake g++ git ipython minizip python-dev python-h5py python-numpy python-scipy qt4-dev-tools
1 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
1 sudo apt-get install libcairo2-dev libjasper-dev libpoppler-glib-dev libsdl2-dev libtiff5-dev libxrandr-dev 2 git clone https://github.com/openscenegraph/OpenSceneGraph.git --branch OpenSceneGraph-3.4 3 cd OpenSceneGraph 4 mkdir build; cd build 5 cmake .. -DDESIRED_QT_VERSION=4 6 make -j$(nproc) 7 sudo make install
cd ~/git git clone https://github.com/flexible-collision-library/fcl cd fcl; git checkout 0.5.0 mkdir build; cd build cmake .. make -j `nproc` sudo make install
1 pip install --upgrade --user sympy==0.7.1
1 sudo apt remove python-mpmath
1 sudo apt-get install ros-melodic-moveit-kinematics
1 git clone --branch latest_stable https://github.com/rdiankov/openrave.git 2 cd openrave && mkdir build && cd build 3 cmake -DODE_USE_MULTITHREAD=ON -DOSG_DIR=/usr/local/lib64/ .. 4 make -j$(nproc) 5 sudo make install
openrave装了很久都没装好,可以查考下面这个网站:https://github.com/crigroup/openrave-installation
下载脚本后,按顺序执行命令即可:
1 ./install-dependencies.sh 2 ./install-osg.sh 3 ./install-fcl.sh 4 ./install-openrave.sh
前面两条脚本都运行正确。但是./install-openrave.sh还是报错,尝试了许多方法,还是没有解决。
参考博客:https://blog.csdn.net/weixin_40512647/article/details/105719908
之后采用以下方法:
1 sudo apt install git # probably already installed 2 sudo apt install libboost-filesystem-dev libboost-system-dev libboost-python-dev libboost-thread-dev libboost-iostreams-dev libboost-numpy-dev 3 sudo apt install libqt4-dev qt4-dev-tools libxml2-dev libode-dev 4 sudo apt install libsoqt4-dev libcoin80-dev 5 sudo apt install liblapack-dev 6 sudo apt install libcollada-dom2.4-dp-dev # Open .zae files, avoid cmake 3.19 error on 18.04 Bionic 7 cd # go home 8 mkdir -p repos; cd repos # create $HOME/repos if it doesn‘t exist; then, enter it 9 git clone --branch master https://github.com/rdiankov/openrave.git 10 cd openrave; mkdir build; cd build 11 cmake .. -DOPT_VIDEORECORDING=OFF -DOPT_PYTHON=OFF 12 make -j$(nproc) 13 sudo make install; cd # install and go home
问题:
python/bindings/CMakeFiles/pyANN_int.dir/build.make:86: recipe for target ‘python/bindings/CMakeFiles/pyANN_int.dir/bindings.cpp.o‘ failed make[3]: * [python/bindings/CMakeFiles/pyANN_int.dir/bindings.cpp.o] Error 1 make[3]: 离开目录“/home/wei/repos/openrave/build” CMakeFiles/Makefile2:1199: recipe for target ‘python/bindings/CMakeFiles/pyANN_int.dir/all‘ failed make[2]: * [python/bindings/CMakeFiles/pyANN_int.dir/all] Error 2
还是报错:
脚本安装方式和以上这种方式的报错都是一样的,主要是boost问题,我尝试删除boost,重新安装boost。
自己摸索出来:CMakeList.txt里面修改了动态链接库的路径,cmake .. -DOPT_VIDEORECORDING=OFF -DOPT_PYTHON=OFF:
运行 :make -j$(nproc)的时候,磁盘60G满了。。。
MYROBOT_NAME(机器人名字) - name of robot as in your URDF
PLANNING_GROUP(规划组名字) - name of the planning group you would like to use this solver for, as referenced in your SRDF and kinematics.yaml
MOVEIT_IK_PLUGIN_PKG (插件包名字)- name of the new package you just created
IKFAST_OUTPUT_PATH(IKFAST输出路径) - file path to the location of your generated IKFast output.cpp file
参考博客:https://blog.csdn.net/Kalenee/article/details/80740258
(1)设置机器人名字
1 export MYROBOT_NAME="robot_arm"
(2)若机器人模型为xacro格式需先转为urdf格式
1 osrun xacro xacro --inorder -o "$MYROBOT_NAME".urdf arm.xacro
(3)机器人模型urdf格式转换为dae格式
1 rosrun collada_urdf urdf_to_collada "$MYROBOT_NAME".urdf "$MYROBOT_NAME".dae
(4)设置精度为小数点后5位,然后保留备份后重新设置dae格式机器人模型描述文件的精度
1 export IKFAST_PRECISION="5" 2 cp "$MYROBOT_NAME".dae "$MYROBOT_NAME".backup.dae # create a backup of your full precision dae. 3 rosrun moveit_kinematics round_collada_numbers.py "$MYROBOT_NAME".dae "$MYROBOT_NAME".dae "$IKFAST_PRECISION"
设置的精度会影响IKFAST的生成,设置过小会导致无法生成或求解精度过低,过大也会导致无法生成或者求解变慢,可以根据需求调整精度。
(5)查看模型
查看模型关节数据
1 openrave-robot.py "$MYROBOT_NAME".dae --info links
查看模型三维结构
1 openrave "$MYROBOT_NAME".dae
(6)选择IK项(默认Transform6D )
http://openrave.org/docs/latest_stable/openravepy/ikfast/#ik-types
(7)设置运动规划组
1 export PLANNING_GROUP="robot_arm"
(8)设置运动规划的关节组,以上面的模型关节数据为基础设置
1 export BASE_LINK="0" 2 export EEF_LINK="8"
(9)若关节数量大于6需设置一自由关节,若无则无需设置
1 export FREE_INDEX="1"
(10)设置IKFAST输出路径
1 export IKFAST_OUTPUT_PATH=`pwd`/ikfast61_"$PLANNING_GROUP".cpp
(11)生成IKFAST文件
6轴
1 python `openrave-config --python-dir`/openravepy/_openravepy_/ikfast.py --robot="$MYROBOT_NAME".dae --iktype=transform6d --baselink="$BASE_LINK" --eelink="$EEF_LINK" --savefile="$IKFAST_OUTPUT_PATH"
7轴
1 python `openrave-config --python-dir`/openravepy/_openravepy_/ikfast.py --robot="$MYROBOT_NAME".dae --iktype=transform6d --baselink="$BASE_LINK" --eelink="$EEF_LINK" --freeindex="$FREE_INDEX" --savefile="$IKFAST_OUTPUT_PATH"
备注:生成IKFAST文件时间一般不会太长,在10~20分钟左右,若时间过长有几率代表失败(即使成功生成),生成失败的话可以降低精度或者需要修改模型本身。
生成插件
1 export MOVEIT_IK_PLUGIN_PKG="$MYROBOT_NAME"_ikfast_"$PLANNING_GROUP"_plugin 2 cd ~/catkin_ws/src 3 catkin_create_pkg "$MOVEIT_IK_PLUGIN_PKG" 4 catkin build 5 rosrun moveit_kinematics create_ikfast_moveit_plugin.py "$MYROBOT_NAME" "$PLANNING_GROUP" "$MOVEIT_IK_PLUGIN_PKG" "$IKFAST_OUTPUT_PATH"
注意:create_ikfast_moveit_plugin.py默认该目录下存在名字为"$MYROBOT_NAME"_moveit_config的功能包如下,该功能包为机器人模型通过moveit_setup_assistant配置生成的功能包。
1 plan_pkg = robot_name + ‘_moveit_config‘ 2 plan_pkg_dir = roslib.packages.get_pkg_dir(plan_pkg) 3 print ‘Loading robot from \‘‘+plan_pkg+‘\‘ package ... ‘
问题1:
1 libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting...
解决办法:
1 sudo dpkg-reconfigure libdvd-pkg
问题2:
1 collect2: error: ld returned 1 exit status 2 test/CMakeFiles/test_fcl_shape_mesh_consistency.dir/build.make:121: recipe for target ‘test/test_fcl_shape_mesh_consistency‘ failed 3 make[2]: *** [test/test_fcl_shape_mesh_consistency] Error 1 4 CMakeFiles/Makefile2:216: recipe for target ‘test/CMakeFiles/test_fcl_shape_mesh_consistency.dir/all‘ failed 5 make[1]: *** [test/CMakeFiles/test_fcl_shape_mesh_consistency.dir/all] Error 2 6 Makefile:140: recipe for target ‘all‘ failed 7 make: *** [all] Error 2
解决办法:
安装libccd:https://github.com/danfis/libccd
问题3:
boost卸载和重新安装
解决:
https://stackoverflow.com/questions/8430332/uninstall-boost-and-install-another-version
问题4:
1 [rospack] Error: package ‘collada_urdf‘ not found
解决:
1 sudo apt-get install ros-melodic-collada-urdf
参考博客:https://github.com/ros/collada_urdf/issues/31
问题5:
1 -- Configuring incomplete, errors occurred! 2 See also "/home/wei/git/openrave/build/CMakeFiles/CMakeOutput.log". 3 See also "/home/wei/git/openrave/build/CMakeFiles/CMakeError.log". 4 make: *** 没有指明目标并且找不到 makefile。 停止。
解决:
参考博客:https://blog.csdn.net/weixin_44381217/article/details/109680817
问题:
1 The following directory should be added to compiler include paths: 2 3 /home/wei/boost_1_58_0 4 5 The following directory should be added to linker library paths: 6 7 /home/wei/boost_1_58_0/stage/lib
解决:
1 dpkg -S /usr/local/include/boost/version.hpp
标签:大于 x264 form recording 报错 mini 命令 strong min
原文地址:https://www.cnblogs.com/weixq351/p/14916932.html