Revision 259aaff8 scout/libscout/src/test_behaviors/Odometry_new.cpp

View differences:

scout/libscout/src/test_behaviors/Odometry_new.cpp
30 30
  motor_bl_ticks_iter = scout_enc.bl_ticks - motor_bl_ticks_last;
31 31
  motor_br_ticks_iter = scout_enc.br_ticks - motor_br_ticks_last;
32 32
  
33
  // update the 
34
  motor_fl_ticks_last = scout_enc.fl_ticks;
35
  motor_fr_ticks_last = scout_enc.fr_ticks;
36
  motor_bl_ticks_last = scout_enc.bl_ticks;
37
  motor_br_ticks_last = scout_enc.br_ticks;
33 38

  
34 39
  avg_left_ticks = (float) motor_fl_ticks_iter;
35 40
  avg_right_ticks = (float) motor_fr_ticks_iter;
......
73 78
  scout_pos->y += loop_time/6 * (k01+2*(k11+k21)+k31);
74 79
  scout_pos->theta += loop_time/6 * (k02+2*(k12+k22)+k32);
75 80

  
76
  // update the 
77
  motor_fl_ticks_last = scout_enc.fl_ticks;
78
  motor_fr_ticks_last = scout_enc.fr_ticks;
79
  motor_bl_ticks_last = scout_enc.bl_ticks;
80
  motor_br_ticks_last = scout_enc.br_ticks;
81 81

  
82 82
}
83 83

  
......
90 90
  //Rate r(LOOP_RATE); 
91 91
  Duration r = Duration(LOOP_TIME);
92 92

  
93
  motors->set_sides(50,50, MOTOR_ABSOLUTE);
93
  motors->set_sides(-50,50, MOTOR_ABSOLUTE);
94 94

  
95 95
  while(ok())
96 96
  {

Also available in: Unified diff