| 829 | } |
| 830 | |
| 831 | void initialize() |
| 832 | { |
| 833 | mRestConfig = mHubo->getPositions(); |
| 834 | |
| 835 | for (std::size_t i = 0; i < mHubo->getNumEndEffectors(); ++i) { |
| 836 | const InverseKinematicsPtr ik = mHubo->getEndEffector(i)->getIK(); |
| 837 | if (ik) { |
| 838 | mDefaultBounds.push_back(ik->getErrorMethod().getBounds()); |
| 839 | mDefaultTargetTf.push_back(ik->getTarget()->getRelativeTransform()); |
| 840 | mConstraintActive.push_back(false); |
| 841 | mEndEffectorIndex.push_back(i); |
| 842 | } |
| 843 | } |
| 844 | |
| 845 | mPosture = std::dynamic_pointer_cast<RelaxedPosture>( |
| 846 | mHubo->getIK(true)->getObjective()); |
| 847 | |
| 848 | mBalance = std::dynamic_pointer_cast<dart::constraint::BalanceConstraint>( |
| 849 | mHubo->getIK(true)->getProblem()->getEqConstraint(1)); |
| 850 | |
| 851 | mOptimizationKey = 'r'; |
| 852 | |
| 853 | mMoveComponents.resize(TeleoperationWorld::NUM_MOVE, false); |
| 854 | } |
| 855 | |
| 856 | bool handle( |
| 857 | const ::osgGA::GUIEventAdapter& ea, ::osgGA::GUIActionAdapter&) override |
nothing calls this directly
no test coverage detected