rSimulate / Cosmosium

:earth_americas: js game engine for space-based games
Other
23 stars 7 forks source link

Trying to run Cosmosium Server on Raspberry Pi / Debian Jessie #110

Closed venku122 closed 7 years ago

venku122 commented 7 years ago

Hello, I am trying to get your server to run, but I've run into several issues. I've successfully installed all of the dependencies outlined here.. I then had to install PyKEP. I followed your guide, and moved the compiled files to the correct location, but I am still getting the error below.

:/usr/src/Cosmosium $ python app.py
Traceback (most recent call last):
  File "app.py", line 38, in <module>
    import py.webSocketParser as webSocketParser
  File "/usr/src/Cosmosium/py/webSocketParser.py", line 8, in <module>
    from py.generate_traj import gen_traj
  File "/usr/src/Cosmosium/py/generate_traj.py", line 2, in <module>
    from lib.traj.C3 import traj_planet_asteroid
  File "/usr/src/Cosmosium/py/lib/traj/C3.py", line 4, in <module>
    from PyKEP import epoch, DAY2SEC, SEC2DAY, AU, DEG2RAD, MU_SUN, planet_ss, lambert_problem, propagate_lagrangian, \
  File "/usr/lib/python2.7/dist-packages/PyKEP/__init__.py", line 45, in <module>
    from PyKEP import core, sims_flanagan, orbit_plots, examples, trajopt, phasing, util, planet
  File "/usr/lib/python2.7/dist-packages/PyKEP/core/__init__.py", line 3, in <module>
    from PyKEP.core._core import _get_AU, _get_JR, _get_DAY2SEC, _get_DAY2YEAR, _get_DEG2RAD, _get_EARTH_VELOCITY, _get_EARTH_J2, _get_EARTH_RADIUS, _get_MU_EARTH, _get_G0, _get_MU_SUN, _get_RAD2DEG, _get_SEC2DAY
ImportError: libkeplerian_toolbox.so: cannot open shared object file: No such file or directory

Do you have any advice or guidance to resolve this? I'd like to get this up and running and host it somewhere.

7yl4r commented 7 years ago

Hi TJ ,

I think it's been a while since anyone has gone through the build process, but this error looks like a problem with the pykep installation, which is a library supported elsewhere. Either you don't have that .so file installed or else pykep can't find it. The fix is to install a library that provides it or create a link so pykep can find it. You might find more searching around, but I might enjoy taking a look back at this later anyway.

What are your plans/goals with Cosmosium?

On Sat, May 27, 2017, 5:17 PM T.J. Tarazevits notifications@github.com wrote:

Hello, I am trying to get your server to run, but I've run into several issues. I've successfully installed all of the dependencies outlined here. https://github.com/rSimulate/Cosmosium/blob/master/INSTALL.md. I then had to install PyKEP. I followed your guide https://github.com/rSimulate/Cosmosium/wiki/Installing-PyKEP, and moved the compiled files to the correct location, but I am still getting the error below.

:/usr/src/Cosmosium $ python app.py Traceback (most recent call last): File "app.py", line 38, in import py.webSocketParser as webSocketParser File "/usr/src/Cosmosium/py/webSocketParser.py", line 8, in from py.generate_traj import gen_traj File "/usr/src/Cosmosium/py/generate_traj.py", line 2, in from lib.traj.C3 import traj_planet_asteroid File "/usr/src/Cosmosium/py/lib/traj/C3.py", line 4, in from PyKEP import epoch, DAY2SEC, SEC2DAY, AU, DEG2RAD, MU_SUN, planet_ss, lambert_problem, propagate_lagrangian, \ File "/usr/lib/python2.7/dist-packages/PyKEP/init.py", line 45, in from PyKEP import core, sims_flanagan, orbit_plots, examples, trajopt, phasing, util, planet File "/usr/lib/python2.7/dist-packages/PyKEP/core/init.py", line 3, in from PyKEP.core._core import _get_AU, _get_JR, _get_DAY2SEC, _get_DAY2YEAR, _get_DEG2RAD, _get_EARTH_VELOCITY, _get_EARTH_J2, _get_EARTH_RADIUS, _get_MU_EARTH, _get_G0, _get_MU_SUN, _get_RAD2DEG, _get_SEC2DAY ImportError: libkeplerian_toolbox.so: cannot open shared object file: No such file or directory

