21 #include "asr_robot_model_services/IsPositionAllowed.h" 36 isPositionAllowedServiceClient = n.
serviceClient<asr_robot_model_services::IsPositionAllowed>(
"/asr_robot_model_services/IsPositionAllowed");
49 ROS_INFO_STREAM(
"Number of deleted ptuTuple by FilterIsPositionAllowed: " << deleteCount);
53 bool shouldPtuTupleBeDeleted(
const RobotStatePtrVec::iterator &posesToExploreIter,
const PtuTuplePtrVec::iterator &ptuTuplePtrIter) {
54 bool shouldDelete =
false;
55 asr_robot_model_services::IsPositionAllowed isPositionAllowedCall;
56 isPositionAllowedCall.request.targetPosition = posesToExploreIter->get()->getRobotPosePtr()->position;
57 if (isPositionAllowedServiceClient.
call(isPositionAllowedCall)) {
58 shouldDelete = !isPositionAllowedCall.response.isAllowed;
60 ROS_ERROR_STREAM(
"Service IsPositionAllowed to robot_model_services was not successful -> no filter of FilterIsPositionAllowed");
61 wasSuccessful =
false;
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
virtual ~FilterIsPositionAllowed()
bool call(MReq &req, MRes &res)
ROSCPP_DECL const std::string & getName()
const RobotStatePtrVecPtr & posesToExplorePtr
bool wasIterationSuccessful()
boost::shared_ptr< FilterIsPositionAllowed > FilterIsPositionAllowedPtr
bool waitForExistence(ros::Duration timeout=ros::Duration(-1))
bool shouldPtuTupleBeDeleted(const RobotStatePtrVec::iterator &posesToExploreIter, const PtuTuplePtrVec::iterator &ptuTuplePtrIter)
#define ROS_INFO_STREAM(args)
ros::ServiceClient isPositionAllowedServiceClient
#define ROS_ERROR_STREAM(args)
FilterIsPositionAllowed(const RobotStatePtrVecPtr &posesToExplorePtr)