diff --git a/src/IK/src/InverseKinematics.cpp b/src/IK/src/InverseKinematics.cpp index ab934f7..b04be32 100644 --- a/src/IK/src/InverseKinematics.cpp +++ b/src/IK/src/InverseKinematics.cpp @@ -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 diff --git a/src/IK/tests/HumanIKTest.cpp b/src/IK/tests/HumanIKTest.cpp index 8883b9e..c8dd424 100644 --- a/src/IK/tests/HumanIKTest.cpp +++ b/src/IK/tests/HumanIKTest.cpp @@ -50,16 +50,16 @@ TEST_CASE("InverseKinematics test") mapNodeData[7].I_omega_IMU = I_omega_IMU; std::unordered_map 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));