moveit / moveit2

:robot: MoveIt for ROS 2
https://moveit.ai/
BSD 3-Clause "New" or "Revised" License
1.05k stars 514 forks source link

No kinematics solver instantiated for group 'arm' #2917

Open zhouyongyi opened 2 months ago

zhouyongyi commented 2 months ago

Description

Hi. I build moveit_config_package using moveit_setup_assistant from my own urdf. I install pick_ik plugin and modified kinematics.yaml as below.

arm:
  kinematics_solver: pick_ik/PickIkPlugin
  kinematics_solver_timeout: 0.05
  kinematics_solver_attempts: 3
  mode: global
  position_scale: 1.0
  rotation_scale: 0.5
  position_threshold: 0.001
  orientation_threshold: 0.01
  cost_threshold: 0.001
  minimal_displacement_weight: 0.0
  gd_step_size: 0.0001

I write a simple node base on the instruction in here. When I run this simple node, I got the following error log. And real arm didn't move.

[INFO] [1721283620.149320877] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 1.02484 seconds [INFO] [1721283620.149397762] [moveit_robot_model.robot_model]: Loading robot model 'rml_63_gripper_description'... [WARN] [1721283620.195971420] [moveit_ros.robot_model_loader]: No kinematics plugins defined. Fill and load kinematics.yaml! [INFO] [1721283620.205834940] [move_group_interface]: Ready to take commands for planning group arm. [INFO] [1721283620.206336457] [moveit_ros.current_state_monitor]: Listening to joint states on topic 'joint_states' [INFO] [1721283621.206451246] [moveit_ros.current_state_monitor]: Didn't receive robot state (joint angles) with recent timestamp within 1.000000 seconds. Requested time 1721283620.206350, but latest received state has time 0.000000. Check clock synchronization if your are running ROS across multiple machines! [ERROR] [1721283621.206508374] [move_group_interface]: Failed to fetch current robot state

I wrote another complicated node, which control real arm to execute trajectory. I used code as below:

geometry_msgs::msg::Pose goal;
move_group_->setJointValueTarget(goal, "Link00");
move_group_->move();

After I run this code, I also get the same warning:

[WARN] [1721283620.195971420] [moveit_ros.robot_model_loader]: No kinematics plugins defined. Fill and load kinematics.yaml!

And I got a new error log:

[ERROR] [1721283094.638409609] [moveit_robot_state.robot_state]: No kinematics solver instantiated for group 'arm' [INFO] [1721283094.639067653] [move_group_interface]: Plan and Execute request accepted [INFO] [1721283094.920604840] [move_group_interface]: Plan and Execute request complete!

But I try to get ros2 param and get result as below, it seems that I loaded kinematics solver successfully. So why these things happened? Screenshot from 2024-07-18 14-44-17

Your environment

Expected behaviour

No Error log, and the real robot arm work as what I exepected.

Actual behaviour

I got Error and real robot arm doesn't move at all. unless I use these kind of function:

std::vector<double> goal_joints = {0.0067008, -0.422063, 1.29788, -0.032265, 1.97607, 0.0046417};
move_group_->setJointValueTarget(goal_joints);
auto res = move_group_->move();

If I give moveit the exact joints, the real arm will move.

navdotnetreqs commented 1 month ago

I have the same thing running ROS2 Iron, both with gazebo and the model of a real arm. Very weirdly, however, this sample works (as the poster writes)! But just running move_group_interface.getCurrentJointValues(); fails

https://robotics.stackexchange.com/questions/111430/failed-to-fetch-current-robot-state-when-using-mgi-in-wall-timer-callback-functi