Hi,
I am currently running off of the pyrobot-5.0.0.iso image and I am
trying to set up a stage simulation using pyrobot. I am having problems
using the fiducial sensor on a simple robot that I created. I tried
using the included everything.world and everything.cfg as a model for
this sensor. When I load the server, all of the devices seem to be
created without a problem. The issue arises when I attempt to load the
robot. I use the supplied Player6665.py script and it loads the
simulation, position, and laser, but does not seem to load the fiducial
sensor. So, I looked through the Player.py script and it seems that the
fiducial sensor is never started by the PlayerRobot() class
initialization script. I then tried to manually start the sensor by
typing "robot.startDevice('fiducial')" and I get the message:
<pyrobot.robot.player.PlayerFiducialDevice object at 0xb6e31f8c>
After doing this, if I select View->fiducial data, I can see a green
line pointing at the objects and each object shows the number returned
by the fiducial sensor. My problem now comes when trying to retrieve
this information with the pyrobot interface. I first tried using the
object viewer to see the fiducial device. Within that tree (fiducial
devices->fiducial[0]->List[0-31]), I get the following attribute error
when trying to view the SensorValue:
" 'NoneType' object has no attribute '__dict___' "
The only thread already in the mailing list that I came across this post:
http://emergent.brynmawr.edu/pipermail/pyro-users/2006-February/000261.html
When typing " print self.robot.fiducial[0].getDeviceData() " in the
command window, I get a list of outputs that look like this:
<playerc.player_fiducial_item_t; proxy of <Swig Object of type
'player_ficuial_item_t *' at 0x835e6c8>
I am not very familiar with python, but I am assuming this is just
telling me the data type of the object that is stored there. The end
result I am looking for is to extract the range and bearing of the
detected object from the fiducial sensor. I also need to know the
fiducial id of the object that is being detected so I can discriminate
among many landmark objects. If anyone can help me to set up and
extract this information from the fiducial sensor, I would really
appreciate it. Thanks in advance for your time.
Regards,
Nick
Here are the sections of my world files that I created:
simple.cfg:
driver
( name "stage"
provides ["7000:simulation:0" ]
plugin "libstageplugin"
# load the named file into the simulator
worldfile "simple.world" )
driver
(
name "stage"
provides ["map:0"]
model "border"
)
driver
(
name "stage"
provides ["position2d:0" "laser:0" "fiducial:0"]
model "robot1"
)
simple.world:
rect_robot
(
name "robot1"
color "red"
pose [-6.5 -6.5 0]
sick_laser( )
fiducialfinder( range_max 8 range_max_id 5 )
)
_______________________________________________
Pyro-users mailing list
[email protected]
http://emergent.brynmawr.edu/mailman/listinfo/pyro-users