From: fly r. <roa...@ho...> - 2005-08-22 05:49:13
|
Hi Radu Bogdan Rusu, this time i encounter three problems: 1. i updated my stage to 2.0, and i can reset the robot's position with set2DPose now. however, when i reset the robot's position, it couldn't move any more (robot not beyond the bound, not meeting the obstacles). how can i solve this problem? it didn't happen in the last version of stage. 2. and then i test the MapInterface again, and the server still shut down at that moment. i thought it might be the problem of my own config file or world file, so this time i tested it with simple.cfg, which came from stage/worlds. the code is below: PlayerClient player = new PlayerClient("localhost",6665); PositionInterface post = player.requestInterfacePosition(0, 'r'); SimulationInterface simulation = player.requestInterfaceSimulation(0, 'r'); MapInterface map = player.requestInterfaceMap(0, 'r'); the result is: [PlayerClient] : Got response for device 4(stage) with access: r [PlayerClient] : Got response for device 31(stage) with access: r [PlayerClient] : Got response for device 42() with access: e [PlayerClient] : Error was replied from the server! and the information in Terminal is: warning : not allowing subscription to unknown device "6665:map:0" Shutting stage driver down stage driver has been shutdown ** Player [port 6665] killing client on socket 10 ** ** Player [port 6665] quitting ** Shutting stage driver down stage driver has been shutdown any idea? 3. my task is to write an algorithm of path planning using probabilistic roadmap method. so i need to make the robot move in the stage along nodes which have been choosen. so i have to get the position data of the robot in order to judge if the robot getting the sub-goal point and make it go to the next sub-goal. so i test the get2DPose again, with the code below: simulation.set2DPose("robot1", 3000, 4000, 0); simulation.get2DPose("robot1"); System.out.println("begin"); while(!simulation.isPose2DReady()); System.out.println("ready"); PlayerSimulationPose2D pose = simulation.getSimulationPose2D(); System.out.println("x= " + pose.getX()+", "+"y="+pose.getY()+","+"yaw="+pose.getTheta()); and the config and world file are the simple.cfg and simple.world. it seems the isPose2DReady() never return true. the information in Terminal is: Player [port 6665] client accepted from 127.0.0.1 on socket 10 ** got simulation request Stage: received request to move object "robot1" to (3.00,4.00,0.00) got simulation request warn: Stage simulation doesn't implement config code 1. (stg_driver.cc HandleConfigSimulation) and after waiting about 3 mins, the information in Terminal gave out: warning : 21 bytes leftover on write() to client do you know how can i solve this problem? thank you very much Jun _________________________________________________________________ Use MSN Messenger to send music and pics to your friends http://messenger.msn.co.uk |