3 #include <VirtualRobot/Robot.h>
14 goal_(goal), scene(scene), config(config), reachedCount(0)
25 const core::Pose world_T_robot(scene.robot->getGlobalPose());
28 const core::Pose robot_T_goal = world_T_robot.inverse() * world_T_goal;
32 const bool posReached = robot_T_goal.translation().head<2>().
norm() <= config.posTh;
33 const bool oriReached = Eigen::AngleAxisf(robot_T_goal.linear()).angle() <= config.oriTh;
37 ARMARX_DEBUG <<
"Position goal `" << robot_T_goal.translation().head<2>()
46 const bool linearVelocityLow = scene.platformVelocity.linear.norm() < config.linearVelTh;
47 const bool angularVelocityLow = scene.platformVelocity.angular.norm() < config.angularVelTh;
49 const bool velocityLow = linearVelocityLow and angularVelocityLow;
56 bool reached = posReached and oriReached and velocityLow;
61 ARMARX_DEBUG <<
"Goal reached! reachedCount: " << reachedCount;
62 return !filter || (reachedCount >= config.filterCount);
78 goal_{other.goal_}, scene{other.scene}, config(other.config)