Skip to content

Commit

Permalink
Remove unneded validation of joint position
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Kamieniecki <[email protected]>
  • Loading branch information
arturkamieniecki committed Aug 2, 2023
1 parent ab26e65 commit c008f31
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Gems/ROS2/Code/Source/Manipulation/JointsManipulationComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,16 +444,9 @@ namespace ROS2
void JointsManipulationComponent::Stop()
{
for (auto& [jointName, jointInfo] : m_manipulationJoints)
{ // Set all target joint positions to their current positions.
auto jointPosition = GetJointPosition(jointName);
if (jointPosition.IsSuccess())
{
jointInfo.m_restPosition = jointPosition.GetValue();
}
else
{
AZ_Warning("JointsManipulationComponent", false, "Unable to get joint position for %s", jointName.c_str());
}
{ // Set all target joint positions to their current positions. There is no need to check if the outcome is successful, because
// jointName is always valid.
jointInfo.m_restPosition = GetJointPosition(jointName).GetValue();
}
}

Expand Down

0 comments on commit c008f31

Please sign in to comment.