This library allows for the position, rotation, velocity and rotational velocity tracking of multiple bodies in space, especially in relation to one another. It makes extensive use of NAIF's SPICE data for such calculations.
-
Generating an ISD with
isd_generate- How to use the
isd_generatescript, and set up NAIF SPICE Data
- How to use the
-
- Brief overview of how to install ALE and use
load/loadsin python
- Brief overview of how to install ALE and use
-
Tutorial: Generating an ISD, Creating a CSM Model, and Converting Coordinates
- A tutorial on using ALE and Knoten in python
-
- How ALE and its drivers work
Conda is a prerequisite for ALE. If you need it, download and install conda through miniforge.
# Create an environment ("y" to confirm)
conda create -n ale
# Run this to activate your environment whenever you need to use ALE
conda activate ale
# Install ALE from conda (in your current environment)
conda install -c conda-forge aleIf your ale driver uses NAIF SPICE data, you need to download NAIF SPICE DATA (see ASC software docs) and set the ALESPICEROOT variable in one of these two ways:
# from your shell:
export ALESPICEROOT=/path/to/ale/spice
# from inside a conda env:
conda env config vars set ALESPICEROOT=/path/to/ale/spiceTo generate an ISD for an image, use the load(s) function. Pass the path to your image/label file and ALE will attempt to find a suitable driver and return an ISD. You can use load to generate the ISD as a dictionary or loads to generate the ISD as a JSON encoded string.
isd_dict = load(path_to_label)
isd_string = loads(path_to_label)
You can get more verbose output from load(s) by passing verbose=True. If you are having difficulty generating an ISD enable the verbose flag to view the actual errors encountered in drivers.
Clone ALE from git and create a conda environment with the necessary dependencies.
git clone --recurse-submodules [paste link from "<> Code" button above]
cd ale
conda env create -n ale -f environment.yml # "y" to confirmActivate the environment whenever you need to use ALE.
conda activate aleYou can add
conda activate aleto the end of your .bashrc or .zshrc if you want thealeenvironment to be active in every new terminal.
After you've set up and activated your conda environment, you may then build ALE. Inside of a cloned fork of the repository, follow these steps:
python setup.py install
cd build
cmake ..
makeKeep in mind that you will need to clone the repository with the --recursive flag in order to
retrieve the gtest submodule for testing. If you have already cloned without the --recursive flag,
running the following command will retrieve the gtest submodule manually:
git submodule update --init --recursiveYou can add ALE as a dependency of your CMake based C++ project by linking the exported CMake target, ale::ale
add_library(my_library some_source.cpp)
find_package(ale REQUIRED)
target_link_libraries(my_library ale::ale)To test the c++ part of ALE, run ctest from the build directory.
To test the python part of ALE, run pytest tests/pytests