The Gangsta Wrapper Early Adopters

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

The Gangsta Wrapper Early Adopters

Post by monster »

Howdy,

If you're feeling brave, you can get it now.

You'll want to read the readmes from here;
GangstaWrapper README.txt
Gangsta_Ogre README.txt

And you'll maybe want to check out the SourceForge page here;
The Gangsta Wrapper

Then you'll want to download and compile the core GangstaWrapper source from here;
GangstaWrapper_0-1-0.zip

And then, because you're using Ogre, you'll want to download and compile the Ogre specific interface and the samples from here;
Gangsta_Ogre_0-1-0.zip

And after that you'll doubtless want to boot me squarely in the knackers when it fails to work.

Have fun,
monster
User avatar
bal
Greenskin
Posts: 100
Joined: Thu Dec 09, 2004 7:29 pm
Location: Geluwe, Belgium

Post by bal »

Brilliant stuff.
User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac »

*bows*

Friday = last day of school = mad programming time = "That shit is Gangsta!"

:D
phear hingo

My Webpage
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

Congrats on the first release! I will definitely be checking this out at the earliest opportunity.
nfz
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1263
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Post by nfz »

Excellent stuff, Monster!.
User avatar
Project5
Goblin
Posts: 245
Joined: Mon Nov 22, 2004 11:56 pm
Location: New York, NY, USA

Post by Project5 »

What? The Frinck Physics Toolkit is being dumped?

NOOOOOO!!!!!!



:-P

--Ben
User avatar
DaesDemon
Goblin
Posts: 209
Joined: Thu Jan 22, 2004 3:59 pm
Location: Toulouse (France)

Post by DaesDemon »

Excellent Monster.

Thats rocks ;)

For back informations, i get some after Generation event copy errors on building, and have to copy dll myself, but i don't know why as copy command seems ok :?:

And i get a problem with samples engine and pyramid .

Code: Select all

Bad argument ... ode.cpp:1131
Perhaps hve i to build ODE with some special options.
I builded it with Single Trimesh IIRC
[edit]
I tried it with Double Trimesh , it changed nothing
[/edit]

Thanks for your wrapper.
Haven't had time to look at the code, but result are excellent.
Last edited by DaesDemon on Wed Jun 01, 2005 7:28 pm, edited 1 time in total.
Every Night and every Morn
Some to Misery are born.
Every Morn and every Night
Some are born to Sweet Delight,
Some are born to Endless Night.
User avatar
DaesDemon
Goblin
Posts: 209
Joined: Thu Jan 22, 2004 3:59 pm
Location: Toulouse (France)

Post by DaesDemon »

The problem for the copy command came from the fact that i had a space in my Gangsta Main Dir ;)
Every Night and every Morn
Some to Misery are born.
Every Morn and every Night
Some are born to Sweet Delight,
Some are born to Endless Night.
lodi
Greenskin
Posts: 103
Joined: Sat Jul 24, 2004 7:06 pm

Post by lodi »

I'm getting the same problem as DaesDemon:

ODE INTERNAL ERROR 2
Bad argument(s) (\ode-0.5\ode\src\ode.cpp:1131)

Also, before running (in debug) it gives me:

"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."

When I switch ode for the other three though, everything works great. I'm using single-trimesh.

Some observations with the pyramid demo:

Ode: Doesn't run for me
Novodex: Easily the fastest, but flings at least one object across the map when they all drop at the beginning.
Newton: Actually I couldn't find any faults with it in the first demo.
TrueAxis: Massive slowdown during the initial drop (5-7fps). Okay after that.

Amazing work monster! Can't wait to dig deeper into this.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

Unfortunately the template usage in GaPtr foxes VC7.0 at the moment. I've resolved a couple of issues but got stuck with the compiler thinking it has to instantiate Ga::Body in the STL containers in the ODE driver (and of course, failing). I'm out of time right now unfortunately, will come back to it when I can.
User avatar
johnhpus
Platinum Sponsor
Platinum Sponsor
Posts: 1186
Joined: Sat Apr 17, 2004 2:49 am
x 3

Post by johnhpus »

Downloading now, can't wait to try it out.

Thanks, Monster.
User avatar
Project5
Goblin
Posts: 245
Joined: Mon Nov 22, 2004 11:56 pm
Location: New York, NY, USA

Post by Project5 »

I just finished compiling it, and noticed something interesting. In the .vcproj files, some references to OdeHome, NewtonHome, etc, were surrounded by ""s and some were not. In your readme it said that they all were, and I found out where the problem comes from.

