Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 1441

Creating ikfast solution cpp for nao

$
0
0
Hi, I am developing on Ubuntu 14.04 and indigo distro working with the Nao robot (I know that this ubuntu version-distro combo still has many issues, however I am stuck with it due to hardware constraints). For my project I need an IK solver, and for that it seemed that MoveIt was the right solution. I am using [nao_description](https://github.com/ros-naoqi/nao_robot/tree/master/nao_description) from the nao_robot repository, [nao_meshes](https://github.com/ros-naoqi), and [nao_moveit_config](https://github.com/ros-naoqi/nao_moveit_config). First of all, one thing I noticed is that when I run roslaunch nao_moveit_config demo.launch, I am getting the following error: Group 'leg_right' has a mimic joint. Will not initialize dynamics solver Trying to manipulate the leg_right chain results in crashing the rviz application. However, that may just be a visualization issue. For the IK, I first tried the default IK solver, KDL, following along the [Kinematics tutorial](http://docs.ros.org/hydro/api/pr2_moveit_tutorials/html/kinematics/src/doc/kinematics_tutorial.html) on the MoveIt website, but substituting in Nao's configuration. But it never succeeds to find an IK solution. Since research was unclear whether KDL is a fit choice for Nao's configuration I decided to try out MoveIt with the [ikfast plugin](http://docs.ros.org/hydro/api/moveit_ikfast/html/doc/ikfast_tutorial.html). I followed the instructions. The first issue I ran into was installing OpenRAVE. However I found the following [tutorial]( http://www.aizac.info/installing-openrave0-9-on-ubuntu-trusty-14-04-64bit/) with which I was able to install OpenRAVE successfully. Next issue was in converting urdf to the collada file with rosrun collada_urdf urdf_to_collada nao.urdf nao.dae There seems to be a problem with indigo creating the file, producing the following error: opt/ros/indigo/share/nao_description/urdf/naoV40_generated_urdf/nao.urdf nao.dae I/O error : No such file or directory I/O error : No such file or directory error : xmlNewTextWriterFilename : cannot open uri Document successfully written to nao.dae I was able to overcome this issue by having a friend who is running ros fuerte make the conversion for me. However, I am now stuck on the step of creating the ikfast solution. When performing the following command: python ~/git/openrave/python/ikfast.py --robot=nao.rounded.dae --iktype=transform6d --baselink=1 --eelink=8 --savefile= ikfast_arm_hand_left.cpp [plugindatabase.h:577] Failed to create name ode, interface collisionchecker [plugindatabase.h:577] Failed to create name bullet, interface collisionchecker [kinbody.cpp:1275] dof 11 value is not in limits 0.000000e+00<-3.490659e-02 [kinbody.cpp:1264] dof 22 value is not in limits 0.000000e+00<3.490659e-02 /home/astrid/git/openrave/python/ikfast.py:1123: RuntimeWarning: invalid value encountered in divide axisangle /= angle INFO: moved translation Matrix([[0, 0, 0]]) to right end INFO: moved translation Matrix([[0, 0, 0]]) to left end INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, 253/2000]] INFO: [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]] INFO: [[1, 0, 0, 0],[0, 0, 1, 0],[0, -1, 0, 0]] INFO: [[cos(j1), -sin(j1), 0, 0],[sin(j1), cos(j1), 0, 0],[0, 0, 1, 0]] INFO: [[2500000000*sqrt(6252741728462541289)/6252741728462541289, 0, 52361517*sqrt(6252741728462541289)/6252741728462541289, 5871/100000],[52361517*sqrt(6252741728462541289)/6252741728462541289, 0, -2500000000*sqrt(6252741728462541289)/6252741728462541289, -1591/25000],[0, 1, 0, 0]] Traceback (most recent call last): File "/home/astrid/git/openrave/python/ikfast.py", line 6382, in chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn) File "/home/astrid/git/openrave/python/ikfast.py", line 1640, in generateIkSolver chaintree = solvefn(self, LinksRaw, jointvars, isolvejointvars) File "/home/astrid/git/openrave/python/ikfast.py", line 2108, in solveFullIK_6D self.testconsistentvalues = self.computeConsistentValues(jointvars,Tfinal,numsolutions=4) File "/home/astrid/git/openrave/python/ikfast.py", line 1687, in computeConsistentValues psubs.append((s,v.subs(psubs))) File "/usr/lib/python2.7/dist-packages/sympy/core/basic.py", line 949, in subs rv = rv._subs(old, new, **kwargs) File "/usr/lib/python2.7/dist-packages/sympy/core/cache.py", line 93, in wrapper r = func(*args, **kw_args) File "/usr/lib/python2.7/dist-packages/sympy/core/basic.py", line 1063, in _subs rv = fallback(self, old, new) File "/usr/lib/python2.7/dist-packages/sympy/core/basic.py", line 1035, in fallback arg = arg._subs(old, new, **hints) File "/usr/lib/python2.7/dist-packages/sympy/core/cache.py", line 93, in wrapper r = func(*args, **kw_args) File "/usr/lib/python2.7/dist-packages/sympy/core/basic.py", line 1061, in _subs rv = self._eval_subs(old, new) File "/home/astrid/git/openrave/python/ikfast.py", line 301, in Pow_eval_subs return Pow(self.base._eval_subs(old, new), self.exp._eval_subs(old, new)) File "/usr/lib/python2.7/dist-packages/sympy/core/cache.py", line 93, in wrapper r = func(*args, **kw_args) File "/usr/lib/python2.7/dist-packages/sympy/core/power.py", line 94, in __new__ b = _sympify(b) File "/usr/lib/python2.7/dist-packages/sympy/core/sympify.py", line 346, in _sympify return sympify(a, strict=True) File "/usr/lib/python2.7/dist-packages/sympy/core/sympify.py", line 239, in sympify raise SympifyError(a) sympy.core.sympify.SympifyError: SympifyError: None And finally here are my questions: 1) Can anybody point me into the right direction on how to get around this, maybe even what that error means? 2) What reasons could there be for the KDL version to never find a solution? Does it have anything to do with the number of DOF's in NAO's chain? 3) Has anything come out of [this](https://groups.google.com/forum/#!topic/ros-sig-aldebaran/_VRoguXXG0E) discussion? Is there maybe an IKFast class for Nao readily available? 4) Anybody looked further into [this](http://answers.ros.org/question/127181/using-ikfast-with-ros/)? Thank you in advance for any help!!

Viewing all articles
Browse latest Browse all 1441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>