moveit2 icon indicating copy to clipboard operation
moveit2 copied to clipboard

move_group error. ros2

Open MOShka78 opened this issue 1 year ago • 0 comments

Your environment

  • ROS Distro: [Humble]
  • OS Version: Ubuntu 22.04

Expected behaviour

An error occurs when sending a message to the action server. A move_group object is created in the action server to find out the current state of the robot. Below is the code.

 group->clearPoseTarget();
  group->clearPoseTargets();
  group->clearPathConstraints();
  group->clearTrajectoryConstraints();
  group->setEndEffectorLink(goal->ee_link);

  moveit::core::RobotStatePtr robot_state_ptr = group->getCurrentState();  // <-- this is where the error occurs
  RCLCPP_ERROR(rclcpp::get_logger("MoveToPose"), " e.what()");
  if (!robot_state_ptr) {
    throw std::runtime_error(
        "Cant get current state in moveit, check time syncro");
  }
  moveit::core::RobotState start_state(*robot_state_ptr);

  group->setStartState(start_state);

The error looks like this: "Didn't received robot state (joint angles) with recent timestamp within 1 seconds. Check clock synchronization if your are running ROS across multiple machines" terminal

MOShka78 avatar Mar 02 '24 07:03 MOShka78