In VC7.1, if you go into a field like the ones used to look for include directories by clicking on the ... button, and surround an entry with ""s, it's cool. But if you come back into that field by clicking on the ... button again, all the ""s vanish.

You may want to consider having the user surround their environment variables with "" and remove all of them from your scripts to avoid this.

Or maybe I should reinstall my copy of VC 7.1 if no one else has this problem :-P

[edit]
Also, the debug versions of the ode and netwon plugins use the release versions of ode and newton engines (I don't have the other two engines). Could this be the source of the problem with the debug version?
[/edit]

This thing is absolutely fantastic :-)

--Ben
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

Environment variables should look like this: $(ENVIRONMENT_VAR) - vc71 doesn't care about the quotes. :wink:
Just like $(ConfigurationName), etc.

Great, Monster! :)
Finally, after all that pimping - a Gangsta release. 8)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
johnhpus
Platinum Sponsor
Platinum Sponsor
Posts: 1186
Joined: Sat Apr 17, 2004 2:49 am
x 3

Post by johnhpus »

Everything has compiled fine for me.

I can't get ODE to work for any of the samples, but Newton has worked fine.

Very cool Monster. I'll be staying up late tonight playing with this.
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

I can't get ODE to work for any of the samples
Bizarre. Are you using the 0.5 version in single precision DLL mode? I probably should mention that in the docs!
Environment variables should look like this: $(ENVIRONMENT_VAR) - vc71 doesn't care about the quotes.
It does need quotes if that environment variable has spaces in it, like the Novodex example path in the docs. I'll fix that.
Unfortunately the template usage in GaPtr foxes VC7.0 at the moment.
Yeah, the GaPtr stuff is a bit crappy. I'll try to improve it. And simplify the template usage.

Thanks for the feedback chaps.
User avatar
johnhpus
Platinum Sponsor
Platinum Sponsor
Posts: 1186
Joined: Sat Apr 17, 2004 2:49 am
x 3

Post by johnhpus »

Yeah, I was using double precision in my build of ODE. I tried to recompile with single precision to no effect. That's not a very definite thing though as I'm quite tired and could well have just screwed up somewhere. I'll try again tomorrow and report whatever I find.

Btw, the sim starts but immediantly complains about "Internal ODE error #2" and something about "invalid arguments".
User avatar
DaesDemon
Goblin
Posts: 209
Joined: Thu Jan 22, 2004 3:59 pm
Location: Toulouse (France)

Post by DaesDemon »

I tried configure_single_trimesh.bat
Compile with odeDll.sln
Recompile Gangsta_wrapper from scratch
Recompile OgreGansta from scratch
But i am still unable to lunch Samples Engines and Samples Pyramids :?

I change the Physics Driver in the LoadPhysicsDriver() to Newton and it works.

So i have a problem with ODE too.
Every Night and every Morn
Some to Misery are born.
Every Morn and every Night
Some are born to Sweet Delight,
Some are born to Endless Night.
lodi
Greenskin
Posts: 103
Joined: Sat Jul 24, 2004 7:06 pm

Post by lodi »

Yup, same here...

I rebuilt:

Single-Trimesh ode and odeDLL
ogre 1.02
gangsta
ogre_gangsta

with debug and release versions of everything. Same error in both.

Everything compiles okay, except the Newton post-build event... so I just copied the dll over manually and it's working great sofar.

Also, scratch what I said earlier about TrueAxis... in release mode everything is fine!
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

Okey-Dokey.

The only thing I can think of is that you're using VC to build ODE, aren't you? I use the command-line build. I've added details to the readmes on how to build a compatible version of ODE.

Also, I've added quotes round everything, so you should be able to have spaces in the paths referenced in your environment variables.

Also, I've changed the implementation of GaPtr to be a bit neater. Hopefully VC7 likes it a bit better now. But obviously I can't check that!

The changes are in CVS, I'll update the downloads tomorrow.
the debug versions of the ode and netwon plugins use the release versions of ode and newton engines
The ODE driver will link to whatever library you've compiled into $(OdeHome)\lib\ode.lib, and AFAIK Newton doesn't come with a debug build of the library does it?
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

OK. The baby wouldn't sleep, so the Zips are updated too.
:?
sterra
Gnoblar
Posts: 14
Joined: Thu Jun 02, 2005 4:26 pm

Post by sterra »

I managed to get ode working.

