commit 4c9fb6ba47674f79bb45e93ecbc146c4f8dce7a4
Author: viki <zeh@andrew.cmu.edu>
Date:   Wed Apr 3 22:19:56 2013 -0400

    Update smart_runaround and add old files.

diff --git a/scout/libscout/src/BehaviorList.cpp b/scout/libscout/src/BehaviorList.cpp
index 6c99696..fc28d2b 100644
--- a/scout/libscout/src/BehaviorList.cpp
+++ b/scout/libscout/src/BehaviorList.cpp
@@ -27,9 +27,11 @@ BehaviorList::BehaviorList()
   behavior_list.push_back(behavior<line_follow>);
   behavior_list.push_back(behavior<navigationMap>);
   behavior_list.push_back(behavior<wl_test>);
+  behavior_list.push_back(behavior<Odometry_new>);
   behavior_list.push_back(behavior<Scheduler>);
   behavior_list.push_back(behavior<WH_Robot>);
   behavior_list.push_back(behavior<maze_solve>);
+  behavior_list.push_back(behavior<maze_solve_zane>);
   behavior_list.push_back(behavior<smart_runaround>);
   return;
 }
diff --git a/scout/libscout/src/BehaviorList.h b/scout/libscout/src/BehaviorList.h
index 50daa72..c97dc22 100644
--- a/scout/libscout/src/BehaviorList.h
+++ b/scout/libscout/src/BehaviorList.h
@@ -28,9 +28,11 @@
 #include "behaviors/line_follow.h"
 #include "behaviors/navigationMap.h"
 #include "behaviors/wl_test.h"
+#include "test_behaviors/Odometry_new.h"
 #include "test_behaviors/Scheduler.h"
 #include "test_behaviors/WH_Robot.h"
 #include "test_behaviors/maze_solve.h"
+#include "test_behaviors/maze_solve_zane.h"
 #include "test_behaviors/smart_runaround.h"
 
 template<typename T> Behavior* behavior(std::string scoutname, Sensors* sensors){ return (Behavior*)new T(scoutname, sensors); } 
diff --git a/scout/libscout/src/test_behaviors/maze_solve.cpp b/scout/libscout/src/test_behaviors/maze_solve.cpp
index 99fa3ca..511b0b3 100644
--- a/scout/libscout/src/test_behaviors/maze_solve.cpp
+++ b/scout/libscout/src/test_behaviors/maze_solve.cpp
@@ -25,246 +25,103 @@
 
 #include "maze_solve.h"
 
-using namespace std;
-
+#define D_THRESH 600
+#define max(x,y) ((x > y) ? x : y)
 
-// want to have a minimal working thing, use a big enough 
-// static array and start in the middle
-// we assume we are facing right, that affects where we store
-// wall information
-// -1 for wall, 0 for unseen, 1 for traveled, 2 for critical
-#define WALL -1
-#define UNSEEN 0
-#define SEEN 1
-#define CRITICAL 2
-// facings
-#define UP 0
-#define RIGHT 1
-#define DOWN 2
-#define LEFT 3
+using namespace std;
 
