Project

General

Profile

Revision 4612f7e4

ID4612f7e4aec30ec1460f0f2350d676ead13cec28
Parent ce559b91
Child 50557e88

Added by Alex Zirbel about 12 years ago

Fixed the scoutsim node.

Just a couple bugs. All the nodes compile now! You can run "rosmake" from the "scout" directory (compile the whole stack).

View differences:

scout/scoutsim/src/scout.h
145 145
    };
146 146
    typedef boost::shared_ptr<Scout> ScoutPtr;
147 147

  
148

  
148
}
149 149

  
150 150
#endif
scout/scoutsim/src/sim_frame.cpp
99 99
        clear();
100 100

  
101 101
        clear_srv = nh.advertiseService("clear",
102
                                          &SimFrame::clearCallback, this);
102
                                        &SimFrame::clearCallback, this);
103 103
        reset_srv = nh.advertiseService("reset",
104
                                          &SimFrame::resetCallback, this);
104
                                        &SimFrame::resetCallback, this);
105 105
        spawn_srv = nh.advertiseService("spawn",
106
                                          &SimFrame::spawnCallback, this);
106
                                        &SimFrame::spawnCallback, this);
107 107
        kill_srv = nh.advertiseService("kill",
108
                                         &SimFrame::killCallback, this);
108
                                       &SimFrame::killCallback, this);
109 109

  
110 110
        ROS_INFO("Starting scoutsim with node name %s",
111 111
                 ros::this_node::getName().c_str()) ;
......
120 120
        delete update_timer;
121 121
    }
122 122

  
123
    bool SimFrame::spawnCallback(scoutsim::Spawn::Request& req,
124
                                 scoutsim::Spawn::Response& res)
123
    bool SimFrame::spawnCallback(scoutsim::Spawn::Request  &req,
124
                                 scoutsim::Spawn::Response &res)
125 125
    {
126 126
        std::string name = spawnScout(req.name, req.x, req.y, req.theta);
127 127
        if (name.empty())
......
157 157
    }
158 158

  
159 159
    std::string SimFrame::spawnScout(const std::string& name, float x,
160
                                       float y, float angle)
160
                                     float y, float angle)
161 161
    {
162 162
        std::string real_name = name;
163 163
        if (real_name.empty())
scout/scoutsim/src/sim_frame.h
81 81

  
82 82
            bool clearCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
83 83
            bool resetCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
84
            bool spawnCallback(scoutsim::Spawn::Request&, scoutsim::Spawn::Response&);
85
            bool killCallback(scoutsim::Kill::Request&, scoutsim::Kill::Response&);
84
            bool spawnCallback(Spawn::Request&, Spawn::Response&);
85
            bool killCallback(Kill::Request&, Kill::Response&);
86 86

  
87 87
            ros::NodeHandle nh;
88 88
            wxTimer* update_timer;

Also available in: Unified diff