I haven't tried any of the other engines yet though and I actually just took the ode lib file from the ogresource and moved it over(sheer laziness). In the demo that I ran everything looked pretty nice.
gururise
Gnoblar
Posts: 13
Joined: Sat May 28, 2005 12:39 am

Post by gururise »

Great Work Monster! Any plans for a Linux release soon? :)
User avatar
DaesDemon
Goblin
Posts: 209
Joined: Thu Jan 22, 2004 3:59 pm
Location: Toulouse (France)

Post by DaesDemon »

I followed the instruction to build ODE in command line with correct options.
And everything is working Great now.

Thanks Monster.
:D
Every Night and every Morn
Some to Misery are born.
Every Morn and every Night
Some are born to Sweet Delight,
Some are born to Endless Night.
User avatar
Project5
Goblin
Posts: 245
Joined: Mon Nov 22, 2004 11:56 pm
Location: New York, NY, USA

Post by Project5 »

Monster:
Last I saw, both release and debug configurations of gangsta linked against ode.lib.

if you batch build ODE, it produces both ode.lib and oded.lib. I'm assuming that oded.lib is the debug version, but I could be wrong there.

I'll check out the new zips tonight :-)

--Ben
User avatar
technobot
Kobold
Posts: 30
Joined: Mon May 23, 2005 6:04 pm

Post by technobot »

Monster, it looks like I may have to "boot you squarely in the knackers" as you've put it. :twisted: :wink:

