Project

General

Profile

Revision 6761a531

ID6761a53177d5f8d6771f18a6f948abccc4365076

Added by Priya about 12 years ago

Pushing modified behavior process that requires less arguments and appends scoutname to ros node name. and a compiling but not tested version of test_behaviors (scheduler and wh_robot)

View differences:

scout/libscout/src/helper_classes/Order.cpp
45 45
    return est_time;
46 46
}
47 47

  
48
int Order::get_priority() const
49
{
50
    return start_time.toSec() + MAX_WAIT_TIME - est_time.toSec();
51
}
52

  
48 53
bool Order::operator==(Order& order)
49 54
{
50 55
  return this->id == order.id;
......
62 67
 */
63 68
bool CompareOrder::operator()(Order& o1, Order& o2) 
64 69
{
65
  int pq_value1 = o1.get_start_time + MAX_WAIT_TIME - o1.get_est_time();
66
  int pq_value2 = o2.get_start_time + MAX_WAIT_TIME - o2.get_est_time();
67
  return pq_value1 > pq_value2;
70
  return o1.get_priority() > o2.get_priority();
68 71
}
69 72

  

Also available in: Unified diff