-// TODO This is bad! It's defined globally across all files. Please put it inside a good scope. -Alex
-Duration sonar_update_time(1.5);
+void maze_solve::spin_for(double duration)
+{
+    ros::Rate r(100);     // 100 hz
+    int ticks = int(duration * 100);
+    for (int i = 0; i < ticks; i++)
+    {
+        spinOnce();
+        r.sleep();
+    }
+}
 
 void maze_solve::run()
 {    
-    // TODO:first initialize map to all 0's
     ROS_INFO("Starting to solve the maze");
+
     // Go up to the first line.
     follow_line();
+
     // Turn the sonar on.
     sonar->set_on();
     sonar->set_range(0, 23);
 
-    // Wait for the sonar to initialize.
-    while(!look_around(25, 25, RIGHT) && ok())
-    {
-      spinOnce();      
-    }
-
-    // Solve the maze
-    bool finished = solve(25,25, RIGHT);
-
-    // Check and report final condition.
-    if (finished)
-        ROS_INFO("YAY! I have solved the maze");
-    else
-        ROS_INFO("NO! The maze is unsolvable");
-}
-
-bool maze_solve::solve(int row, int col, int dir)
-{
-    int initial_dir = dir;
-
-    ROS_INFO("I am at direction %d", dir);
-
-    // use backtracking to solve the maze
-    if (at_destination())
-        return true;
+    ROS_INFO("Off we go!");
 
-    // Wait for sonar to update.
-    sonar_update_time.sleep();
-
-    // this function should fill the adjacent cells around me with
-    // wall's or paths
-    while(!look_around(row, col, dir) && ok())
+    while (!at_destination())
     {
-        spinOnce();
-    }
-
-    /* try go up */
-    if (map[row-1][col] != WALL && initial_dir != UP)
-    {
-    ROS_INFO("GOING UP!");
-        // Turn up.
-        turn_from_to(dir, UP);
-        follow_line();
-        // Solve recursively.
-        bool solved = solve(row-1, col, DOWN);
-        if (solved)
+        // Wait for sonar to update.
+        spin_for(1.5);
+        int* readings = sonar->get_sonar_readings();
+        
+        // Wait until the sonar gives us real values.
+        bool readings_ok = true;
+        cout << "[";
+        for (int i = 0; i < 48; i++)
         {
-            return solved;
+            if (i == 24 || i == 36 || i == 0)
+            {
+                cout << "(" << readings[i] << ") ";
+            }
+            else
+            {
+                cout << readings[i] << " ";
+            }
+            if (readings[i] == 0)
+            {
+                ROS_INFO("Waiting. readings[%d] == 0.", i);
+                readings_ok = false;
+                break;
+            }
         }
-        else
-        {
-            //Update where we are.
-            dir = UP;
-        }
-    }
-    /* try right */
-    if (map[row][col+1] != WALL && initial_dir != RIGHT)
-    {
-    ROS_INFO("GOING RIGHT!");
-        // Turn right.
-        turn_from_to(dir, RIGHT);
-        follow_line();
-        // Solve recursively.
-        bool solved = solve(row, col+1, LEFT);
-        if (solved)
-        {
-            return solved;
-        }
-        else
+        cout << endl;
+
+        if (!readings_ok)
         {
-            //Update where we are.
-            dir = RIGHT;
+            continue;
         }
-    }
-    /* try down */
-    if (map[row+1][col] != WALL && initial_dir != DOWN)
-    {
-    ROS_INFO("GOING DOWN!");
-        // Turn down.
-        turn_from_to(dir, DOWN);
-        follow_line();
-        // Solve recursively.
-        bool solved = solve(row+1, col, UP);
-        if (solved)
+
+        int r_read = max(readings[23], max(readings[24], readings[25]));
+        int s_read = max(readings[35], max(readings[36], readings[37]));
+        int l_read = max(readings[47], max(readings[0],  readings[1]));
+
+        ROS_INFO("Left: %d. Straight: %d. Right: %d.", l_read, s_read, r_read);
+
+        if (r_read > D_THRESH)      // Right
         {
-            return solved;
+            ROS_INFO("Right.");
+            turn_right();
         }
-        else
+        else if (s_read > D_THRESH) // Straight
         {
-            //Update where we are.
-            dir = DOWN;
+            ROS_INFO("Straight.");
+            turn_straight();
         }
-    }
-    /* try left */
-    if (map[row][col-1] != WALL && initial_dir != LEFT)
-    {
-    ROS_INFO("GOING LEFT!");
-        // Turn down.
-        turn_from_to(dir, LEFT);
-        follow_line();
-        // Solve recursively.
-        bool solved = solve(row, col-1, RIGHT);
-        if (solved)
+        else if (l_read > D_THRESH)   // Left
         {
-            return solved;
+            ROS_INFO("Left.");
+            turn_left();
         }
-        else
+        else                                                        // Deadend
         {
-            //Update where we are.
-            dir = LEFT;
-        }
-    }
-
-    ROS_INFO("DEAD END FOUND, TURNING BACK.");
-    // we have exhausted all the options. This path is clearly a
-    // dead end. go back to where we come from and return false.
-    turn_from_to(dir, initial_dir);
-    follow_line();
-    return false;
-}
-
-// this function takes in the current direction and turns the scout
-// into it intended direction
-void maze_solve::turn_from_to(int current_dir, int intended_dir) {
-    switch ((4 + intended_dir - current_dir) % 4) 
-    {
-        case 0:
+            ROS_INFO("Dead end.");
             spot_turn();
-            break;
-        case 1:
-            turn_left();
-            break;
-        case 2:
-            turn_straight();
-            break;
-        case 3:
-            turn_right();
-            break;
-    }
-}
-
-bool maze_solve::look_around(int row, int col, int dir)
-{
-    // look around current place using sonar
-    // store whether or not
-    // there is a wall into the map
-    // stores at row col 2 if point is critical, 1 otherwise
-    
-    int* readings = sonar->get_sonar_readings();
-    spinOnce();
-
-/*
-    // Look to the left.
-    int left_distance = (readings[1] + readings[0] + readings[47])/3;
-    // Look to the front.
-    int front_distance = (readings[35] + readings[36] + readings[37])/3;
-    // Look to the right.
-    int right_distance = (readings[23] + readings[24] + readings[25])/3;
-*/
-    // Look to the left.
-    int left_distance = readings[0];
-    // Look to the front.
-    int front_distance = readings[36];
-    // Look to the right.
-    int right_distance = readings[24];
-
-    ROS_INFO("front: %d  left: %d  right: %d", front_distance, left_distance, right_distance);
-
-    if (right_distance == 0 || front_distance == 0 || left_distance == 0)
-      return false;
+        }
 
