Revision 093a1aea
"Fixed" the sonar bug.
Turns out the sonar just wasn't set to on by default, so nothing was being visualized.
Changed it so the sonar is on by default.
We should probably make it more clear when the sonar is off.
scout/scoutsim/src/scout.cpp | ||
---|---|---|
64 | 64 |
float orient) |
65 | 65 |
: path_bitmap(path_bitmap) |
66 | 66 |
, sonar_visual_on(false) |
67 |
, sonar_on(true) |
|
67 | 68 |
, node (nh) |
68 | 69 |
, scout_image(scout_image) |
69 | 70 |
, pos(pos) |
... | ... | |
249 | 250 |
unsigned int Scout::trace_sonar(const wxImage& walls_image, int x, int y, |
250 | 251 |
double robot_theta, int sonar_pos, |
251 | 252 |
wxMemoryDC& sonar_dc) |
252 |
|
|
253 | 253 |
{ |
254 | 254 |
double angle = robot_theta + (PI * ((float) sonar_pos) / 24.0) - PI / 2; |
255 | 255 |
unsigned int d = 0; |
... | ... | |
521 | 521 |
|
522 | 522 |
void Scout::set_sonar_visual(bool on) |
523 | 523 |
{ |
524 |
/// @todo Remove |
|
525 |
ROS_INFO("Sonar visual on set."); |
|
526 | 524 |
sonar_visual_on = on; |
527 | 525 |
} |
528 | 526 |
} |
Also available in: Unified diff