[Robotics] robotics example

Gilberto Echeverria gilberto.echeverria at laas.fr
Fri Jan 15 11:37:21 CET 2010


Hi Breno,

I just tried to find out what could be the problem, and honestly I 
couldn't make that code work myself. The blender file you are using is a 
bit outdated now, since we have made lots of changes to the whole 
framework. Our yarp-blender bindings have changed a lot, and so, they 
don't work anymore with this file.

Can you try downloading the latest files from:
https://code.launchpad.net/~blender-for-robotics/openrobots-simulator/ors
To install, the instructions are in:
https://answers.launchpad.net/openrobots-simulator/+faq/844

Let us know if you have any problems installing or running this code.
All the best.

Gilberto


On 01/14/2010 03:05 AM, Breno Carneiro Pinheiro wrote:
> Hi Nicolas, I tried what you said but I still get some repeatedly 
> import errors as the messages below:
>
> ImportError: No module named middleware.yarp
> Python script error from controller "object_pick#CONTR#4":
> Traceback (most recent call last):
>   File "object_pick", line 4, in <module>
> AttributeError: 'module' object has no attribute 'selectedObject'
> Python script error from controller "object_pick#CONTR#4":
> Traceback (most recent call last):
>   File "object_pick", line 4, in <module>
> AttributeError: 'module' object has no attribute 'selectedObject'
> Python script error from controller "object_pick#CONTR#4":
> Traceback (most recent call last):
>   File "object_pick", line 4, in <module>
> AttributeError: 'module' object has no attribute 'selectedObject'
> Python script error from controller "check_visibility#CONTR#5":
> Traceback (most recent call last):
>   File "check_visibility", line 4, in <module>
>
>
> I was looking for middleware.yarp but I didn't find it yet. Another 
> issue is why I can't edit Yarp_python_simulator.blend file. I mean I 
> tried to change some pieces of code but It's not allowed to change 
> anything. Do you have any idea about it? My python is 2.5.
>
> Thanks agaiin
>
> Breno
>
>
> 2009/12/21 Nicolas Lassabe <Nicolas.Lassabe at onera.fr 
> <mailto:Nicolas.Lassabe at onera.fr>>
>
>     Hi Breno,
>
>     Did you copy the yarp.py and _yarp.so ? Do you have the same
>     version of python to run blender and for yarp-python ? It should
>     be python 2.5 or 2.6.
>
>     $ sudo cp yarp.py /usr/lib/python2.5/site-package/
>     $ sudo cp _yarp.so /usr/lib/python2.5/site-package/_yarp.so
>
>
>     Nicolas
>
>
>     Breno Carneiro Pinheiro wrote:
>     > Hi folks I started learning a little bit about YARP and its
>     > integration with Blender.
>     >
>     > I decided to run some examples like the one posted here:
>     >
>     http://wiki.blender.org/index.php?title=Robotics:Middleware/YARP/Python_Simulator_Example&useskin=monobook#Image_grabbing_and_output_with_YARP
>     <http://wiki.blender.org/index.php?title=Robotics:Middleware/YARP/Python_Simulator_Example&useskin=monobook#Image_grabbing_and_output_with_YARP>
>     >
>     <http://wiki.blender.org/index.php?title=Robotics:Middleware/YARP/Python_Simulator_Example&useskin=monobook#Image_grabbing_and_output_with_YARP
>     <http://wiki.blender.org/index.php?title=Robotics:Middleware/YARP/Python_Simulator_Example&useskin=monobook#Image_grabbing_and_output_with_YARP>>
>     > but a I got a lot of difficulties to runs it properly. I'm gonna
>     > explain what I did:
>     >
>     > 1 - Yarp 2.2.5 installation: passed ok! I compiled as suggested
>     here:
>     > http://wiki.blender.org/index.php/Robotics:Middleware/YARP and
>     > everything looks fine!
>     >
>     > 2 - Yarp check is ok!
>     >
>     > 3 - Yarp read and write is ok!
>     >
>     > 4 - I set the variable  BLENDER_ROBOTICS_ROOT to
>     > /my-path/blender_robotics/scripts where are place the files:
>     >
>     >
>     > check_visibility  finalization  image_grabber_yarp  initialization
>     > middleware  object_pick  object_selection
>      Yarp_python_simulator.blend
>     >
>     > and the middleware dir.
>     >
>     > 5 - Then I downloaded the  Yarp_python_simulator.blend that's
>     place in
>     > another dir.
>     >
>     > 6 - I open this .blend file with blender 2.49.
>     >
>     > 7- Then I followed the instructions on the pege mentioned. The
>     > instructions are:
>     >
>     > To test that:
>     >
>     >     * Start | yarp server|
>     >     * Launch | yarp read /reader|
>     >     * Launch the GameEngine (key P)
>     >     * Connect them with | yarp connect /blender_simu/cog_map
>     /reader|
>     >
>     > everything seems to be ok until I press key P at blender
>     environment.
>     > When I do it a error message appear repeatedly:
>     >
>     > Python script error from controller "image_grabber#CONTR#6":
>     > Traceback (most recent call last):
>     >   File "image_grabber_yarp", line 1, in <module>
>     > ImportError: No module named yarp
>     > Python script error from controller "image_grabber#CONTR#6":
>     > Traceback (most recent call last):
>     >   File "image_grabber_yarp", line 1, in <module>
>     > ImportError: No module named yarp
>     > Python script error from controller "image_grabber#CONTR#6":
>     > Traceback (most recent call last):
>     >   File "image_grabber_yarp", line 1, in <module>
>     > ImportError: No module named yarp
>     > Python script error from controller "check_visibility#CONTR#5":
>     > Traceback (most recent call last):
>     >   File "check_visibility", line 4, in <module>
>     > ImportError: No module named middleware.yarp
>     >
>     >  Then if I execute the | yarp connect /blender_simu/cog_map /reader
>     >
>     > |I got the message: Cannot find port named /blender_simu/cog_map
>     >
>     > Besides that errors I would like to know why I can't edit the
>     scripts
>     > at Yarp_python_simulator.blend
>     > file. I mean when I try to change something like scriptRoot and ask
>     > for save  It asks me: CreateNewFile and then say that is unable to
>     > save the file.
>     >
>     > Could anybody give me some help on all that issues?
>     >
>     > Thanks a lot!!
>     > --
>     > Breno Carneiro Pinheiro
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Robotics mailing list
>     > Robotics at blender.org <mailto:Robotics at blender.org>
>     > http://lists.blender.org/mailman/listinfo/robotics
>     >
>
>     _______________________________________________
>     Robotics mailing list
>     Robotics at blender.org <mailto:Robotics at blender.org>
>     http://lists.blender.org/mailman/listinfo/robotics
>
>
>
>
> -- 
> Breno Carneiro Pinheiro
>
>
> _______________________________________________
> Robotics mailing list
> Robotics at blender.org
> http://lists.blender.org/mailman/listinfo/robotics
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/robotics/attachments/20100115/1a1bb3c4/attachment.htm 


More information about the Robotics mailing list