Ogre+Bullet integration with urbiscript (parallel scripting)

kergoth

05-10-2010 16:11:30

Hi!

I've just finished a first release of a binding between Ogre, Bullet and the Urbi C++ framework, which includes the new urbiscript language. Urbi initially comes from the world of robotics and simulation, it's open source (AGPLv3), and it's interesting to handle complex systems with many interacting components.



The urbiscript language acts a bit like python or LUA for scripting, but it has some unique features to handle parallel and event-driven programming that are directly available inside the language semantics, which makes programming complex interactions surprisingly easy. An example of the kind of things you can write:


var entity = Entity.new("somemesh.mesh", size, position, orientation);

// react to events or conditions:
at (entity.touched?()) echo("boom!");
at (entity.x < 10) entity.gears(deploy);

// use '&' to run two pieces of code in parallel:
some_complex_code(entity) & some_other_code(entity);

// use a comma to detach code in the background...
// ... and use 'tags' to control it:
mytag: { some code that takes a long time },
at (Keyboard.pressed?) mytag.stop;


To know more about Urbi, there is a community web page here: http://www.urbiforge.org
And a forum here: http://forum.gostai.com
The documentation is here: http://www.urbiforge.org/index.php/Main/Docs

The open source Ogre+Bullet+Urbi (OBU) project is available on urbiforge, with a quick example code of a flying XWing that can fire missiles, to illustrate the concept:
http://www.urbiforge.org/index.php/Projects/OBU

Your feedback is welcome!

Cheers,
Kergoth

dodgydan2001

05-10-2010 18:14:55

Wow. This sounds like an awesome project, i'm going to chekc it out asap and let you know if i have any feedback on it.
Thank you for posting information on it :wink:

kergoth

08-10-2010 09:05:57

Hi dodgydan,

So did you try it?

Just to let people know, this Urbi+Ogre+Bullet binding is usable from within a contest that has started a few weeks ago, and lasts until Dec 15th, where you can win several prices including a 400€ voucher in a robotics shop and several goodies: http://www.urbiforge.org/index.php/Main/UrbiContest2010

Cheers,
kergoth

dodgydan2001

08-10-2010 15:36:10

I have VS8 aka VS 2005, so i had to edit the solution to get it to open in VS 2005.
It compiled until it tried to link 'libboost_date_time-vc80-mt-gd-1_38.lib' which it cant find because the boost library included in the project is 'boost_date_time-vc90-mt-1_38.lib'.
My Ogre SDK has 'libboost_date_time-vc80-mt-gd-1_42.lib' which i'm going to see if i can make work with the project.
If i cant get it to compile in VS 2005 i might find a copy of VS 9 so i dont have to mess with it to make it work.

kergoth

08-10-2010 15:46:47

You are right, the project has been tested with VS2008 Pro, and I know that you have to recompile certain libs to have it run with VS2008 Express, all the more so with VS2005 I guess.
Boost 1.38 is used by Urbi, so it's probably good to try to recompile boost 1.38 with VS2005, then get the missing lib and rebuild the whole project. You might have to do that for Ogre and Bullet also, if it's not already the case.

Did the precompiled binary work out of the box? Just launch world.bat and it should run.

dodgydan2001

08-10-2010 16:28:52

The precompiled binary worked for me when i moved the whole project folder to the root of my c:\
It did not like being on my desktop at all, it had issues with spaces in the patch name i think.

kergoth

08-10-2010 16:34:25

Good to know the binary worked. Most people will probably be already happy with that.
Yes, the "space in the path" issue is known, and documented in the README file. I think I know why it fails, I will probably release an update soon.
Thanks for your feedback!

ogreCAT

20-10-2010 17:10:49

Hello, that look how a great tool, i am work with codeblocks in windows and can´t compile ogrebullet, i have some questions,
1. with this license AGPLv3 i can make commercial games with OBU?
2. OBU can work with cloth and softbodies simulation?
3. is posible work with OBU in codeblocks?
Thanks.

kergoth

20-10-2010 22:03:03

Hi ogreCAT,

Answers below:

1. You can make commercial games, but you would have to provide the source code, or get a bypass license from the company who produces Urbi. Most likely, they will not charge for a game, and rather try to get some publicity or sell you software like Gostai Studio.

2. You can interface any C++ code to urbiscript via the UObject API, so the short answer is "yes". But, it's not natively supported yet, the project is still very early and certainly lacks certain features that you might want to add yourself.

3. I see no reason why it should not work in principle. It's plain C++ and compiles on various plateforms. But you will have to create your project to host the source files and recompile the precompiled binaries. Mmmm, if you have to recompile the Urbi kernel, this will be more difficult. It's not a piece of cake :)

Cheers
K