Simulation - nikobockerman/pioneer-dreamteam GitHub Wiki
Information on running stage simulator with p3dx.
Installing required packages:
sudo apt-get install ros-fuerte-rosbridge-suite
Starting simulation
roslaunch pioneer-dreamteam simulation.launch
The launch file is located at pioneer-dreamteam/launch/ and it launches stage simulator and rosbridge suite, which allows remote controlling, and gmapping.
The stage simulator wants a world file as parameter. The simulation.launch file specifies it to use the world file pioneer-dreamteam/stage/pioneer_test.world. That world file specifies which map file to use and spawns on p3dx robot into the world with a laser scanner. The robot is specified in pioneer3dx.inc file and the sonar sensors have been stripped from it because of a limitation in rosstage (it supports only one ranger per robot https://code.ros.org/trac/ros-pkg/ticket/2561). The laser scanner is specified in file sick.inc and is actually a SICK LMS200 currently. Feel free to update those specifications. Until now those have just been set so that they work.
The rosbridge is used to get remote controlling to the robot in the stage. It listens on a port 9090 and forwards the instructions it receives to rostopic /cmd_vel. To control the robot open the teleop.html found in the root of pioneer-dreamteam repository and open it with your browser. You can then control the robot with W,A,S,D buttons. Look for more information from http://www.ros.org/wiki/keyboardteleopjs/Tutorials/CreatingABasicTeleopWidgetWithSpeedControl.
Gmapping SLAM stack reads the laser measurements from topic /base_scan (specified in the launch file) which is exposed by rosstage. It creates a map in the background as you drive around with the robot in the simulator. The created map can be viewed with rviz:
rosrun rviz rviz
- Add display:
- Display type: Map
- Topic: /map