Revision 82f3f746

View differences:

scout/scoutsim/src/sim_frame.cpp
113 113
        kill_srv = nh.advertiseService("kill",
114 114
                                       &SimFrame::killCallback, this);
115 115

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

  
116 120
        ROS_INFO("Starting scoutsim with node name %s",
117 121
                 ros::this_node::getName().c_str()) ;
118 122

  
......
331 335
        return true;
332 336
    }
333 337

  
338
    void wirelessCallback(const ::messages::WirelessPacket::ConstPtr& msg)
339
    {
340
        wireless_receive.publish(msg);
341
    }
334 342
}
scout/scoutsim/src/sim_frame.h
99 99
            bool spawnCallback(Spawn::Request&, Spawn::Response&);
100 100
            bool killCallback(Kill::Request&, Kill::Response&);
101 101

  
102
            void wirelessCallback(const ::messages::WirelessPacket::ConstPtr& msg);
103

  
104
            ros::Subscriber wireless_send;
105
            ros::Publisher wireless_receive;
106

  
102 107
            ros::NodeHandle nh;
103 108
            wxTimer* update_timer;
104 109
            wxBitmap path_bitmap;

Also available in: Unified diff