Tuesday, April 21, 2009

Task completion

Here are the tasks I have completed so far:

1.Identify the robots' sensors and actuators and list them in the blog: SICK laser, a pan tilt for camera, a gripper, two motors and four monster wheel. The only difference between the indoors and outdoors Pioneers is that the indoors has sonar too and only three wheels.

2.Check Aria demo functionality in the outdoors Pioneer: Teleoperate the outdoors robot 's sensors and actuators. The SICK laser was the only component that generated some conflict.

3.Installation of Ubuntu and Player Stage: Installation of Player/Stage on Ubuntu having some problems mostly with Stage's installation. Corroboration of its successful installation by running the simple.cfg file located at: home/username/playerstage_download/stage-2.1.1/worlds

4.After executing cfg file I test of the playerjoy tool whose principal characteristic is that it allows the teleoperation of the robots, both in Stage (simulation) and physically. Execution of playerv which is a GUI client program that allows the visualization of sensor and actuator readings (laser, sonar, camera and gripper) as well. For instance, the execution of playerv for the sonar in my computer is executed as follows:

playerv -h lola -p 6665 --sonar

5.Execution of the laserobstacleavoid program in several .cfg files such as simple.cfg and autolab.cfg. This program allows a robot to avoid obstacles through laser readings.

Example 0, laserobstacleavoid, sonarobstacleavoid, randomwalk and several other examples are located at:

/home/laura/playerstage_download/player-2.1.2/examples/libplayerc++

6.Compilation and execution of the example 0 program. Analysis of its code and familiarization with the concepts of proxy (laser and sonar mainly). Programs are compiled as follows:

g++ -o example0 `pkg-config --cflags playerc++` example0.cc `pkg-config --libs playerc++`


Analysis the codes of .cfg and .world files and consult of player's documentation of c++ libraries in order to see the functionality of several classes and parameters.

7.Creation world and cfg files that simulate the laboratories in which we work and creation of a program with two robots (simulating the Pioneer robots we are working with) that can navigate in this world.


We opened and analyzed the simple.cfg code.

Each cgf file controls a specific world file. We then realized we had to create a specific world file to be loaded in the cfg file we wanted to create.

The .world files are located at:

home/username/playerstage_download/stage-2.1.1/worlds


We realized we needed to place our .png in the bitmaps/directory, the one in which cave and the other .png files are located.

Once we had this information we got and modified a blackprint of the labs.

We placed this image in the following directory
/home/laura/playerstage_download/stage-2.1.1/worlds/bitmaps/lab2piso.png

We then created the file lab2piso.1.world in which we loaded our bitmap and created two robots

# load an environment bitmap
map
(
bitmap "bitmaps/lab2piso.png"
size [16 16]
name "lab2piso"
)


# create a robot
pioneer2dx
(
name "robot1"
color "red"
pose [-7 -7 45]
sick_laser()
watchdog_timeout -1.0
)



# create a robot
pioneer2dx
(
name "robot2"
color "blue"
pose [0 0 45]
sick_laser()
watchdog_timeout -1.0


We then created the lab2piso.cfg which includes the world's bitmap and robots

# load the named file into the simulator
worldfile "lab2piso.world"
)

# Export the map
driver
(
name "stage"
provides ["map:0" ]
model "lab2piso"
)

# Create a Stage driver and attach position2d and laser interfaces
# to the model "robot1"
driver
(
name "stage"
provides ["position2d:0" "laser:0" "sonar:0" ]
model "robot1"
)

# Create a Stage driver and attach position2d and laser interfaces
# to the model "robot2"
driver
(
name "stage"
provides ["position2d:0" "laser:0" "sonar:0" ]
model "robot2"
)


We created and compiled example 0.1.2 which includes two proxies and that controls one of the robots movements through its sonar readings.

PlayerClient robot2("localhost");
SonarProxy sp(&robot2,0);
Position2dProxy pp(&robot2,0);
LaserProxy lp(&robot2, 0);


Here is a screenshot of the lab2piso.cfg file and the execution of example0.1.2.



No comments:

Post a Comment