From: jiajia <jia...@16...> - 2009-05-06 14:37:30
|
it works~ thank you all the same! 在2009-05-06,jiajia <jia...@16...> 写道: hello again, I also tried GoTo(),however, the output is always(0,0),and the robot still doesn't move! Thank all of you! 在2009-05-06,jiajia <jia...@16...> 写道: hello, I want to drive the vfh to the exact goal point in stage However it doesn't work---the robot doesn't move. errors are: playerc error : timed out waiting for server reply to request planner:0:request:2 terminate called after throwing an instance of 'PlayerCc::PlayerError' Any advices? Thanks in advance! my test.cc is: #include <libplayerc++/playerc++.h> #include <stdio.h> #include "math.h" #include <iostream> #include "args.h" int main(int argc, char *argv[]) { parse_args(argc,argv); using namespace PlayerCc; PlayerClient robot1("localhost",6665); LaserProxy lp1(&robot1,0); Position2dProxy pp1(&robot1,0); pp1.SetMotorEnable (true); PlannerProxy pl1(&robot1,0); pl1.SetEnable(true); bool runit=true; while(runit) { robot1.Read(); pl1.SetGoalPose(7.0,5.0,0); pl1.RequestWaypoints(); pl1.SetEnable(true); runit=false; std::cout << pl1.GetGx() << " " << pl1.GetGy() << "\n"; } } my .cfg is: driver ( name "stage" provides ["simulation:0" ] plugin "libstageplugin" # load the named file into the simulator worldfile "twocontinue.world" ) driver ( name "stage" provides ["6665:position2d:0" "6665:laser:0" "6665:sonar:0" ] model "robot1" ) driver ( name "vfh" provides ["6665:position2d:1"] requires ["6665:position2d:0" "6665:laser:0" ] ) driver ( name "amcl" provides ["6665:position2d:2"] requires ["odometry::6665:position2d:1" "6665:laser:0" "laser::6665:map:0"] ) driver ( name "wavefront" provides ["6665:planner:0"] requires ["output::6665:position2d:1" "input::6665:position2d:1" "6665:map:0"] safety_dist 0.15 distance_epsilon 0.5 angle_epsilon 10 ) 穿越地震带 纪念汶川地震一周年 穿越地震带 纪念汶川地震一周年 |