From: Radu B. R. <ru...@in...> - 2005-08-22 09:34:27
|
fly roadto wrote: > 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. No idea yet, I must have a look at what's changed in 2.0. So far, Javaclient 1.6.4 should be compatible with Player/Stage 1.6.5/1.6.2. If you make it work before we do, please don't hesitate to submit patches to the SF system. > 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? No idea why it shuts down. It must be a Player bug. Btw, in order to use the Map interface, you need a driver such as mapfile/mapcspace/mapscale in your Player configuration file. Have a look at the mapfile.cfg example from share/player. > 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? > Let's see... config code 1 should be PLAYER_SIMULATION_GET_POSE2D. Hmm, it seems that Stage 2.0a might not have that implemented yet. Can you please try it with 1.6.2 and see if it works there? If you want a more effective way to make your robot go to a specified point you can use our custom classes at javaclient.extra.PositionControl. You can search in the mail archives how to use that. Basically we use PIDs to move the robot around, and that should work with just about any robot, while direct position control doesn't. > thank you very much You are welcome. > Jun Yours sincerely, Radu Bogdan Rusu -- | Radu Bogdan Rusu | http://www.rbrusu.com | Intelligent Autonomous Systems Group | Technische Universitaet Muenchen |