38 #include <gtest/gtest.h>
44 const robot_state::RobotState& actual,
const double epsilon,
45 const std::string& group_name =
"")
47 if (group_name.empty() && expected.distance(actual) <= epsilon)
49 return ::testing::AssertionSuccess();
51 else if (!group_name.empty() && expected.distance(actual, actual.getJointModelGroup(group_name)) <= epsilon)
53 return ::testing::AssertionSuccess();
55 std::stringstream msg;
56 msg <<
" expected: " << expected <<
" actual: " << actual;
58 return ::testing::AssertionFailure() << msg.str();
62 #endif // CENTERAUXILIARY_H