int dummyEffect(const ParameterList & parameterList,
          predicateCallbackType  predicateCallback,
          numericalFluentCallbackType numericalFluentCallback,
          int relaxed, vector<double>& writtenVars)
{
   ROS_DEBUG("Calling %s module", __func__);
   if(predicateCallback == NULL)
      return false;
   PredicateList pl;
   ParameterList paramList;
   paramList.push_back(Parameter("","","pos-1"));
   pl.push_back(Predicate("free", paramList));
   PredicateList* plp = &pl;
   bool ret = predicateCallback(plp); 
   if(!ret)
      return false;
   if(pl.empty())      // callback removed our predicate!
      return false;
   // now we could / should react on the value of the predicate. skip
   // this for the moment....
   std::cout << "(free pos-1) is currently " << pl.front().value <<
          std::endl;
   // write arbitrary value back
   writtenVars[0] = 17.0;
   return 0;
}
Exemple #2
0
 Conjunct& operator|| (const Predicate& predicate) {
     mPredicates.push_back(predicate);
     return *this;
 }
Exemple #3
0
 Conjunct(const Predicate& predicate) {
     mPredicates.push_back(predicate);
 }