|
From: Adam D. <ade...@ex...> - 2013-04-03 20:50:23
|
Thanks. Working now.
-- Adam
From: James Goppert <jam...@gm...<mailto:jam...@gm...>>
Reply-To: Development issues <jsb...@li...<mailto:jsb...@li...>>
Date: Wednesday, April 3, 2013 12:53 PM
To: Development issues <jsb...@li...<mailto:jsb...@li...>>
Subject: Re: [Jsbsim-devel] JSBSim Python Interface via Cython
I fixed the install, it was broken for me as well, just hadn't checked recently. You should just be able to upgrade the package with pip and it should be fixed.
pip install --upgrade PyJSBSim
On Wed, Apr 3, 2013 at 12:32 PM, Adam Dershowitz <ade...@ex...<mailto:ade...@ex...>> wrote:
I figured out the problem, but not the solution. If I look into
site-packages/pyjsbsim all I see is jsbsim_cython.so
It used to install a few other files in there, such as __init__.py
So, it seems that there was a change in the pip script, and now it doesn't
actually install everything that it needs.
I see that it also installs a few files into site-packages/test and there
__init__.py is empty.
So, it seems that it builds and installs the library itself, but not
everything that it needs.
-- Adam
On 4/3/13 8:53 AM, "Adam Dershowitz" <ade...@ex...<mailto:ade...@ex...>> wrote:
>I just tried to install pyjsbsim on a different computer. I have jsbsim
>sim installed, with libraries. If I use pip it seems to install fine:
>
>$sudo pip-2.6 install PyJSBSim:
>
>Downloading/unpacking PyJSBSim
> Downloading PyJSBSim-0.5.5.tar.gz (60kB): 60kB downloaded
> Running setup.py egg_info for package PyJSBSim
>Requirement already satisfied (use --upgrade to upgrade): numpy in
>/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
>s
>ite-packages (from PyJSBSim)
>Installing collected packages: PyJSBSim
> Running setup.py install for PyJSBSim
> skipping 'cython/fgfdmexec.cpp' Cython extension (up-to-date)
> building 'pyjsbsim.jsbsim_cython' extension
> /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -O2
>-fwrapv -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
>-I/usr/local/include/JSBSim
>-I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/pyth
>o
>n2.6 -c cython/fgfdmexec.cpp -o
>build/temp.macosx-10.8-x86_64-2.6/cython/fgfdmexec.o
> /usr/bin/clang++ -L/opt/local/lib -bundle -undefined dynamic_lookup
>build/temp.macosx-10.8-x86_64-2.6/cython/fgfdmexec.o -lJSBSim -o
>build/lib.macosx-10.8-x86_64-2.6/pyjsbsim/jsbsim_cython.so
>Successfully installed PyJSBSim
>Cleaning up...
>
>And pip thinks that it is installed. Pip freeze shows:
>$pip-2.6 freeze
>PyJSBSim==0.5.5
>
>
>But, if I then try to use it, it doesn't appear to be installed:
>
>
>$python
>>>> from pyjsbsim import FGFDMExec
>Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
>ImportError: No module named pyjsbsim
>
>And, if I look in my site-packages folder I see these:
>
>pyjsbsim
>PyJSBSim-0.5.5-py2.6.egg-info
>
>Any idea how this could be going on? I do have other things that I have
>installed with pip that are in my site-package folder and I can import
>them in python correctly.
>
>
>
>-- Adam
>
>
>
>
>
>
>On 3/7/13 2:05 PM, "James Goppert" <jam...@gm...<mailto:jam...@gm...>> wrote:
>
>>Here is a quick start at your question:
>>
>>Dependencies are Cython > 0.18, NumPy.
>>
>>The easiest way to install everything is:
>>
>>pip install PyJSBSim
>>(of course this requires that you install pip first)
>>
>>I have it generating BADA files now, see attached for a 737 bada file
>>that was produced. This still needs some work probably. But it is a
>>great way to see how JSBSim compares with real flight data!
>>
>>Here is a short example with plotting:
>>
>>from pyjsbsim import FGFDMExec
>>from pylab import *
>>
>># load
>>fdm = FGFDMExec(debug_level=0)
>>fdm.load_model("f16")
>>
>># trim
>>fdm.set_property_value("ic/h-agl-ft",1000)
>>fdm.set_property_value("ic/vc-kts",400)
>>fdm.set_property_value("ic/gamma-deg",0)
>>fdm.do_trim(0)
>>
>># simulate
>>(t,y) = fdm.simulate(
>> t_final=10,
>> dt=0.1,
>> record_properties=["position/h-agl-ft", "attitude/theta-deg"])
>>
>># plot
>>title("test")
>>xlabel("t, sec")
>>ylabel("h-agl, ft")
>>plot(t,y["position/h-agl-ft"])
>>show()
>>
>>-James
>>
>>On Mon, Mar 4, 2013 at 4:46 PM, Agostino De Marco <ago...@un...<mailto:ago...@un...>>
>>wrote:
>>> Hey James,
>>> this looks really interesting. I've looked into the
>>> 737_trim.py where you call many times the simplex trim function.
>>>
>>> It would be cool if we could write some tips to get started
>>> with this work environment.
>>> Like:
>>> How to setup the python environment and which are the
>>> suggested additional packages to install (such as numpy).
>>> How to start a simulation from Python.
>>> How can time histories be plotted (e.g. matplotlib).
>>>
>>> It would be nice to add these new features to the JSBSim manual.
>>>
>>> Agostino
>>>
>>>
>>>
>>>
>>> James Goppert <jam...@gm...<mailto:jam...@gm...>> ha scritto:
>>>
>>>> This is now functional. I am using it to generate BADA tables for
>>>> aircraft modeled in JSBSim. There is an example script in
>>>> scripts/737_trim.py
>>>>
>>>> I have interfaced all of the FGFDMExec class. You can do about
>>>> anything using the set/get property functions, so not really a need to
>>>> interface the rests of the classes, also will keep maintenance
>>>> requirements low.
>>>>
>>>> -James
>>>>
>>>> On Sat, Mar 2, 2013 at 5:16 PM, James Goppert
>>>> <jam...@gm...<mailto:jam...@gm...>> wrote:
>>>>> I'm working on interfacing JSBSim with Cython. I looked at the
>>>>> existing python jsbsim wrapper, but it seemed to be out of date. Also
>>>>> cython seems to be much faster.
>>>>>
>>>>> https://pypi.python.org/pypi/PyJSBSim
>>>>>
>>>>> -James
>>>>
>>>>
>>>>-----------------------------------------------------------------------
>>>>-
>>>>------
>>>> Everyone hates slow websites. So do we.
>>>> Make your web apps faster with AppDynamics
>>>> Download AppDynamics Lite for free today:
>>>> http://p.sf.net/sfu/appdyn_d2d_feb
>>>> _______________________________________________
>>>> Jsbsim-devel mailing list
>>>> Jsb...@li...<mailto:Jsb...@li...>
>>>> https://lists.sourceforge.net/lists/listinfo/jsbsim-devel
>>>> _______________________________________________
>>>> The JSBSim Flight Dynamics Model project
>>>> http://www.JSBSim.org
>>>> _______________________________________________
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> -------------------------------------------------------
>>> Agostino De Marco, PhD
>>>
>>> Assistant Professor
>>>
>>> Università degli Studi di Napoli Federico II
>>>
>>> Dipartimento di Ingegneria Industriale - Sezione Aerospaziale
>>>
>>> Aircraft Design & AeroFlightDynamics Group (ADAG)
>>>
>>> ** University of Naples Federico II
>>> ** Industrial Engineering Department
>>> ** Aircraft Design & AeroFlightDynamics Group
>>>
>>> via Claudio 21, 80125 Napoli - Italy
>>> Tel.: +39 0817683323<tel:%2B39%200817683323>
>>> Fax: +39 0817683622<tel:%2B39%200817683622>
>>> Email: ago...@un...<mailto:ago...@un...>
>>> Web 1: www.dii.unina.it<http://www.dii.unina.it>
>>> Web 2: www.adag.unina.it<http://www.adag.unina.it>
>>> Web 3: www.eolpowergroup.com<http://www.eolpowergroup.com>
>>> -------------------------------------------------------
>>>
>>>
>>>
>>>------------------------------------------------------------------------
>>>-
>>>-----
>>> Everyone hates slow websites. So do we.
>>> Make your web apps faster with AppDynamics
>>> Download AppDynamics Lite for free today:
>>> http://p.sf.net/sfu/appdyn_d2d_feb
>>> _______________________________________________
>>> Jsbsim-devel mailing list
>>> Jsb...@li...<mailto:Jsb...@li...>
>>> https://lists.sourceforge.net/lists/listinfo/jsbsim-devel
>>> _______________________________________________
>>> The JSBSim Flight Dynamics Model project
>>> http://www.JSBSim.org
>>> _______________________________________________
>>>
>
>
>--------------------------------------------------------------------------
>----
>Minimize network downtime and maximize team effectiveness.
>Reduce network management and security costs.Learn how to hire
>the most talented Cisco Certified professionals. Visit the
>Employer Resources Portal
>http://www.cisco.com/web/learning/employer_resources/index.html
>_______________________________________________
>Jsbsim-devel mailing list
>Jsb...@li...<mailto:Jsb...@li...>
>https://lists.sourceforge.net/lists/listinfo/jsbsim-devel
>_______________________________________________
>The JSBSim Flight Dynamics Model project
>http://www.JSBSim.org
>_______________________________________________
>
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Jsbsim-devel mailing list
Jsb...@li...<mailto:Jsb...@li...>
https://lists.sourceforge.net/lists/listinfo/jsbsim-devel
_______________________________________________
The JSBSim Flight Dynamics Model project
http://www.JSBSim.org
_______________________________________________
|