-    switch (dir)
-    {
-        case UP:
-            // If the distance is less than 500, mark the area as a wall otherwise
-            // mark it as seen.
-            map[row][col+1] = (left_distance < 500)?WALL:SEEN;
-            map[row+1][col] = (front_distance < 500)?WALL:SEEN;
-            map[row][col-1] = (right_distance < 500)?WALL:SEEN;
-            break;
-        case RIGHT:
-            // If the distance is less than 500, mark the area as a wall otherwise
-            // mark it as seen.
-            map[row+1][col] = (left_distance < 500)?WALL:SEEN;
-            map[row][col-1] = (front_distance < 500)?WALL:SEEN;
-            map[row-1][col] = (right_distance < 500)?WALL:SEEN;
-            break;
-        case DOWN:
-            // If the distance is less than 500, mark the area as a wall otherwise
-            // mark it as seen.
-            map[row][col-1] = (left_distance < 500)?WALL:SEEN;
-            map[row-1][col] = (front_distance < 500)?WALL:SEEN;
-            map[row][col+1] = (right_distance < 500)?WALL:SEEN;
-            break;
-        case LEFT:
-            // If the distance is less than 500, mark the area as a wall otherwise
-            // mark it as seen.
-            map[row-1][col] = (left_distance < 500)?WALL:SEEN;
-            map[row][col+1] = (front_distance < 500)?WALL:SEEN;
-            map[row+1][col] = (right_distance < 500)?WALL:SEEN;
-            break;
+        follow_line();
     }
-
-    return true;
 }
 
 bool maze_solve::at_destination() 
 {
     vector<uint32_t> readings = linesensor->query();
+    //ROS_INFO("Readings: %d %d %d %d %d %d %d %d.", readings[0], readings[1], readings[2], readings[3], readings[4], readings[5], readings[6], readings[7]);
     if ( readings[0] > 200 &&
          readings[1] < 55 &&
          readings[2] < 55 &&
@@ -274,6 +131,7 @@ bool maze_solve::at_destination()
          readings[6] < 55 &&
          readings[7] > 200 )
     {
+        ROS_INFO("\n\nDESTINATION\n\n");
         return true;
     }
     return false;
diff --git a/scout/libscout/src/test_behaviors/maze_solve.h b/scout/libscout/src/test_behaviors/maze_solve.h
index ae590df..cc27cce 100644
--- a/scout/libscout/src/test_behaviors/maze_solve.h
+++ b/scout/libscout/src/test_behaviors/maze_solve.h
@@ -26,6 +26,7 @@
 #ifndef _MAZE_SOLVE_H_
 #define _MAZE_SOLVE_H_
 
+#include <stdio.h>
 #include "../behaviors/line_follow.h"
 
 class maze_solve: public line_follow
@@ -35,11 +36,11 @@ class maze_solve: public line_follow
             line_follow(scoutname, "maze_solve", sensors) {};
         void run();
     private:
-        bool solve(int row, int col, int dir);
-        void turn_from_to(int current_dir, int intended_dir);
-        bool look_around(int row, int col, int dir);
+        void spin_for(double duration);
         bool at_destination();
 
+        Duration sonar_update_time;
+
         int map[60][60];
 };
 #endif