Do you have any advice or guidance to resolve this? I'd like to get this up and running and host it somewhere.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rSimulate/Cosmosium/issues/110, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAK_q2FUwsFcqhX7Hilbl4xWpMD5AP_ks5r-JL3gaJpZM4NoeSW .

venku122 commented 7 years ago
Traceback (most recent call last):
  File "app.py", line 38, in <module>
    import py.webSocketParser as webSocketParser
  File "/usr/src/Cosmosium/py/webSocketParser.py", line 8, in <module>
    from py.generate_traj import gen_traj
  File "/usr/src/Cosmosium/py/generate_traj.py", line 2, in <module>
    from lib.traj.C3 import traj_planet_asteroid
  File "/usr/src/Cosmosium/py/lib/traj/C3.py", line 4, in <module>
    from PyKEP import epoch, DAY2SEC, SEC2DAY, AU, DEG2RAD, MU_SUN, planet_ss, lambert_problem, propagate_lagrangian, \
ImportError: cannot import name planet_ss

I was able to resolve the linking error, but now I am getting the error above.

I found this project in the comments of another project, which I was interested in reviving. Your engine caught my eye and I want to play around with it, and see where I could make some contributions. I am quite passionate about space and I'm looking for some space projects to contribute towards.

7yl4r commented 7 years ago

I'm hoping I have time to try a fresh install this weekend and hopefully recreate this issue.

7yl4r commented 7 years ago

Well, this error is because PyKEP recently re-worked their library to remove planet_ss. Looking through the releases I think cosmosium may need pykep v < 1.2.2.

Ideally we can update to work with the newest pykep, but you can also try installing an older pykep release for now. Looking at the dates, I guess we were using PyKEP v1.1.3 for this project.

venku122 commented 7 years ago

Hmm, how extensive is the use of planet_ss? I'll need to dive into your code and maybe I can update to support the latest version.

On Jun 3, 2017 6:23 PM, "Tylar" notifications@github.com wrote:

Well, this error is because PyKEP recently re-worked their library to remove planet_ss https://github.com/esa/pykep/pull/25. Looking through the releases I think cosmosium may need pykep v < 1.2.2.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rSimulate/Cosmosium/issues/110#issuecomment-306004935, or mute the thread https://github.com/notifications/unsubscribe-auth/AEg6B_TeJK3V7A93aMSE1a1sU_TvM8EYks5sAdzEgaJpZM4NoeSW .

7yl4r commented 7 years ago

It looks like there are really only two usages and they are pretty simple. I'm not sure if there are any other compatibility issues with using the newer pykep...

venku122 commented 7 years ago

I was able to get the server to boot. I'll need to poke around a bit to see if there are any runtime errors.

Fix: Replace planet_ss with planet.jpl_lp and remove unused import planet_mpcorb

Thanks to @darioizzo in https://github.com/esa/pykep/pull/27#issuecomment-306016383 2017_cosmosium

7yl4r commented 7 years ago

nice! Be sure to check out the asteroid viewer; it was always one of my favourite parts.

7yl4r commented 7 years ago

Be sure to check out the asteroid viewer

You know, I suggested this then booted up the server to check on it myself and couldn't find it! There's a ton of boilerplate in there.

I think the view with lots of asteroids (and the one with asteroids colored by owner) was a test that I have apparently hidden too well. The closest I was able to find was by doing "targets > asteroid surveys" then picking one. This should add a few asteroids which you can then click on and claim to color them as yours.

Ideally this project would be pruned back significantly so the interesting parts are visible though the fluff, but if there is any particular part you might like to break off of the engine and re-purpose just let me know and I may be able to help.

venku122 commented 7 years ago

@7yl4r I'll be sure to check that out. I plan to dive more into the code in a week or two. My initial hook was the integration of PyKEP with the 3D rendering engine. We'll see what happens :)