[Robotics] Extension of the sensor/controller/actuator model in the GE

Herman Bruyninckx Herman.Bruyninckx at mech.kuleuven.be
Mon Apr 20 10:02:39 CEST 2009


On Mon, 20 Apr 2009, Benoit Bolsee wrote:

>>> it shows that blender
>>> can load DLL, call functions from it, display custom UI, and save
>>> custom data in .blend. Adpating this model to the GE is a complex
>>> project but is possible. The complexity comes partly from that fact
>>> that the GE is
>>> C++, and DLL are not good friends of C++.
>>
>> Why not? Calling a function from C++ whose implementation
>> resides in the DLL is not that unusual...?
>
> Calling a C function in a DLL is indeed no problem but logic bricks are
> C++ classes. To build a new brick you must derive one of the base
> sensor/controller/actuator class, which cannot be done in a DLL as the
> binary compatibility with the base class cannot be ensured if blender GE
> is modified. The only way would be to put the DLL in trunk and compile
> it all the time with blender, which goes against the concept of plugin.
> The only robust model is to export a C API that allows a "plugin" class
> in the GE to export its processing to a DLL and vice versa to allow the
> DLL to access base class and scene data. This is where the complexity
> lies. A short route would be to base this API on the already existing
> python API.

Ok, I understand now!

>>> Some considerations limit the scope of this plugin model:
>>> - The plugin has limited access to the scene data: it cannot directly
>>> access the C++ classes, it must go through a C API.
>>> - For the same reason, a sensor plugin cannot be triggered by game
>>> internal data
>>> - The current logic model may be superseeded by a nodal model in the
>>> future, it may not be the right time to develop a complex plugin
>>> model.
>>
>> This latter remark seems to be the most important one! The
>> positive interpretation that I derive from it is that we
>> should try and discuss that "future nodal model" with the
>> responsible developer(s) in order to make our aims clear, and
>> maybe to help realise the whole thing...
>
> I'll make sure you get involved when this project is discussed. Should
> happen in the next few weeks.
Fine :-)

>>> However, a plugin system would be perfect to implement custom
>>> communication protocol, which is an essential need for robotic
>>> applications. Given this, I would still find justified that a project
>>> is funded to implement this plugin model.
>> If the description of such a project can be made, and the
>> appropriate developers are identified, there might be some
>> money available in some of the projects whose partners are
>> already active in this forum :-)

> It would have been perfect for a GSoC project! But slots have been
> allocated already.
> It's a project of medium complexity: the theory is well known, the
> bricks are in place.
> Unfortunately I don't have the time to prepare a plan but I ask my
> co-dev on the BGE.

Thanks!

Herman


More information about the Robotics mailing list