[Robotics] Triggering a Blender frame calculation from an external programme...
Herman Bruyninckx
Herman.Bruyninckx at mech.kuleuven.be
Mon Jan 10 18:47:02 CET 2011
On Mon, 10 Jan 2011, Benoit Bolsee wrote:
> The socket suggestion can work well I think.
>
> It consists in having a Python controller that runs on every frame and
> blocks on a socket until it gets a data. Since the game engine is single
> threaded, that will block the whole simulation. Once the controller
> returns, the game engine will compute one full frame.
Great information, thanks! I did not really find the information about the
"blocking".
> In addition you have to enable the 'compute all frame' option so that
> the simulator ignores the actual time interval between frames and
> computes the next frame as if exactly 1/frame_rate seconds elapsed since
> last frame, so you'll get physically correct simulation.
>
> Note that this method can work with any kind of blocking signal, not
> just socket.
Great!
> Hope this helps,
It does :-) A lot.
> Benoit
Herman
>
>> -----Original Message-----
>> From: robotics-bounces at blender.org
>> [mailto:robotics-bounces at blender.org] On Behalf Of Herman Bruyninckx
>> Sent: lundi 10 janvier 2011 18:03
>> To: Blender and Robotics
>> Subject: Re: [Robotics] Triggering a Blender frame
>> calculation from an external programme...
>>
>>
>> On Mon, 10 Jan 2011, Markus Mehrwald wrote:
>>
>>> if you use sockets you can create a blocking one and stay
>> there until
>>> you send something from your 'master'.
>>
>> Does the game engine also block...?
>>
>>> Hope this helps or is the problem more complex then I am
>> thinking at
>>> the moment?
>>
>> I don't know exactly what you are thinking :-) But I am
>> interested in finding out whether or not one can let Blender
>> wait to do a frame computation until a certain external event
>> has occured. The use case for this would be when we want to
>> use the Blender simulator in a time-synchronized way with
>> other "components", and they all have to progress together,
>> time step by time step.
>>
>>> Markus
>>
>> Herman
>>>
>>>
>>> Am 10.01.2011 16:50, schrieb Herman Bruyninckx:
>>>> Dear all,
>>>>
>>>> does anyone happen to know how to make Blender work as a 'slave',
>>>> waiting to do its next frame simulation only when
>> triggered (in one
>>>> way or another) by an external programme?
>>>>
>>>> Thanks!
>>>>
>>>> Herman
>>>> _______________________________________________
>>>> 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
>>>
>>
>> --
>> --
>> K.U.Leuven, Mechanical Eng., Mechatronics & Robotics Research Group
>> <http://people.mech.kuleuven.be/~bruyninc> Tel: +32 16 328056
>> EURON Coordinator (European Robotics Research Network)
> <http://www.euron.org>
> Open Realtime Control Services <http://www.orocos.org>
> Associate Editor JOSER <http://www.joser.org>, IJRR
> <http://www.ijrr.org> _______________________________________________
> 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
>
--
--
K.U.Leuven, Mechanical Eng., Mechatronics & Robotics Research Group
<http://people.mech.kuleuven.be/~bruyninc> Tel: +32 16 328056
EURON Coordinator (European Robotics Research Network) <http://www.euron.org>
Open Realtime Control Services <http://www.orocos.org>
Associate Editor JOSER <http://www.joser.org>, IJRR <http://www.ijrr.org>
More information about the Robotics
mailing list