From: Ewald Z. <ewa...@gm...> - 2010-10-04 09:09:13
|
Hi, The test-simple.py runs fine when I point the paths to the correct folders. The Panda3d demo (which is more or less the kind of thing I'm working on) Gives the following: DirectStart: Starting the game. Known pipe types: glxGraphicsPipe (all display modules loaded.) JSBSim Flight Dynamics Model v1.0 Oct 2 2010 00:50:00 [JSBSim-ML v2.0] JSBSim startup beginning ... Error: attempted to load aircraft with undefined aircraft, engine, and system paths Traceback (most recent call last): File "JSBSim-Demo.py", line 393, in <module> world = World( ) File "JSBSim-Demo.py", line 85, in __init__ self.setupSimulation( ) File "JSBSim-Demo.py", line 112, in setupSimulation self.fdstate = self.fdex.GetState( ) AttributeError: 'JSBSim.FGFDMExec' object has no attribute 'GetState' The code that is relevant in this case is the following: def setupSimulation( self ): self.step = 1.0 / 120.0 self.fdex = JSBSim.FGFDMExec( ) self.fdex.SetDebugLevel( 0 ) self.fdex.SetAircraftPath( 'aircraft' ) self.fdex.SetEnginePath( 'engine' ) self.fdex.LoadModel( 'c172p' ) #self.cb = GroundCallback( ) #self.fdex.SetGroundCallback( self.cb ) self.fdstate = self.fdex.GetState( ) ic = self.fdex.GetIC( ) ic.SetUBodyFpsIC( 0.0 ) ic.SetVBodyFpsIC( 0.0 ) ic.SetWBodyFpsIC( 0.0 ) ic.SetLatitudeDegIC( 47.0 ) ic.SetLongitudeDegIC( 122.0 ) ic.SetPhiDegIC( 0.0 ) ic.SetThetaDegIC( 0.0 ) ic.SetPsiDegIC( 12.0 ) # ic.SetAltitudeFtIC( 4.8 ) self.fdex.RunIC( ) self.fdex.DoTrim( JSBSim.tGround ) #engine = self.fdex.GetPropulsion( ).GetEngine( 0 ) #print engine #print engine.GetType( ) #print dir( engine ) Did things change much since that time? In that case, maybe you can help. I'm working on a flying game. I believe it is possible to send and receive various flight parameters to and from JSBSim. So, in short, at every frame in my game I need to pass the control inputs (joystick, throttle, flaps, gear etc) to JSBSim and it needs to tell me the direction, position, velocity etc etc so I can update the 3d model of the plane in the game. Can the python bindings do this? Do I need to make a script or can I pass the values to a python object which interfaces with JSBSim? On Sun, Oct 3, 2010 at 10:22 PM, Gotthard, Petr <Pet...@ho... > wrote: > Ewald, and the current JSBSim-Python example works? > > > > Petr > > > > *From:* Ewald Zietsman [mailto:ewa...@gm...] > *Sent:* Saturday, October 02, 2010 1:05 AM > > *To:* jsb...@li... > *Subject:* Re: [Jsbsim-python-devel] python bindings on linux > > > > Thank you very much! It compiled and it seems to run. The demo included > with the old bindings doesn't work though. I'll have to figure out how it > works now (and then attempt to model a Mirage F1...) > > > > > > 2010/10/1 Gotthard, Petr <Pet...@ho...> > > The very latest JSBSim, i.e. the CVS HEAD. > > > Petr > > -----Original Message----- > From: Charles Paul [mailto:cha...@gm...] > > Sent: Friday, October 01, 2010 6:13 PM > To: Gotthard, Petr > Cc: Ewald Zietsman; jsb...@li... > Subject: Re: [Jsbsim-python-devel] python bindings on linux > > Hi Petr, > > Should we use the latest JSBSim from cvs, or the latest RC? > > Thanks, > Charles > > On Fri, Oct 1, 2010 at 11:04 AM, Gotthard, Petr > <Pet...@ho...> wrote: > > Hello, > > > > Could you please download the latest JSBSim and latest JSBSim-Python from > > CVS/SVN and try it again. On my PC it's working again. ;-) > > > > > > > > Please let me know if anything is wrong. > > > > > > > > Regards, > > > > Petr > > > > > > > > From: Ewald Zietsman [mailto:ewa...@gm...] > > Sent: Tuesday, September 28, 2010 9:17 PM > > > > To: jsb...@li... > > Subject: [Jsbsim-python-devel] python bindings on linux > > > > > > > > Hi Guys, > > > > > > > > I'm still stuck. Here is my procedure, > > > > > > > > I have the JSBSim-1.0 rc2 release. > > > > > > > > I installed that using the following commands: > > > > > > > > ./autogen.sh --enable-libraries --disable-static --enable-shared > > > > make > > > > sudo make install > > > > > > > > The libraries ended up in /usr/local/lib > > > > > > > > I used the following commands for the Python bindings: > > > > > > > > export JSBSIM_ROOT=/usr/local/lib > > > > cmake . > > > > make > > > > > > > > > > > > The output with the compiler errors is below. Any help will be greatly > > appreciated. > > > > > > > > > > > > > > > > ewald@ewald-laptop:/media/bigdrive/apps64/jsbsim-python/trunk$ export > > JSBSIM_ROOT=/usr/local/lib/ > > > > ewald@ewald-laptop:/media/bigdrive/apps64/jsbsim-python/trunk$ cmake . > > > > -- The CXX compiler identification is GNU > > > > -- Check for working CXX compiler: /usr/bin/c++ > > > > -- Check for working CXX compiler: /usr/bin/c++ -- works > > > > -- Detecting CXX compiler ABI info > > > > -- Detecting CXX compiler ABI info - done > > > > -- Found JSBSim: /usr/local/lib/libJSBSim.so > > > > -- Found EXPAT: /usr/lib/libexpat.so > > > > -- Found PythonLibs: /usr/lib/libpython2.6.so > > > > -- Found PythonInterp: /usr/bin/python2.6 > > > > -- Found Python modules: /usr/lib/python2.6/dist-packages > > > > -- Python modules will be installed in: /usr/lib/python2.6/dist-packages > > > > -- Configuring done > > > > -- Generating done > > > > -- Build files have been written to: > > /media/bigdrive/apps64/jsbsim-python/trunk > > > > ewald@ewald-laptop:/media/bigdrive/apps64/jsbsim-python/trunk$ make > > > > Scanning dependencies of target _JSBSim > > > > [ 3%] Building CXX object > src/_JSBSim/CMakeFiles/_JSBSim.dir/JSBSim_Main.o > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_Main.cpp:60: > > warning: deprecated conversion from string constant to 'char*' > > > > [ 6%] Building CXX object > src/_JSBSim/CMakeFiles/_JSBSim.dir/Converters.o > > > > [ 9%] Building CXX object > > src/_JSBSim/CMakeFiles/_JSBSim.dir/JSBSim_FGFDMExec.o > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:43: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:49: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:54: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:60: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:65: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:71: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:76: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:81: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:86: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:91: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:106: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:112: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:118: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:123: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:128: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:133: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:138: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:143: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:150: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:156: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:161: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:167: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:173: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:178: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:183: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:189: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:194: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:199: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:202: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:207: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:212: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:217: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:222: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:227: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:232: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:237: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:242: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:247: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:250: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:255: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:258: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:267: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:272: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:277: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:282: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:287: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:292: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:297: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:302: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:308: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:313: > > warning: deprecated conversion from string constant to 'char*' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp: > > In function 'PyObject* FGFDMExecObject_Setdt(FGFDMExecObject*, > PyObject*)': > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:757: > > error: 'class JSBSim::FGFDMExec' has no member named 'Setdt' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp: > > In function 'PyObject* FGFDMExecObject_Setsim_time(FGFDMExecObject*, > > PyObject*)': > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:771: > > error: 'class JSBSim::FGFDMExec' has no member named 'Setsim_time' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp: > > In function 'PyObject* > FGFDMExecObject_SuspendIntegration(FGFDMExecObject*, > > PyObject*)': > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:780: > > error: 'class JSBSim::FGFDMExec' has no member named 'SuspendIntegration' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp: > > In function 'PyObject* > FGFDMExecObject_ResumeIntegration(FGFDMExecObject*, > > PyObject*)': > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:789: > > error: 'class JSBSim::FGFDMExec' has no member named 'ResumeIntegration' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp: > > In function 'PyObject* > > FGFDMExecObject_IntegrationSuspended(FGFDMExecObject*, PyObject*)': > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:798: > > error: 'class JSBSim::FGFDMExec' has no member named > 'IntegrationSuspended' > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp: > > In function 'PyObject* FGFDMExecObject_IncrTime(FGFDMExecObject*, > > PyObject*)': > > > > > /media/bigdrive/apps64/jsbsim-python/trunk/src/_JSBSim/JSBSim_FGFDMExec.cpp:805: > > error: 'class JSBSim::FGFDMExec' has no member named 'IncrTime' > > > > make[2]: *** [src/_JSBSim/CMakeFiles/_JSBSim.dir/JSBSim_FGFDMExec.o] > Error 1 > > > > make[1]: *** [src/_JSBSim/CMakeFiles/_JSBSim.dir/all] Error 2 > > > > make: *** [all] Error 2 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > Start uncovering the many advantages of virtual appliances > > and start using them to simplify application deployment and > > accelerate your shift to cloud computing. > > http://p.sf.net/sfu/novell-sfdev2dev > > _______________________________________________ > > Jsbsim-python-devel mailing list > > Jsb...@li... > > https://lists.sourceforge.net/lists/listinfo/jsbsim-python-devel > > > > > > > |