Project

General

Profile

Revision 25694a03

ID25694a039a518c4f952916bb95f831b42a5e3359
Parent ddfeb111
Child 4918cbee

Added by Priya over 11 years ago

Changes so that scout1 automatically spawns upon creation of the
simulator environment, and that line follow just continuously follows
lines instead of prior line-following-capability testing code.

View differences:

scout/libscout/src/behaviors/line_follow.cpp
141 141

  
142 142
void line_follow::run()
143 143
{
144
  follow_line();
145
  turn_right();
146
  follow_line();
147
  turn_straight();
148
  motors->set_sides(-MOTOR_BASE, -MOTOR_BASE, MOTOR_ABSOLUTE);
149
  Duration meow(2);
150
  meow.sleep();
151
  spot_turn();
152
  follow_line();
144
  while(ok())
145
  {
146
    follow_line();
147
  }
153 148
}
scout/scoutsim/src/sim_frame.cpp
159 159

  
160 160
        width_in_meters = GetSize().GetWidth() / PIX_PER_METER;
161 161
        height_in_meters = GetSize().GetHeight() / PIX_PER_METER;
162

  
163
        spawnScout("scout1", 1.4, .78, 0);
162 164
    }
163 165

  
164 166
    SimFrame::~SimFrame()

Also available in: Unified diff