inverse kinematics using the c++ interface

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

inverse kinematics using the c++ interface

clemens
Hi,

Another basic question: I am using the c++ interface and want to use
inverse kinematics solver. Is the only way to do this starting a
separate process with the python script ikfast.py?

Obviously, there is a FindIKSolutions() method in the Manipulator
class, but I suspect I have to set the ik solver etc. first. Is there
a basic example that shows what to keep in mind?

Thanks for any help!

-clemens

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: inverse kinematics using the c++ interface

Rosen Diankov
Administrator
hi clemens,

A LoadIKFastSolver function was just added to the ikfast problem that
calls inversekinematiics.py and loads the iksolver for the robot, just
as if you were using python (r1562).

You can see how to use this function inside the new ikfastloader.cpp
example, which can be found in share/openrave/cppexamples/

i hope this helps,
rosen,

2010/7/7 Clemens Eppner <[hidden email]>:

> Hi,
>
> Another basic question: I am using the c++ interface and want to use
> inverse kinematics solver. Is the only way to do this starting a
> separate process with the python script ikfast.py?
>
> Obviously, there is a FindIKSolutions() method in the Manipulator
> class, but I suspect I have to set the ik solver etc. first. Is there
> a basic example that shows what to keep in mind?
>
> Thanks for any help!
>
> -clemens
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: inverse kinematics using the c++ interface

waxwings
 hi Rosen,

i am trying to run this example and it gives an error message

terminate called after throwing an instance of 'OpenRAVE::openrave_exception'
  what():  OpenRAVE: failed to find command LoadIKFastSolver in problem ikfast

In the IKFastProblem class there are only two commands registered "AddIkLibrary" and "PerfTiming". Could you pls explain shortly how the "LoadIKFastSolver" works? Thanx a lot.

Regards
yimei
Reply | Threaded
Open this post in threaded view
|

Re: inverse kinematics using the c++ interface

waxwings
Hi Rosen,

it seems to me that the ikfast in openrave_svn is out of date. i guess that is the problem.

Regards
yimei
Reply | Threaded
Open this post in threaded view
|

Re: inverse kinematics using the c++ interface

waxwings
hi Rosen,

i still have problem running this example. The error messages are :

$ ./ikfastloader ../robots/barrettwam.robot.xml Transform6D
close failed in file object destructor:
Error in sys.excepthook:

Original exception was:
[ikfastproblem.h:326] executing shell command:
openrave.py --database inversekinematics --getfilename --robot=../robots/barrettwam.robot.xml --manipname=arm --iktype=Transform6D
[ikfastproblem.h:201] /home/yimei/.openrave/robot.2c7f45a52ae3cbd4c0663d8abbd5f020/ikfast7.d3dab5f914cbf17ed44e00f72ad3c8b6.Transform6D.i686.so: cannot open shared object file: No such file or directory
[ikfastproblem.h:127] failed to load library /home/yimei/.openrave/robot.2c7f45a52ae3cbd4c0663d8abbd5f020/ikfast7.d3dab5f914cbf17ed44e00f72ad3c8b6.Transform6D.i686.so
[ikfastloader.cpp:66] failed to load iksolver
terminate called after throwing an instance of 'OpenRAVE::openrave_exception'
  what():  OpenRAVE: [/usr/include/boost/thread/pthread/recursive_mutex.hpp:67] -> void boost::recursive_mutex::lock(), expr: !pthread_mutex_lock(&m)
Aborted

any hints?
 
Regards
yimei
Reply | Threaded
Open this post in threaded view
|

Re: inverse kinematics using the c++ interface

Rosen Diankov
Administrator
The problem was that robots/barrettwam.robot.xml was already setting
an ik solver in its robot file, this was getting LoadIKFastSolver
since the robot had an iksolver but the ikfast file didn't exist.
r1602 now always forces LoadIKFastSolver to load and generate an
ikfast solver, as the name suggests.
rosen,

2010/7/16 waxwings <[hidden email]>:

>
> hi Rosen,
>
> i still have problem running this example. The error messages are :
>
> $ ./ikfastloader ../robots/barrettwam.robot.xml Transform6D
> close failed in file object destructor:
> Error in sys.excepthook:
>
> Original exception was:
> [ikfastproblem.h:326] executing shell command:
> openrave.py --database inversekinematics --getfilename
> --robot=../robots/barrettwam.robot.xml --manipname=arm --iktype=Transform6D
> [ikfastproblem.h:201]
> /home/yimei/.openrave/robot.2c7f45a52ae3cbd4c0663d8abbd5f020/ikfast7.d3dab5f914cbf17ed44e00f72ad3c8b6.Transform6D.i686.so:
> cannot open shared object file: No such file or directory
> [ikfastproblem.h:127] failed to load library
> /home/yimei/.openrave/robot.2c7f45a52ae3cbd4c0663d8abbd5f020/ikfast7.d3dab5f914cbf17ed44e00f72ad3c8b6.Transform6D.i686.so
> [ikfastloader.cpp:66] failed to load iksolver
> terminate called after throwing an instance of
> 'OpenRAVE::openrave_exception'
>  what():  OpenRAVE:
> [/usr/include/boost/thread/pthread/recursive_mutex.hpp:67] -> void
> boost::recursive_mutex::lock(), expr: !pthread_mutex_lock(&m)
> Aborted
>
> any hints?
>
> Regards
> yimei
>
> --
> View this message in context: http://openrave-users-list.185357.n3.nabble.com/inverse-kinematics-using-the-c-interface-tp949693p972173.html
> Sent from the OpenRAVE Users List mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users