With the same premise as my [previous question](https://answers.ros.org/question/312992/restrict-joint-limits-how-to-clone-jointmodel-to-update-a-jointmodelgroup/), 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 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( 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](https://github.com/ros-planning/moveit/blob/abc4f4070e300352c851f84fb53fa6d06c9eacbb/moveit_core/robot_model/src/robot_model.cpp#L1269) 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?
↧