I'm trying to compile Gangsta under CodeBlocks with MinGW 3.4.2. I've imported the visual studio solutions (it seems like CB replaced the environment variables with their actual values, but that's a minor issue) and modified the post-build commands to work properly. I'll send you the CB scripts as soon as everything compiles. The Gangsta Wrapper compiled ok, with a few minor changes to the code, but all the physics drivers fail to compile/link/something (they all have the same problem I think).

First, the code changes to get the wrapper to compile:

Prob:

Code: Select all

../../include/GaTypes.h:417: error: incomplete type `Ga::Parameter' used in nested name specifier"
Sol:
Move the GaPtr::GaPtr(const Parameter &oth) constructor implementation to the cpp:

Code: Select all

template<class _Ty> GaPtr<_Ty>::GaPtr(const Parameter &oth)
{
    _ptr = static_cast<_Ty*>(&Parameter::Ptr(oth));
}
Prob:

Code: Select all

..\..\src\GaMath.cpp:29: error: `FLT_EPSILON' was not declared in this scope
..\..\src\GaMath.cpp:30: error: `FLT_MIN' was not declared in this scope
..\..\src\GaMath.cpp:31: error: `FLT_MAX' was not declared in this scope
Sol:
Add #include <float.h> to GaPreReqs.h.


And that's it. Next, when I tried to compile the newton driver, I gota buch of: "warning: [...] is declared as dllimport: attribute ignored." and a "Process terminated with status 1". No additional error messages or anything... the last excuted comand was:

Code: Select all

mingw32-g++.exe   -W -g -DWIN32 -D_DEBUG -D_WINDOWS -D_USRDLL -DPHYSICSDRIVER_EXPORTS  -W -Wall   -I..\..\include -I..\..\..\..\Gangsta\include -I..\..\..\..\..\..\Newton\sdk  -c ..\..\src\GaWorld_Newton.cpp -o ..\..\obj\Debug\src\GaWorld_Newton.o
When I changed GaPreReqs.h to such that GeExport is defined as #define GaExport (i.e. empty), all those warnings disappeared, but some other cryptic error showed up (or errors, maybe.. not sure if it's one big one or several small ones....). Here is the red part of the compiler log. Seems like maybe a problem with the templates:

EDIT: it seems like this is the same problem sinbad was having..

Code: Select all

C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h: In function `void std::_Construct(_T1*, const _T2&) [with _T1 = Ga::Body, _T2 = Ga::GaPtr<Ga::Body>]':
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_uninitialized.h:86:   instantiated from `_ForwardIterator std::__uninitialized_copy_aux(_InputIterator, _InputIterator, _ForwardIterator, __false_type) [with _InputIterator = __gnu_cxx::__normal_iterator<Ga::GaPtr<Ga::Body>*, std::vector<Ga::GaPtr<Ga::Body>, std::allocator<Ga::GaPtr<Ga::Body> > > >, _ForwardIterator = __gnu_cxx::__normal_iterator<Ga::GaPtr<Ga::Body>*, std::vector<Ga::GaPtr<Ga::Body>, std::allocator<Ga::GaPtr<Ga::Body> > > >]'
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_uninitialized.h:112:   instantiated from `_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<Ga::GaPtr<Ga::Body>*, std::vector<Ga::GaPtr<Ga::Body>, std::allocator<Ga::GaPtr<Ga::Body> > > >, _ForwardIterator = __gnu_cxx::__normal_iterator<Ga::GaPtr<Ga::Body>*, std::vector<Ga::GaPtr<Ga::Body>, std::allocator<Ga::GaPtr<Ga::Body> > > >]'
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/vector.tcc:248:   instantiated from `void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >, const _Tp&) [with _Tp = Ga::GaPtr<Ga::Body>, _Alloc = std::allocator<Ga::GaPtr<Ga::Body> >]'
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_vector.h:564:   instantiated from `void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = Ga::GaPtr<Ga::Body>, _Alloc = std::allocator<Ga::GaPtr<Ga::Body> >]'
..\..\src\GaWorld_Newton.cpp:83:   instantiated from here
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h:81: error: cannot allocate an object of type `Ga::Body'
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h:81: error:   because the following virtual functions are abstract:
../../../../Gangsta/include/GaBody.h:39: error:  virtual void Ga::Body::initialise(const Ga::ParameterList&)
../../../../Gangsta/include/GaBody.h:41: error:  virtual void Ga::Body::setPosition(const Ga::GaVec3&)
../../../../Gangsta/include/GaBody.h:42: error:  virtual void Ga::Body::setOrientation(const Ga::GaQuat&)
../../../../Gangsta/include/GaBody.h:43: error:  virtual void Ga::Body::setLinearVelocity(const Ga::GaVec3&)
../../../../Gangsta/include/GaBody.h:44: error:  virtual void Ga::Body::setAngularVelocity(const Ga::GaVec3&)
../../../../Gangsta/include/GaBody.h:46: error:  virtual Ga::GaVec3 Ga::Body::getPosition()
../../../../Gangsta/include/GaBody.h:47: error:  virtual Ga::GaQuat Ga::Body::getOrientation()
../../../../Gangsta/include/GaBody.h:48: error:  virtual Ga::GaVec3 Ga::Body::getLinearVelocity()
../../../../Gangsta/include/GaBody.h:49: error:  virtual Ga::GaVec3 Ga::Body::getAngularVelocity()
../../../../Gangsta/include/GaBody.h:50: error:  virtual Ga::GaVec3 Ga::Body::getRelativeLinearVelocity()
../../../../Gangsta/include/GaBody.h:51: error:  virtual Ga::GaVec3 Ga::Body::getRelativeAngularVelocity()
../../../../Gangsta/include/GaBody.h:53: error:  virtual void Ga::Body::setLinearDamping(Ga::GaFloat)
../../../../Gangsta/include/GaBody.h:54: error:  virtual void Ga::Body::setAngularDamping(Ga::GaFloat)
../../../../Gangsta/include/GaBody.h:55: error:  virtual Ga::GaFloat Ga::Body::getLinearDamping()
../../../../Gangsta/include/GaBody.h:56: error:  virtual Ga::GaFloat Ga::Body::getAngularDamping()
../../../../Gangsta/include/GaBody.h:57: error:  virtual void Ga::Body::setMaximumAngularVelocity(Ga::GaFloat)
../../../../Gangsta/include/GaBody.h:58: error:  virtual Ga::GaFloat Ga::Body::getMaximumAngularVelocity()
../../../../Gangsta/include/GaBody.h:60: error:  virtual Ga::GaVec3 Ga::Body::worldToLocal(const Ga::GaVec3&)
../../../../Gangsta/include/GaBody.h:61: error:  virtual Ga::GaVec3 Ga::Body::localToWorld(const Ga::GaVec3&)
../../../../Gangsta/include/GaBody.h:63: error:  virtual void Ga::Body::applyForce(const Ga::GaVec3&, const Ga::GaVec3&)
../../../../Gangsta/include/GaBody.h:64: error:  virtual void Ga::Body::applyRelativeForce(const Ga::GaVec3&, const Ga::GaVec3&)
../../../../Gangsta/include/GaBody.h:65: error:  virtual void Ga::Body::applyTorque(const Ga::GaVec3&)
../../../../Gangsta/include/GaBody.h:66: error:  virtual void Ga::Body::applyRelativeTorque(const Ga::GaVec3&)