diff --git a/scout/libscout/src/test_behaviors/smart_runaround.cpp b/scout/libscout/src/test_behaviors/smart_runaround.cpp
index 209ce2d..461cd59 100644
--- a/scout/libscout/src/test_behaviors/smart_runaround.cpp
+++ b/scout/libscout/src/test_behaviors/smart_runaround.cpp
@@ -59,29 +59,21 @@ float pix_to_m(int pixels)
     return pixels/200.0;
 }
 
-// meters to pixels
-int m_to_idx(float meters)
+// millimeters to pixels
+int mm_to_idx(float meters)
 {
-    float pixels = meters*200.0;
+    // 200 pixels per meter, and 1000 millimeters per meter
+    float pixels = meters*0.2;
     float idx = pixels/BLOCK_LENGTH;
     return floor(idx+0.5);
 }
 
-/* return a direction (if any) where adjacent block
- * is labeled "info" on map. Searches clockwise
- * starting at up. Returns -1 if no direction valid.
- */
-int smart_runaround::choose_direc(int row, int col, int info)
+float *matrix_mult(float inputs[2], float matrix[2][2])
 {
-    if (map[row-1][col] == info)
-	return UP;
-    else if (map[row][col+1] == info)
-	return RIGHT;
-    else if (map[row+1][col] == info)
-	return DOWN;
-    else if (map[row][col-1] == info)
-	return LEFT;
-    return -1;
+    float newX = matrix[0][0]*inputs[0]+matrix[0][1]*inputs[1];
+    float newY = matrix[1][0]*inputs[0]+matrix[1][1]*inputs[1];
+    float output[2] = {newX, newY};
+    return output;
 }
 
 // TODO This is bad! It's defined globally across all behaviors. Please fix this. -Alex
