@@ -127,6 +127,21 @@ The robot was placed a few metres from the door. The video (Fig 6) shows the rob
...
@@ -127,6 +127,21 @@ The robot was placed a few metres from the door. The video (Fig 6) shows the rob
#### Task 2:
#### Task 2:
Look into the three classes and try to identify how the triggering conditions are implemented in each of the classes and how the actions for each behavior is implemented.
#### Result:
Every command class has a triggering condition except 'cruise' which is always on unless it overruled by another.
Follow: Is executed when frontLight is larger than lightThreshold. Otherwise it runs noCommand().
Avoid: Is executed when frontDistance is less than stopThreshold. Otherwise it runs noCommand().
Escape: Is executed if one of the front bumpers are activated. Otherwise it runs noCommand().
#### Task 3:
Watch the car with only the cruise thread active and then with only the cruise and the follow threads active to observe the behaviors more clearly.
Watch the car with only the cruise thread active and then with only the cruise and the follow threads active to observe the behaviors more clearly.