AVSLab / bsk_rl

RL environments and tools for spacecraft autonomy research, built on Basilisk. Developed by the AVS Lab.
https://avslab.github.io/bsk_rl/
MIT License
36 stars 2 forks source link

Problem with runnig examples and Envs #139

Closed ImMohammadHosseini closed 1 month ago

ImMohammadHosseini commented 1 month ago

Upon attempting to use the environment in bsk_rl/envs/agile_eos/gym_env.py after calling the reset method, I encountered the following unchanged message:

' /.../../basilisk/bsk_rl/src/bsk_rl/utilities/initial_conditions/leo_orbit.py:224: BSKDeprecationWarning: GravBodyData.useSphericalHarmParams setter will be removed after 2024-09-07: Using 'useSphericalHarmParams = True/False' to turn on/off the spherical harmonics is deprecated. Prefer the following syntax: planet.useSphericalHarmonicsGravityModel('GGM2BData.txt', 100) Over: planet.useSphericalHarmParams = True simIncludeGravBody.loadGravFromFile('GGM2BData.txt', planet.spherHarm, 100) planet.useSphericalHarmParams = True

================================================================================

Toolkit version: N0065

SPICE(NOSUCHFILE) --

The attempt to load "/.../.../basilisk/dist3/Basilisk/supportData/EphemerisData/de430.bsp" by the routine FURNSH failed. It could not be located.

A traceback follows. The name of the highest level module is first. furnsh_c --> FURNSH --> ZZLDKER

================================================================================

================================================================================

Toolkit version: N0065

SPICE(BADVARASSIGN) --

The first item following the assignment operator should be the value of a variable or a left parenthesis '(' followed by a value for a variable. This is not true on line 1 of the text kernel file '/.../.../basilisk/dist3/Basilisk/supportData/EphemerisData/pck00010.tpc'.

A traceback follows. The name of the highest level module is first. furnsh_c --> FURNSH --> ZZLDKER --> LDPOOL --> ZZRVAR

================================================================================

================================================================================

Toolkit version: N0065

SPICE(NOLEAPSECONDS) --

The variable that points to the leapseconds (DELTET/DELTA_AT) could not be located in the kernel pool. It is likely that the leapseconds kernel has not been loaded via the routine FURNSH.

A traceback follows. The name of the highest level module is first. str2et_c --> STR2ET --> TTRANS

Oh, by the way: The SPICELIB error handling actions are USER-TAILORABLE. You can choose whether the Toolkit aborts or continues when errors occur, which error messages to output, and where to send the output. Please read the ERROR "Required Reading" file, or see the routines ERRACT, ERRDEV, and ERRPRT.

================================================================================ '

Additionally, while trying to run examples/general_satellite_tasking/single_sat.py, I received the following message:

' {'hs_min': 0.0, 'maxCounterValue': 4, 'thrMinFireTime': 0.02, 'desatAttitude': 'sun', 'controlAxes_B': [1, 0, 0, 0, 1, 0, 0, 0, 1], 'thrForceSign': 1, 'K1': 0.25, 'K3': 3.0, 'omega_max': 0.05235987755982989, 'servo_Ki': 5.0, 'servo_P': 150, 'imageAttErrorRequirement': 0.01, 'imageRateErrorRequirement': 0.01, 'inst_pHat_B': [0, 0, 1], 'batteryStorageCapacity': 288000.0, 'storedCharge_Init': <function BasicDynamicsModel. at 0x7f0753559120>, 'disturbance_vector': None, 'groundLocationPlanetRadius': 6378136.6, 'imageTargetMinimumElevation': 0.7853981633974483, 'imageTargetMaximumRange': -1, 'instrumentBaudRate': 8000000.0, 'instrumentPowerDraw': -30.0, 'wheelSpeeds': <function BasicDynamicsModel. at 0x7f0753558b80>, 'maxWheelSpeed': inf, 'u_max': 0.2, 'rwBasePower': 0.4, 'rwMechToElecEfficiency': 0.0, 'rwElecToMechEfficiency': 0.5, 'panelArea': 1.0, 'panelEfficiency': 0.2, 'nHat_B': array([0, 1, 0]), 'mass': 330, 'width': 1.38, 'depth': 1.04, 'height': 1.58, 'sigma_init': <function BasicDynamicsModel. at 0x7f0753558400>, 'omega_init': <function BasicDynamicsModel. at 0x7f07535584a0>, 'rN': None, 'vN': None, 'oe': <function random_orbit at 0x7f0754962160>, 'mu': 398600441500000.0, 'dataStorageCapacity': 160000000.0, 'bufferNames': None, 'storageUnitValidCheck': True, 'storageInit': 0, 'thrusterPowerDraw': 0.0, 'transmitterBaudRate': -8000000.0, 'transmitterNumBuffers': 100, 'transmitterPowerDraw': -15.0} 2024-05-27 11:13:47,874 gym_env INFO Calling env.reset() to get observation space 2024-05-27 11:13:47,875 gym_env INFO Resetting environment with seed=2690491361 2024-05-27 11:13:47,875 scenario.environment_features INFO Generating 1000 targets

================================================================================

Toolkit version: N0065

SPICE(NOSUCHFILE) --

The attempt to load "/home/mohammad/basilisk/dist3/Basilisk/supportData/EphemerisData/de430.bsp" by the routine FURNSH failed. It could not be located.

A traceback follows. The name of the highest level module is first. furnsh_c --> FURNSH --> ZZLDKER

================================================================================ terminate called after throwing an instance of 'std::invalid_argument' what(): stod Aborted '

Version

I would like guidance on resolving these issues and understanding how to effectively utilize the environments provided in the project. Thank you.

Mark2000 commented 1 month ago

In general, I would recommend against using anything other than the general satellite tasking environment. All other environments will be deprecated in the 1.0.0 release, which should be out in the next month or so.

I believe that both issues are from not having git lfs installed for Basilisk, so certain support files are missing. See more here: https://hanspeterschaub.info/basilisk/Install/pullCloneBSK.html