lesliejaneth / opencollada

Automatically exported from code.google.com/p/opencollada
0 stars 0 forks source link

Problem with kinematics #159

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, All.

I am working with kinematics part of COLLADA.
In COLLADAFW's kinematics related classes I am not able to find
a field with initial position value of the joint.

To make things clear here is part of COLLADA file,
I am interested to know a value of the filed <float></float>

<!--part of the kr150.dae->
<library_kinematics_scenes id="libkinscenes">
  <kinematics_scene id="libkinscenes.kinScene">
     <instance_kinematics_model url="#kinmodel.0" sid="inst_kinmodel.0">
     ...
       <newparam sid="libkinscenes.kinScene_libkinscenes.kinScene_inst_kinmodel.0_joint_1_axis0_value">
     <float>-90</float>   <!--THIS FIELD-->>
       </newparam>
...

I attached a complete model, which I am importing.

Best regards,
Alexey

Original issue reported on code.google.com by Alexey.Z...@gmail.com on 13 Mar 2011 at 8:14

Attachments:

GoogleCodeExporter commented 8 years ago
I dig a code a little. 

the value has been parsed in COLLADASaxParser:

void KinematicsInstanceKinematicsModel::addKinematicsNewParam( 
KinematicsNewParam* newParam )
    {
        const String& name = newParam->getName();
        double value = newParam->getDoubleValue();
        mKinematicsNewParams.insert(std::make_pair(name, newParam));
    }

Later in COLLADASaxFrameworkLoader/src/COLLADASaxFWLKinematicsSceneCreator.cpp, 
when mapping to COLLADAFW data structures happens, KinematicsNewParams is used 
only to resolve a joint instance, but its initial value from the field <FLOAT> 
is ignored and not mapped. At least this is, how I understood it. :)    

Original comment by Alexey.Z...@gmail.com on 13 Mar 2011 at 8:22

GoogleCodeExporter commented 8 years ago
looks like everyone is on vocation :( 

Original comment by Alexey.Z...@gmail.com on 18 Mar 2011 at 1:46