@@ -117,20 +109,19 @@ void smart_runaround::run(){
 
 
     int dir = RIGHT; // current direction
-    int new_dir = RIGHT; // direction in which to turn after a scan
+    //int new_dir = RIGHT; // direction in which to turn after a scan
     bool success = false; // true when maze solved
     while(ok())
     {
-	// Look left, right, and forward
 	look_around(row, col, dir);
 	// Try moving in each direction
-	new_dir = choose_direc(row, col, UNSEEN);
+	/*new_dir = choose_direc(row, col, UNSEEN);
 	if(new_dir < 0)
 	    new_dir = choose_direc(row, col, SEEN);
 	if(new_dir >= 0) {
 	    turn_from_to(dir, new_dir);
 	    dir = new_dir;
-	}
+	}*/
     }
 
     // Check and report final condition.
@@ -140,110 +131,21 @@ void smart_runaround::run(){
         ROS_INFO("NO! The maze is unsolvable");
 }
 
-// NOT CURRENTLY USED!!!
-bool smart_runaround::solve(int row, int col, int dir)
+/* return a direction (if any) where adjacent block
+ * is labeled "info" on map. Searches clockwise
+ * starting at up. Returns -1 if no direction valid.
+ */
+int smart_runaround::choose_direc(int row, int col, int info)
 {
-    int initial_dir = dir;
-
-    ROS_INFO("I am at direction %d", dir);
-
-    // use backtracking to solve the maze
-    if (at_destination())
-        return true;
-
-    // Wait for sonar to update.
-    sonar_update_time2.sleep();
-
-    // this function should fill the adjacent cells around me with
-    // wall's or paths
-    while(!look_around(row, col, dir) && ok())
-    {
-        spinOnce();
-    }
-
-    /* try go up */
-    if (map[row-1][col] != WALL && initial_dir != UP)
-    {
-    ROS_INFO("GOING UP!");
-        // Turn up.
-        turn_from_to(dir, UP);
-        follow_line();
-        // Solve recursively.
-        bool solved = solve(row-1, col, DOWN);
-        if (solved)
-        {
-            return solved;
-        }
-        else
-        {
-            //Update where we are.
-            dir = UP;
-        }
-    }
-    /* try right */
-    if (map[row][col+1] != WALL && initial_dir != RIGHT)
-    {
-    ROS_INFO("GOING RIGHT!");
-        // Turn right.
-        turn_from_to(dir, RIGHT);
-        follow_line();
-        // Solve recursively.
-        bool solved = solve(row, col+1, LEFT);
-        if (solved)
-        {
-            return solved;
-        }
-        else
-        {
-            //Update where we are.
-            dir = RIGHT;
-        }
-    }
-    /* try down */
-    if (map[row+1][col] != WALL && initial_dir != DOWN)
-    {
-    ROS_INFO("GOING DOWN!");
-        // Turn down.
-        turn_from_to(dir, DOWN);
-        follow_line();
-        // Solve recursively.
-        bool solved = solve(row+1, col, UP);
-        if (solved)
-        {
-            return solved;
-        }
-        else
-        {
-            //Update where we are.
-            dir = DOWN;
-        }
-    }
-    /* try left */
-    if (map[row][col-1] != WALL && initial_dir != LEFT)
-    {
-    ROS_INFO("GOING LEFT!");
-        // Turn down.
-        turn_from_to(dir, LEFT);
-        follow_line();
-        // Solve recursively.
-        bool solved = solve(row, col-1, RIGHT);
-        if (solved)
-        {
-            return solved;
-        }
-        else
-        {
-            //Update where we are.
-            dir = LEFT;
-        }
-    }
-
-    ROS_INFO("DEAD END FOUND, TURNING BACK.");
-    // we have exhausted all the options. This path is clearly a
-    // dead end. go back to where we come from and return false.
-    turn_from_to(dir, initial_dir);
-    follow_line();
-    return false;
+    if (map[row-1][col] == info)
+	return UP;
+    else if (map[row][col+1] == info)
+	return RIGHT;
+    else if (map[row+1][col] == info)
+	return DOWN;
+    else if (map[row][col-1] == info)
+	return LEFT;
+    return -1;
 }
 
 /* this function takes in the current direction,
@@ -267,107 +169,67 @@ void smart_runaround::turn_from_to(int current_dir, int intended_dir) {
     }
 }
 
+/* Purpose: look front, left, and right using sonar, and update
+ * map accordingly. Returns true if and only if sonar is initialized.
+ */
 bool smart_runaround::look_around(int row, int col, int dir)
 {
-    // look around current place using sonar
-    // store whether or not
-    // there is a wall into the map
-    // stores at row col 2 if point is critical, 1 otherwise
-    
     int* readings = sonar->get_sonar_readings();
     spinOnce();
 
     // Assumption: readings are given in millimeters - Zane
 
-    // distances with respect to robot, NOT map
-    // Look to the left.
-    float left_distance = readings[0]/1000.0;
-    int left_idx = m_to_idx(left_distance);
-    // Look to the front.
-    float front_distance = readings[36]/1000.0;
-    int front_idx = m_to_idx(front_distance);
-    // Look to the right.
-    float right_distance = readings[24]/1000.0;
-    int right_idx = m_to_idx(right_distance);
-
-    ROS_INFO("front: %d  left: %d  right: %d", front_distance, left_distance, right_distance);
-    if (right_distance == 0 || front_distance == 0 || left_distance == 0)
-      return false;
-
-    // determine relative distances on map, based on robot position
-    int up_d, right_d, down_d, left_d;
-    // determine upward distance
-    switch (dir)
-    {
-	case UP:
-	    up_d = front_idx;
-	    right_d = right_idx;
-	    down_d = 0; // unknown
-	    left_d = left_idx;
-	    break;
-	case RIGHT:
-	    up_d = left_idx;
-	    right_d = front_idx;
-	    down_d = right_idx;
-	    left_d = 0; // unknown
-	    break;
-	case DOWN:
-	    up_d = 0; // unknown
-	    right_d = left_idx;
-	    down_d = front_idx;
-	    left_d = right_idx;
-	    break;
-	case LEFT:
-	    up_d = right_idx;
-	    right_d = 0; // unknown
-	    down_d = left_idx;
-	    left_d = front_idx;
-	    break;
-    }
-
-    // change map until wall index, or until reading < 500
-    // reading < 500 <=> left_idx < 8 (approx.)
-
-    // map blocks above robot (on map)
-    for(int u = 0; u < 8; u++)
-    {
-	if(u = up_d) {
-	    map[row-u][col] = (up_d)?WALL:SEEN;
-            break;
-	}
-	map[row-u][col] = SEEN;
-    }
-
-    // map blocks to right of robot
-    for(int r = 0; r < 8; r++)
-    {
-	if(r = right_d) {
-	    map[row][col+r] = (right_d)?WALL:SEEN;
-            break;
-	}
-	map[row][col+r] = SEEN;
-    }
-
-    // map blocks under robot (on map)
-    for(int d = 0; d < 8; d++)
-    {
-	if(d = down_d) {
-	    map[row+d][col] = (down_d)?WALL:SEEN;
-            break;
-	}
-	map[row+d][col] = SEEN;
-    }
-
-    // map blocks to left of robot
-    for(int l = 0; l < 8; l++)
-    {
-	if(l = left_d) {
-	    map[row][col-l] = (left_d)?WALL:SEEN;
-            break;
-	}
-	map[row][col-l] = SEEN;
+    // matrices for going from robot's frame to base frame
+    float rightMat[2][2] = {{0, 1}, {-1, 0}};
+    float downMat[2][2] = {{-1, 0}, {0, -1}};
+    float leftMat[2][2] = {{0, 1}, {1, 0}};
+
+    // Look to the left (and update map).
+    float left_distance = readings[0]; // w.r.t. robot
+    if(left_distance == 0)
+        return false;
+    int left_idx = -mm_to_idx(left_distance); // w.r.t. map
+    // plot to map if indices are valid
+    if (0 <= left_idx && left_idx < MAP_LENGTH)
+        map[row][col+left_idx] = SEEN;
+
+    // Look in the other directions (and update map).
+    for (int i = 24; i < 48; i++) {
+        float distance = readings[i]; // w.r.t. robot
+        if(distance == 0)
+            return false;
+        if(distance >= 500)
+            break; // too far to be accurate
+        float theta = (M_PI/24)*i - M_PI;
+        float xDist = distance*cos(theta); // w.r.t. robot
+        float yDist = distance*sin(theta); // w.r.t. robot
+        float inputs[2] = {xDist, yDist};
+        float *ans;
+
+        // re-orient x and y distances based on direction
+        switch(dir) {
+            case UP:
+                ans[0] = xDist;
+                ans[1] = yDist;
+                break;
+            case RIGHT:
+                ans = matrix_mult(inputs, rightMat);
+                break;
+            case DOWN:
+                ans = matrix_mult(inputs, downMat);
+                break;
+            case LEFT:
+                ans = matrix_mult(inputs, leftMat);
+                break;
+        }
+        // indices into the map
+        int pixDistX = row + mm_to_idx(ans[0]);
+        int pixDistY = col + mm_to_idx(ans[1]);
+        // plot to map if indices are valid
+        if (0 <= pixDistX && pixDistX < MAP_LENGTH
+            && 0 <= pixDistY && pixDistY < MAP_LENGTH)
+                map[pixDistX][pixDistY] = SEEN;
     }
-
     return true;
 }
 
diff --git a/scout/libscout/src/test_behaviors/smart_runaround.h b/scout/libscout/src/test_behaviors/smart_runaround.h
index 5ff55a2..d3685a8 100644
--- a/scout/libscout/src/test_behaviors/smart_runaround.h
+++ b/scout/libscout/src/test_behaviors/smart_runaround.h
@@ -26,6 +26,7 @@
 #ifndef _SMART_RUNAROUND_H_
 #define _SMART_RUNAROUND_H_
 
+#include <math.h>
 #include "../behaviors/line_follow.h"
 /* Details about map:
  * 1 meter = 200 pixels
@@ -45,7 +46,6 @@ class smart_runaround: public line_follow
         void run();
     private:
 	int choose_direc(int row, int col, int info);
-        bool solve(int row, int col, int dir);
         void turn_from_to(int current_dir, int intended_dir);
         bool look_around(int row, int col, int dir);
         bool at_destination();
@@ -60,7 +60,7 @@ class smart_runaround: public line_follow
 	 * map even if it starts at a boundary and goes to
 	 * the other side.
          * Rows top to bottom, and columns left to right
-	*/
+	 */
         int map[MAP_LENGTH][MAP_LENGTH];
 };
 #endif
diff --git a/scout/scoutsim/src/sim_frame.cpp b/scout/scoutsim/src/sim_frame.cpp
index d0a6c89..98702e5 100644
--- a/scout/scoutsim/src/sim_frame.cpp
+++ b/scout/scoutsim/src/sim_frame.cpp
@@ -87,6 +87,7 @@ namespace scoutsim
 
         wxBitmap lines_bitmap;
         wxBitmap walls_bitmap;
+	ROS_INFO("Loading map: %s", display_map_name.c_str());
         path_bitmap.LoadFile(wxString::FromAscii(display_map_name.c_str()));
 
         // Try to load the file; if it fails, make a new blank file
