`No kinematics solver instantiated` when called `robot_state.setFromIK()` after running `demo.launch.py`
Description
See Steps to reproduce.
Your environment
- ROS Distro: Humble
- OS Version: Ubuntu 22.04
- Binary build
- 2.5.5-1jammy
Steps to reproduce
- Setup a new robot from urdf using Setup Assistant. I have set
ik solvertoKDLPlugin. - Run
demo.launch.pyunder the package generated by Setup Assistant - In another cpp node:
Get MoveGroupInterface:
node_for_move_group(std::make_shared<rclcpp::Node>("node_for_move_group")),
move_group_interface(node_for_move_group, this->group_name),
Get RobotState and setFromIK():
auto kinematic_state = *(this->move_group_interface.getCurrentState());
bool found_ik = kinematic_state.setFromIK(this->joint_model_group, to, 10);
The full code is here: https://github.com/julyfun/fast_control/blob/c4eb5653791bcce04657a497453795800ce8895d/ik/src/moveit.cpp#L965
Expected behaviour
Get the IK result in kinematic_state
Backtrace or Console output
The Ik failed with:
[ik_moveit_exe-1] [ERROR] [1723098198.752732000] [moveit_robot_state.robot_state]: No kinematics solver instantiated for group 'left_dual2'
No other error or warning.
You need to ensure that your other cpp node also gets the kinematics parameters. Probably there is another warning complaining about missing kinematics parameters.
You need to ensure that your other cpp node also gets the kinematics parameters. Probably there is another warning complaining about missing kinematics parameters.
Thank you! I've found another warning during the launch time of the cpp node.
[ik_moveit_exe-1] [WARN] [1723100872.151901380] [moveit_ros.robot_model_loader]: No kinematics plugins defined. Fill and load kinematics.yaml!
Would you please remind me of how can a cpp node get kinematics parameters?
Hi, is there any other way to load the kinematics file (without adding it in the node parametrers) and so use peacefully the ik-functions ? I don't understand why we have to reload the kinematics file again. We already load it while launching the move_group and since we are using the MoveGroupInterface object (in c++) to interact with the move_group that has it.
Thanks you in advance for your time