Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An early call to planning_scene_monitor_->getStateMonitor()->getCurrentState() returns nan accelerations #2958

Open
AndyZe opened this issue Aug 8, 2024 · 2 comments
Labels
bug Something isn't working persistent Allows issues to remain open without automatic stalling and closing.

Comments

@AndyZe
Copy link
Member

AndyZe commented Aug 8, 2024

Description

As noticed in PR #2956. An early call to getCurrentRobotState() returns all-nan accelerations but seems to be fine after that.

KinematicState Servo::getCurrentRobotState() const
{
  bool have_current_state = false;
  while (rclcpp::ok() && !have_current_state)
  {
    have_current_state =
        planning_scene_monitor_->getStateMonitor()->waitForCurrentState(rclcpp::Clock(RCL_ROS_TIME).now(), ROBOT_STATE_WAIT_TIME /* s */);
    if (!have_current_state)
    {
      RCLCPP_WARN(logger_, "Waiting for the current state");
    }
  }
  moveit::core::RobotStatePtr robot_state = planning_scene_monitor_->getStateMonitor()->getCurrentState();
  return extractRobotState(robot_state, servo_params_.move_group_name);
}
.
.
KinematicState extractRobotState(const moveit::core::RobotStatePtr& robot_state, const std::string& move_group_name)
{
  ...
  // The accelerations here are all nan
  robot_state->copyJointGroupAccelerations(joint_model_group, current_state.accelerations);
  ...
}
@AndyZe AndyZe added the bug Something isn't working label Aug 8, 2024
Copy link

This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.

@github-actions github-actions bot added the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Sep 23, 2024
Copy link

github-actions bot commented Nov 8, 2024

This issue was closed because it has been stalled for 45 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2024
@github-project-automation github-project-automation bot moved this to ✅ Done in MoveIt Nov 8, 2024
@sea-bass sea-bass added persistent Allows issues to remain open without automatic stalling and closing. and removed stale Inactive issues and PRs are marked as stale and may be closed automatically. labels Jan 7, 2025
@sea-bass sea-bass reopened this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working persistent Allows issues to remain open without automatic stalling and closing.
Projects
None yet
Development

No branches or pull requests

2 participants