[Robotics] robotics example

Breno Carneiro Pinheiro brenodee at gmail.com
Fri Jan 22 15:18:36 CET 2010


Hi folks, I got yarpview installed now after set GUIS option on ccmake
environment. Thanks!!!

Looking at Makefile to compile cpp files I saw the variable ROBOTPKG_BASE
point to HOME/openrobots. I don't have this dir but "googling" it I found
the following  site:

http://softs.laas.fr/jrl/hppDoc/share/doc/hppDoc/hppdoc_howtoinstall.html

Should I install it? Is it really necessary?

Just to tou know, I work at CEASB: http://www.pti.org.br/ceasb and there we
intend to construct a robot to inspect the huge wall form ITAIPU dam (
www.itaipu.org.br). I studying some possibilities and Blender-Robotics looks
good to simulate this task. What you think? I'm gonna work on control
project but I'd like to know how get 3D simulation working.

Thanks for all.

Breno

2010/1/22 Gilberto Echeverria <gilberto.echeverria at laas.fr>

>  Hi Breno,
>
> It is true that there is not much that can be done with the simulator at
> the moment. But there are a few things you can try.
> In the directory $ORS_ROOT/clients/atrv there are a few C programs that
> connect with the simulator, to send commands to the robot. You can compile
> those programs, and then run them with the appropriate arguments:
>
> atrv_destination-1.0 You run this program with the name of the robot you
> want to control as the first parameter. The default name of the robot is the
> example files is ATRV (the name of the object representing the robot
> chassis). But you have to add the letters OB before the name of the robot
> when referring to an object in the Game Engine. For example, you can run the
> program as:
> $ $ORS_ROOT/clients/atrv/atrv_destination-1.0 OBATRV
> Once the program is running, it will ask you for the coordinates where the
> robot should go. You enter these as three floating point numbers, separated
> by spaces. When you hit ENTER, a marker will move to that location, and the
> robot will move near it. The client program can also read information from
> the robot. At the moment it reads its location back, but it can read the
> output of any of the sensors installed on the robot, simply by setting it to
> read the appropriate yarp ports.
>
> atrv_dest_cams-1.0 Works nearly the same, but it also takes a second
> argument, which is the number of cameras on board of the robot. To use this
> example work, you will need yarpview working, and opened to listen a port
> with a name in this format: /img/[robot_name]/[camera_name]
> For example, you'll open yarpview as:
> $ yarpview /img/OBATRV/Camera1
> And then run the client program as:
> $ $ORS_ROOT/clients/atrv/atrv_dest_cams-1.0 OBATRV
> >From this point, the client program works the same as atrv_dest_cams-1.0.
> The difference is that in Blender you can now press the spacebar to toggle
> the image stream to yarpview on and off. In the yarpview window you'll see
> the image captured by the camera on board the robot.
> As  you have seen, pressing the arrow keys in one of the examples makes the
> man move. It is set as the target of the robot in that file. So when you
> input coordinates for the new destination, the man will teleport there.
> However, while the robot is moving, you can move the human and have the
> robot chase him.
>
> These are still only test programs to try the communication of the
> simulator with external modules. Eventually we'll connect the simulation
> with the real control systems of the robot.
>
> Try these programs out, and let us know how it goes. Cheers.
>
> Gilberto
>
>
>
>
> On 01/21/2010 09:35 PM, Breno Carneiro Pinheiro wrote:
>
> Hi all, I got some examples running without errors reported. But sincerely
> I could not understand what should I look at those examples. I mean, is
> there any control algorithm running? I pressed up/down and right/left keys
> and I got a men walking around. Do you have any tips to improve my
> experiences with ors?
>
> I installed yarp following INSTALL file but I didn't get yarpview
> installed. I think it's fundamental to get properly advantages from some
> examples.
>
> Thanks,
>
> Breno
>
> 2010/1/19 Breno Carneiro Pinheiro <brenodee at gmail.com>
>
>> Hi Nicolas, thanks for your support. I did all recommendations listed
>> INSTALL file inside /ors dir. That means that my blender is 2.6, my python
>> is also 2.6 and ACE is 5.6.3  I got ors file with bzr command from the
>> repository mentioned by Gilberto.
>>
>> Hope I get it through to you!!!
>>
>> Thanks a lot,
>>
>> Breno
>>
>>
>>
>>
>> 2010/1/18 Nicolas Lassabe <Nicolas.Lassabe at onera.fr>
>>
>>  Hi,
>>>
>>> Could you check if you have the blender 2.49 for python 2.6 because there
>>> is also blender 2.49 for 2.5 ?
>>> But I don't think the problem from this... Could you give us also the
>>> repository version you have ?
>>>
>>> thanks,
>>> Nicolas
>>>
>>>
>>> On 01/16/2010 03:58 AM, Breno Carneiro Pinheiro wrote:
>>>
>>> Hi, thanks for your support!!! I installed python 2.6.4 and I'm using
>>> blender 2.49b.
>>>
>>> I grab the first scenarii in ors dir and the following steps before press
>>> P on blender environment is below:
>>>
>>>
>>> root at breno-HP:/usr/local/blender# yarp server &
>>> [5] 31759
>>> yarp: Port /root active at tcp://192.168.1.3:10000
>>> Name server can be browsed at http://192.168.1.3:10000/
>>> root at breno-HP:/usr/local/blender# yarp: Bootstrap server listening at
>>> mcast://224.2.1.1:10001
>>>
>>> root at breno-HP:/usr/local/blender# Detected GL_ARB_texture_env_combine
>>> Detected GL_ARB_texture_cube_map
>>> Detected GL_ARB_multitexture
>>> Detected GL_ARB_vertex_program
>>> Detected GL_ARB_depth_texture
>>> Detected GL_EXT_separate_specular_color
>>> shaders not supported!
>>>
>>>
>>> Then I press P and I got:
>>> Blender Game Engine Started
>>>
>>> Python script error from controller "Initialize#CONTR#1":
>>> Traceback (most recent call last):
>>>   File "Scene_Initialize.py", line 16, in <module>
>>>   File
>>> "/home/breno/Diversos/ors/scripts/middleware/independent/IndependentBlender.py",
>>> line 16, in <module>
>>>     from middleware.yarp.YarpBlender import *
>>>   File "/home/breno/Diversos/ors/scripts/middleware/yarp/YarpBlender.py",
>>> line 96
>>>     except KeyError as detail:
>>>                      ^
>>> SyntaxError: invalid syntax
>>> Python script error from controller "Initialize#CONTR#1":
>>> Traceback (most recent call last):
>>>   File "Basic_Init.py", line 2, in <module>
>>> KeyError: 'requested item "motion_actuator" does not exist'
>>> XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server
>>> ":0.0"
>>>       after 5794 requests (5794 known processed) with 0 events remaining.
>>>
>>>
>>> I think is missing a lot of thing because all others example is not
>>> working with deferents errors each one. But please help to solve one by one
>>> so that I can start doing by myself.
>>>
>>>
>>> Thanks for all,
>>>
>>> Breno
>>>
>>>
>>> 2010/1/15 Gilberto Echeverria <gilberto.echeverria at laas.fr>
>>>
>>>> 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<https://code.launchpad.net/%7Eblender-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>
>>>>
>>>>> 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
>>>>> >
>>>>> > 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
>>>>> > http://lists.blender.org/mailman/listinfo/robotics
>>>>> >
>>>>>
>>>>> _______________________________________________
>>>>> Robotics mailing list
>>>>> Robotics at blender.org
>>>>> http://lists.blender.org/mailman/listinfo/robotics
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Breno Carneiro Pinheiro
>>>>
>>>>
>>>> _______________________________________________
>>>> Robotics mailing listRobotics at blender.orghttp://lists.blender.org/mailman/listinfo/robotics
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Robotics mailing list
>>>> Robotics at blender.org
>>>> http://lists.blender.org/mailman/listinfo/robotics
>>>>
>>>>
>>>
>>>
>>> --
>>> Breno Carneiro Pinheiro
>>>
>>>
>>> _______________________________________________
>>> Robotics mailing listRobotics at blender.orghttp://lists.blender.org/mailman/listinfo/robotics
>>>
>>>
>>>
>>> _______________________________________________
>>> Robotics mailing list
>>> Robotics at blender.org
>>> http://lists.blender.org/mailman/listinfo/robotics
>>>
>>>
>>
>>
>> --
>> Breno Carneiro Pinheiro
>>
>
>
>
> --
> Breno Carneiro Pinheiro
>
>
> _______________________________________________
> Robotics mailing listRobotics at blender.orghttp://lists.blender.org/mailman/listinfo/robotics
>
>
>
> _______________________________________________
> Robotics mailing list
> Robotics at blender.org
> http://lists.blender.org/mailman/listinfo/robotics
>
>


-- 
Breno Carneiro Pinheiro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/robotics/attachments/20100122/36c1cb0c/attachment-0001.htm 


More information about the Robotics mailing list