Restrict joint limits: constructed JointModelGroup doesn't have a kinematics solver?

asked 2019-01-17 06:06:48 -0600

aPonza gravatar image

With the same premise as my previous question, while building my updated JointModelGroup i tried first testing what would happen using basically a copy of the original, with this code:

std::unique_ptr<moveit::core::JointModelGroup> MyClass::createRestrictedJointModelGroup(
    moveit::core::JointModelGroup joint_model_group_copy, XmlRpc::XmlRpcValue joint_limits)
{
  auto joint_vector = joint_model_group_copy.getJointModels();

  //  this is where the joint limits updating code goes

  return std::make_unique<moveit::core::JointModelGroup>( joint_model_group_copy.getName()
                                                        , joint_model_group_copy.getConfig()
                                                        , joint_vector
                                                        , &joint_model_group_copy.getParentModel());
}

By using the created JointModelGroup I get no robot motion, and this error: No kinematics solver instantiated for group 'panda_arm'. Using JointModelGroup::printGroupInfo() in both the original and the newly created objects, I found (as could be expected) that everything is the same except for a missing couple lines:

  * Kinematics solver bijection:
    0 1 2 3 4 5 6

Looking at the class header I found there is no setter, and looking through to where it gets instantiated I see a RoboModel::setKinematicsAllocators which leads me to think it's the robot model's job to create this.

So I'm left confused, since I'm giving the address of the same robot model I was using (&joint_model_group_copy.getParentModel()) returns the same address as move_group_.getRobotModel().get() where move_group_ is the class' instance of MoveGroupInterface), the kinematics solver should be gotten from there, shouldn't it?

edit retag flag offensive close merge delete