Quantcast

How to load IKSolver in cpp which was generated in Python

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to load IKSolver in cpp which was generated in Python

Huzaifa
I am trying to load an IKSolver in cpp which I have already created in Python using ikmodel.autogenerate(). I have tried the following 2 ways but both fail.

1
ModuleBasePtr pikfast = RaveCreateModule(penv,"ikfast");
        penv->Add(pikfast,true,"");
        stringstream ssin,ssout;
        ssin << "LoadIKFastSolver " << probot->GetName() << " " << (int)IKP_Transform6D;
        if( !pikfast->SendCommand(ssout,ssin) ) {
            throw OPENRAVE_EXCEPTION_FORMAT0("failed to load iksolver", ORE_Assert);
        }

2
ModuleBasePtr pikfast = RaveCreateModule(penv,"ikfast");
        penv->Add(pikfast,true,"");
        stringstream ssin,ssout;
        ssin << "AddIkLibrary myik ~/.openrave/kinematics.3599d930e8a3e7e7ef95c62b7fb7bb55/ikfast62.Transform6D.i686.0_1_3_4_5.so";
        if( !pikfast->SendCommand(ssout,ssin) ) {
            throw OPENRAVE_EXCEPTION_FORMAT0("failed to load iksolver", ORE_Assert);
        }

kinematics.3599d930e8a3e7e7ef95c62b7fb7bb55/ikfast62.Transform6D.i686.0_1_3_4_5.so is the file generated by python's ikmodel.autogenerate().

Any help in this regard will be appreciated.

Regards
Huzaifa
Loading...