Revision 4612f7e4
ID | 4612f7e4aec30ec1460f0f2350d676ead13cec28 |
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).
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()) |
Also available in: Unified diff