From: Radu B. R. <ru...@in...> - 2005-08-19 08:18:48
|
Hellos, Please read my reply bellow. fly roadto wrote: > Hi all, > I just finished a java code and now want to run it with P/S. But i > have go some confusions about it. My target is to move the a robot to > a specific point in a map. > my code is like this: > //constructor > PlayerClient robot = new PlayerClient("localhost", 6665); > PositionInterface position = > robot.requestInterfacePosition(0, 'p'); > SimulationInterface simulation = > robot.requestInterfaceSimulation(0, 's'); > MapInterface map = robot.requestInterfaceMap(0, 'm'); > > PlayerSimulationPose2D simulationPosition.setName(NAME); > position.setSpeed(100, 30); > position.setPosition(x, y, yaw); > > //run loop > robot.readAll(); > simulation.set2DPose(NAME, start.getX(), start.getY(), > start.getYaw()); > searchAlgorithm(); > Questions are these: > 1. i don't understand where the map comes from and how the > PlayerClient gets the data of map. does it come from World file? if > yes, how the MapInterface gets the data? do i need to write the code > for reading the data from World file? Player manual says: "The |map| interface provides acces to an occupancy grid map. This interface returns no data and accepts no commands. The map is delivered in tiles, via a sequence of configuration requests." Basically the map interface gets the data from the world/bitmap file. You can use it for: - getting the size of the map (X, Y in pixels) - getting the scale of the map - receiving information about the cell occupancy The code should already be implemented. Have a look at getMapData() and getTileData(). In case you find any errors, we would be more than happy if you could submit some patches. > 2. what is the difference between PositionInterface and > PlayerSimulationPose2D? since from the API, i think i can use > PositionInterface and PlannerInterface to move the robot to a specific > point, why PlayerSimulationPose2D? Simulation is a new interface used with Stage. PositionInterface and PlannerInterface are the ones you need to use for a general case. > I am a beginner to the robot simulation. So there are such naive > questions. Any one get some idea? > thanks alot We all are. Uh oh, except the japanese people probably. :) > > Jun Yours sincerely, Radu Bogdan Rusu -- | Radu Bogdan Rusu | http://www.rbrusu.com | Intelligent Autonomous Systems Group | Technische Universitaet Muenchen |