Results 1 to 6 of 6

Thread: OpenCOLLADA kinematics issues

  1. #1

    OpenCOLLADA kinematics issues

    Dear all,

    I am new to OpenCOLLADA and have several questions about kinematics.
    I want to parse <articulated_systems> but it is unclear for me how it implemented in OpenCOLLADA. Is there any class related to articulated systems, or how can I access it?

    Best regards,
    Anton

  2. #2
    Junior Member
    Join Date
    Mar 2010
    Posts
    13

    Re: OpenCOLLADA kinematics issues

    Hi Anton.

    I am not exactly sure, I think you need to check class KinematicsController from COLLADAFW. Let me know about your results.

    best regards,
    Alexey

  3. #3

    Re: OpenCOLLADA kinematics issues

    Thank you, Alexey!

    Don't you know what is the difference between Kinematics Scene in COLLADAFW and in COLLADASaxFWL?

    Regards,
    Anton

  4. #4
    Junior Member
    Join Date
    Mar 2010
    Posts
    13

    Re: OpenCOLLADA kinematics issues

    Quote Originally Posted by Anton
    Thank you, Alexey!

    Don't you know what is the difference between Kinematics Scene in COLLADAFW and in COLLADASaxFWL?

    Regards,
    Anton
    COLLADASaxFWL has "low-level" classes responsible for collada xml parsing and so on.
    At some point COLLADASaxFWL puts all xml data to data structures of COLLADAFW.
    You should use COLLADAFW. Here is a small example, how you can get articulated_system information.

    virtual bool writeKinematicsScene( const COLLADAFW::KinematicsScene* kinematicsScene )
    {
    const COLLADAFW::KinematicsControllerArray& controllers = kinematicsScene->getKinematicsControllers();
    std::cout << "found " << controllers.getCount() << " controllers" << std::endl;
    for (size_t i = 0; i < controllers.getCount(); i++) {
    COLLADAFW::KinematicsController* controllerPtr = controllers[i];
    const COLLADAFW::AxisInfoArray& axisInfos = controllerPtr->getAxisInfos();
    std::cout << "found " << axisInfos.getCount() << " axis_info tags" << std::endl;
    for (size_t x = 0; x < axisInfos.getCount(); x++) {
    const COLLADAFW::AxisInfo& axisInfo = axisInfos[x];
    std::cout << "found axis with index: " << axisInfo.getIndex() << std::endl;

    std::string isActive = axisInfo.getIsActive()==true ? "true":"false";
    std::cout << " axis active: " << isActive << std::endl;
    std::string isLocked = axisInfo.getIsLocked()==true ? "true":"false";
    std::cout << " axis locked: " << isLocked << std::endl;

    COLLADAFW::JointPrimitive* jointPrimitivePtr = axisInfo.getJointPrimitive();
    COLLADABU::Math::Vector3 axis = jointPrimitivePtr->getAxis();
    std::cout << " joint axis: " << axis.x <<" "<< axis.y <<" "<< axis.z << std::endl;

    float softLimitMax = jointPrimitivePtr->getSoftLimitMax();
    float softLimitMin = jointPrimitivePtr->getSoftLimitMin();
    std::cout << " soft limit min: " <<softLimitMin << " soft limit max: " << softLimitMax << std::endl;

    float hardLimitMax = jointPrimitivePtr->getHardLimitMax();
    float hardLimitMin = jointPrimitivePtr->getHardLimitMin();
    std::cout << " hard limit min: " <<hardLimitMin << " hard limit max: " << hardLimitMax << std::endl;

    const COLLADAFW::MotionProfile& motionProfile = jointPrimitivePtr->getMotionProfile();
    float acceleration = motionProfile.getReferenceAcceleration();
    float deceleration = motionProfile.getReferenceDeceleration();
    float jerk = motionProfile.getReferenceJerk();
    float speed = motionProfile.getReferenceSpeed();
    std::cout << " acceleration: " << acceleration << " deceleration: " << deceleration << " jerk: " << jerk << "speed: " << speed << std::endl;
    }
    }
    return true;
    }

  5. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    13

    Re: OpenCOLLADA kinematics issues

    Forgot to mention that you should read this thread about problem with KinematicsController copy construction, Here is the link http://code.google.com/p/opencollada...wner%20Summary

    I also attached the model with the articulated_system. When you are working with kinematics models using openCOLLADA lib you should first do a model validation (use openCOLLADAValidator) to check if the model is valid against COLLADA 1.5 scheme.

  6. #6

    Re: OpenCOLLADA kinematics issues

    Thank you for help, Alexey! But it is still unclear for me how tags <frame_origin>,<frame_tcp> and <frame_tip> are realized in OpenCOLLADA. How can i parse them?

    Anton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •