Skip to content

Commit

Permalink
small fix for task priority assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
evelyd committed Nov 13, 2024
1 parent f3d12ca commit abf8a60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/IK/src/InverseKinematics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,8 @@ bool HumanIK::initializePoseTask(const std::string& taskName,
int priority;
if (!taskHandler->getParameter("priority", priority))
{
BiomechanicalAnalysis::log()->error("{} Parameter priority of the {} task is missing", logPrefix, taskName);
return false;
BiomechanicalAnalysis::log()->warn("{} Parameter priority of the {} task is missing, setting to 1 (soft priority)", logPrefix, taskName);
priority = 1;
}

// Retrieve the mask parameter from config file, using the task handler
Expand Down
10 changes: 5 additions & 5 deletions src/IK/tests/HumanIKTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ TEST_CASE("InverseKinematics test")
mapNodeData[7].I_omega_IMU = I_omega_IMU;

std::unordered_map<std::string, BiomechanicalAnalysis::IK::nodeData> poseNodeData;
poseNodeData["root_link"].I_R_IMU = I_R_IMU;
poseNodeData["root_link"].I_omega_IMU = I_omega_IMU;
poseNodeData["root_link"].I_position = I_position;
poseNodeData["root_link"].I_linearVelocity = I_linearVelocity;
poseNodeData["link0"].I_R_IMU = I_R_IMU;
poseNodeData["link0"].I_omega_IMU = I_omega_IMU;
poseNodeData["link0"].I_position = I_position;
poseNodeData["link0"].I_linearVelocity = I_linearVelocity;

qInitial.setConstant(0.0);

REQUIRE(ik.initialize(paramHandler, kinDyn));
REQUIRE(ik.setDt(0.1));
REQUIRE(ik.updatePoseTask("root_link", I_position, I_R_IMU, I_linearVelocity, I_omega_IMU));
REQUIRE(ik.updatePoseTask("link0", I_position, I_R_IMU, I_linearVelocity, I_omega_IMU));
REQUIRE(ik.updateOrientationTask(4, I_R_IMU, I_omega_IMU));
REQUIRE(ik.updateFloorContactTask(10, 11.0));
REQUIRE(ik.updateGravityTask(10, I_R_IMU));
Expand Down

0 comments on commit abf8a60

Please sign in to comment.