Improve error message

Indicate source of error as CartesianPath.
This commit is contained in:
Robert Haschke 2024-12-06 12:07:15 +01:00
parent d5e1376b08
commit f29784e750

View File

@ -81,7 +81,7 @@ PlannerInterface::Result CartesianPath::plan(const planning_scene::PlanningScene
Eigen::Isometry3d ik_pose_world;
if (!utils::getRobotTipForFrame(props.property("ik_frame"), *from, jmg, error_msg, link, ik_pose_world))
return { false, error_msg };
return { false, "CartesianPath: " + error_msg };
Eigen::Isometry3d offset = from->getCurrentState().getGlobalLinkTransform(link).inverse() * ik_pose_world;
@ -127,7 +127,7 @@ PlannerInterface::Result CartesianPath::plan(const planning_scene::PlanningScene
props.get<double>("max_acceleration_scaling_factor"));
if (achieved_fraction < props.get<double>("min_fraction")) {
return { false, "min_fraction not met. Achieved: " + std::to_string(achieved_fraction) };
return { false, "CartesianPath: min_fraction not met. Achieved: " + std::to_string(achieved_fraction) };
}
return { true, "achieved fraction: " + std::to_string(achieved_fraction) };
}