Revision 7ffad595 scout/scoutsim/src/sim_frame.cpp

View differences:

scout/scoutsim/src/sim_frame.cpp
96 96
                           map_name + ".bmp";
97 97
        map_lines_name = ros::package::getPath("scoutsim") + "/maps/" +
98 98
                           map_name + "_lines.bmp";
99
        map_walls_name = ros::package::getPath("scoutsim") + "/maps/" +
100
                           map_name + "_walls.bmp";
99 101
        display_map_name = map_base_name;
100 102

  
101 103
        wxBitmap lines_bitmap;
102 104
        lines_bitmap.LoadFile(wxString::FromAscii(map_lines_name.c_str()));
103 105
        lines_image = lines_bitmap.ConvertToImage();
104 106

  
107
        wxBitmap walls_bitmap;
108
        walls_bitmap.LoadFile(wxString::FromAscii(map_walls_name.c_str()));
109
        walls_image = walls_bitmap.ConvertToImage();
110

  
105 111
        clear();
106 112

  
107 113
        clear_srv = nh.advertiseService("clear",
......
114 120
                                       &SimFrame::killCallback, this);
115 121

  
116 122
        // Subscribe and publisher wirless from robots
117
        wireless_receive = nh.advertise< ::messages::WirelessPacket>("/wireless/receive", 1000); 
118
        wireless_send = nh.subscribe("/wireless/send", 1000, &SimFrame::wirelessCallback, this);
123
        wireless_receive = nh.advertise< ::messages::WirelessPacket>(
124
            "/wireless/receive", 1000); 
125
        wireless_send = nh.subscribe("/wireless/send", 1000,
126
            &SimFrame::wirelessCallback, this);
119 127

  
120 128
        ROS_INFO("Starting scoutsim with node name %s",
121 129
                 ros::this_node::getName().c_str()) ;
......
131 139
        wxMenu *menuView = new wxMenu;
132 140
        menuView->Append(ID_MAP, _("&Map"));
133 141
        menuView->Append(ID_LINES, _("&Lines"));
142
        menuView->Append(ID_WALLS, _("&Walls"));
134 143

  
135 144
        wxMenuBar *menuBar = new wxMenuBar;
136 145
        menuBar->Append(menuFile, _("&File"));
......
248 257
        display_map_name = map_lines_name;
249 258
        clear();
250 259
    }
260
    
261
    void SimFrame::showWalls(wxCommandEvent& WXUNUSED(event))
262
    {
263
        display_map_name = map_walls_name;
264
        clear();
265
    }
251 266

  
252 267
    void SimFrame::clear()
253 268
    {

Also available in: Unified diff