moveit2
moveit2 copied to clipboard
An early call to `planning_scene_monitor_->getStateMonitor()->getCurrentState()` returns `nan` accelerations
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);
...
}
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.
This issue was closed because it has been stalled for 45 days with no activity.