moveit / moveit2_tutorials

A sphinx-based centralized documentation repo for MoveIt 2
https://moveit.picknik.ai
BSD 3-Clause "New" or "Revised" License
149 stars 191 forks source link

`No kinematics solver instantiated` when called `robot_state.setFromIK()` after running `demo.launch.py` #941

Open julyfun opened 1 month ago

julyfun commented 1 month ago

Description

See Steps to reproduce.

Your environment

Steps to reproduce

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.

rhaschke commented 1 month ago

You need to ensure that your other cpp node also gets the kinematics parameters. Probably there is another warning complaining about missing kinematics parameters.

julyfun commented 1 month ago

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?