Skip to content

Commit

Permalink
word logic better
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wiznitzer committed Jan 26, 2023
1 parent 9f6db75 commit 2f06f2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/bio_ik/robot_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class RobotInfo
info.max_velocity_rcp = info.max_velocity > 0.0 ? 1.0 / info.max_velocity : 0.0;

variables.push_back(info);
has_bounds.push_back(!bounded);
has_bounds.push_back(bounded);
}

for(size_t ivar = 0; ivar < model->getVariableCount(); ivar++)
Expand Down
4 changes: 2 additions & 2 deletions src/kinematics_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,8 @@ struct BioIKKinematicsPlugin : kinematics::KinematicsBase {
}
state[ivar] = v;

// wrap angles that are not continuous
if(!robot_info.hasBounds(ivar))
// wrap angles that are bounded
if(robot_info.hasBounds(ivar))
{
auto* joint_model = robot_model->getJointOfVariable(ivar);
joint_model->enforcePositionBounds(state.data() + ivar, joint_model->getVariableBounds());
Expand Down

0 comments on commit 2f06f2c

Please sign in to comment.