Skip to content

Commit

Permalink
Fix printing joint state by name
Browse files Browse the repository at this point in the history
  • Loading branch information
MarqRazz committed Dec 24, 2024
1 parent 602a36b commit 4e163eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions moveit_core/planning_scene/src/planning_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,7 @@ moveit::core::RobotState& PlanningScene::getCurrentStateNonConst()
robot_state_.value().setAttachedBodyUpdateCallback(current_state_attached_body_callback_);
}
robot_state_.value().update();
RCLCPP_INFO(getLogger(), "getCurrentStateNonConst(), joint 1: %f", robot_state_.value().getVariablePosition(0));
// RCLCPP_INFO(getLogger(), "getCurrentStateNonConst, joint 1: %f", robot_state_.value().getJointPositions("panda_joint1"));
RCLCPP_INFO(getLogger(), "getCurrentStateNonConst, joint 1: %f", *robot_state_.value().getJointPositions("panda_joint1"));
return robot_state_.value();
}

Expand Down Expand Up @@ -1559,7 +1558,7 @@ bool PlanningScene::processAttachedCollisionObjectMsg(const moveit_msgs::msg::At
robot_state_.value().setAttachedBodyUpdateCallback(current_state_attached_body_callback_);
}
robot_state_.value().update();
RCLCPP_WARN(getLogger(), "Updated robot_state_ has joint 1: %f", robot_state_.value().getVariablePosition(0));
RCLCPP_WARN(getLogger(), "Updated robot_state_ has joint 1: %f", *robot_state_.value().getJointPositions("panda_joint1"));

// The ADD/REMOVE operations follow this order:
// STEP 1: Get info about the object from either the message or the world/RobotState
Expand Down

0 comments on commit 4e163eb

Please sign in to comment.