Revision 751d4f4f
Made danger_marking depend on Odometry correctly
scout/libscout/src/test_behaviors/danger_marking.cpp | ||
---|---|---|
37 | 37 |
// Turn the sonar on. |
38 | 38 |
sonar->set_on(); |
39 | 39 |
wait(1.5); |
40 |
sonar->set_single(36);
|
|
40 |
sonar->set_range(35, 37);
|
|
41 | 41 |
|
42 | 42 |
motors->set_sides(-20, -20); |
43 | 43 |
|
... | ... | |
45 | 45 |
|
46 | 46 |
while (true) |
47 | 47 |
{ |
48 |
get_position(); |
|
49 |
ROS_INFO("Position: (%f, %f, %f).", |
|
50 |
scout_pos->x, scout_pos->y, scout_pos->theta); |
|
51 |
|
|
48 | 52 |
int *readings = sonar->get_sonar_readings(); |
49 | 53 |
dist = min(readings[35], min(readings[36], readings[37])); |
50 | 54 |
|
Also available in: Unified diff