[Robotics] Passing image data from blender to Corba

Paul Fitzpatrick paulfitz at liralab.it
Mon May 31 21:41:07 CEST 2010


On 05/31/2010 08:57 AM, Arnaud Degroote wrote:
> On 31/May - 14:41, Steven Bellens wrote:
>    
>> Hi,
>>
>> We are trying to use the RoboTIS-Vision package (
>> http://robotis.onera.fr/orocos) to integrate Blender, python, Corba and
>> Orocos. Currently I'm trying to pass an Image from Python over Corba to
>> Orocos and I'm stuck at the blender/python side. I created the Image using
>> the Image struct:
>>                          Image.nChannels = 4
>> Image.depth = 8
>> Image.width = size[0]
>> Image.height = size[1]
>> Image.imageData = image
>> Image.nSize =size[0]*size[1]*4*8
>> Image.dataOrder = 0
>> Image.origin = 0
>> Image.widthStep = size[0]*4
>> but I don't know how to pass it on to Corba. Any ideas/suggestions for this?
>>      
> I won't answer directly to the question, because I didn't use corba since a long
> time. Yet, you can check the code in the Morse simulator, in particular the file
> components/sensors/cameras/Camera_Module.py (on the master branch) to see how we
> export virtual camera from blender to outside world (at the moment, we export it
> through YARP (we use RoboTIS-OroYarp to make the gate between Orocos and Yarp))
> or pocolibs (but it is a bit LAAS centric)).
>    

Just to add to Arnaud's answer, there's information on how to use YARP 
from Blender at:
    http://wiki.blender.org/index.php/Robotics:Middleware/YARP

If you were to use YARP to stream the images, it is possible to read the 
stream without using the YARP libraries.  There's an example in 
yarpreadimage.c+yarpmin.h/c here:

   
https://yarp0.svn.sourceforge.net/svnroot/yarp0/trunk/yarp2/example/external/c/

This can be useful to avoid having to link against YARP in your 
project.  But if you are using RoboTIS-Vision it would probably make 
sense to use RobotTIS-OroYarp as Arnaud suggests.

Cheers,
Paul



More information about the Robotics mailing list