Looks like the interface is actually:

robot.bulb[0].setBrightness(40)

(I'm looking at the fireflies world in that directory). Let us know if
that doesn't work.

-Doug


> Hi all
>
> does anybody have any advice on this?  One of our students is attempting
> to set the brightness on a bulb on a robot.  Pyrobot version 5.0 on
> Debian returns the following error:
>
> Using PYROBOT on posix with CPU 0 in '/usr/pyrobot'...
> Loading.Attempting to import 'Braitenberg2Lights1RobotBlueGreen'...
> Loaded
> '/home/netlab/dagrubb/pyrobot/plugins/worlds/Pyrobot/Braitenberg2Lights1RobotBlueGreen.pyc'!
> Traceback (most recent call last):
>   File
> "/home/netlab/dagrubb/pyrobot/plugins/simulators/PyrobotSimulator", line
> 83, in <module>
>     gui = INIT(worldFile)
>   File
> "/home/netlab/dagrubb/pyrobot/plugins/simulators/PyrobotSimulator", line
> 26, in INIT
>     retval = userspace.INIT()
>   File
> "/home/netlab/dagrubb/pyrobot/plugins/worlds/Pyrobot/Braitenberg2Lights1RobotBlueGreen.py",
> line 31, in INIT
>     sim.robots[0].bulb[0].brightness = 40 #.setBrightness(40)
> AttributeError: BulbDevice instance has no attribute '__getitem__'
>
>
> any advice would be very helpful!
>
> regards
>
> Matt
>
> --
> - - - - - - - - - - - - - - - - - - - - - -
> Dr Matthew Studley
> Senior Lecturer
> Bristol Robotics Laboratory
>
> Room 3Q75
> University of the West of England
> Coldharbour Lane
> Bristol BS16 1QY
>
> +44 117 328 2671
>
>
>
> This email was independently scanned for viruses by McAfee anti-virus
> software and none were found
> _______________________________________________
> Pyro-users mailing list
> Pyro-users@pyrorobotics.org
> http://emergent.brynmawr.edu/mailman/listinfo/pyro-users
>

_______________________________________________
Pyro-users mailing list
Pyro-users@pyrorobotics.org
http://emergent.brynmawr.edu/mailman/listinfo/pyro-users

Reply via email to