From d9a2bea6ef02bf5ebba12a279c2f0a644db2085f Mon Sep 17 00:00:00 2001 From: Antoine Falisse Date: Wed, 14 Dec 2022 16:25:09 -0800 Subject: [PATCH 1/5] add cmake to requirements --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 51f26185..f5d92455 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,5 @@ maskpass==0.3.6 requests casadi pyyaml -joblib \ No newline at end of file +joblib +cmake \ No newline at end of file From 9ab7177787bd94c65ff40d8bd457868754e0e3e5 Mon Sep 17 00:00:00 2001 From: Antoine Falisse Date: Thu, 15 Dec 2022 14:32:50 -0800 Subject: [PATCH 2/5] testing --- UtilsDynamicSimulations/OpenSimAD/utilsOpenSimAD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UtilsDynamicSimulations/OpenSimAD/utilsOpenSimAD.py b/UtilsDynamicSimulations/OpenSimAD/utilsOpenSimAD.py index 37107c8d..4e23eba7 100644 --- a/UtilsDynamicSimulations/OpenSimAD/utilsOpenSimAD.py +++ b/UtilsDynamicSimulations/OpenSimAD/utilsOpenSimAD.py @@ -1592,7 +1592,7 @@ def buildExternalFunction(filename, pathDCAD, CPP_DIR, nInputs, cmd_tar = 'tar -xf linux.tar.gz -C "{}"'.format(OpenSimAD_DIR) os.system(cmd_tar) os.remove('linux.tar.gz') - cmd1 = 'cmake "' + pathBuildExpressionGraph + '" -DTARGET_NAME:STRING="' + filename + '" -DSDK_DIR:PATH="' + OpenSimADOS_DIR + '" -DCPP_DIR:PATH="' + CPP_DIR + '" -DCMAKE_INSTALL_PREFIX= "' + OpenSimADOS_DIR + '"' + cmd1 = 'cmake "' + pathBuildExpressionGraph + '" -DTARGET_NAME:STRING="' + filename + '" -DSDK_DIR:PATH="' + OpenSimADOS_DIR + '" -DCPP_DIR:PATH="' + CPP_DIR + '"' cmd2 = "make" BIN_DIR = pathBuild From abc47aad5ea5e70e29e70e987ec150ccba13720c Mon Sep 17 00:00:00 2001 From: Antoine Falisse Date: Thu, 15 Dec 2022 14:57:54 -0800 Subject: [PATCH 3/5] adapt readme --- README.md | 14 ++++++-------- .../OpenSimAD/utilsOpenSimAD.py | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6c076a06..c0a49203 100644 --- a/README.md +++ b/README.md @@ -27,17 +27,17 @@ Archived code base corresponding to publication: https://zenodo.org/record/74199 - Clone the repository: `git clone https://github.com/stanfordnmbl/opencap-processing.git` - Navigate to the directory: `cd opencap-processing` 7. Install required packages: `python -m pip install -r requirements.txt` - +8. Run `python createAuthenticationEnvFile.py` + - An environment variable (`.env` file) will be saved after authenticating. ### Muscle-driven simulations -1. Install [CMake](https://cmake.org/download/) - - **Windows only**: Add CMake to system path. During the installation, select *Add CMake to the system PATH for all users* -2. **Windows only**: Install [Visual Studio](https://visualstudio.microsoft.com/downloads/) +1. **Windows only**: Install [Visual Studio](https://visualstudio.microsoft.com/downloads/) - The Community variant is sufficient and is free for everyone. - During the installation, select the *workload Desktop Development with C++*. - The code was tested with the 2017, 2019, and 2022 Community editions. -3. Run `createAuthenticationEnvFile.py` - - An environment variable (`.env` file) will be saved after authenticating. +3. **Linux only**: Install OpenBLAS libraries. + - `sudo apt-get install libopenblas-base` + ## Examples - Run `example.py` for examples of how to run kinematic analyses @@ -53,6 +53,4 @@ Archived code base corresponding to publication: https://zenodo.org/record/74199 ### Locally - Follow the install requirements above -- (Optional): Run `createAuthenticationEnvFile.py` - - An environment variable (`.env` file) will be saved after authenticating. You can proceed without this, but you will be required to login every time you run a script. - Open `batchDownload.py` and follow the instructions diff --git a/UtilsDynamicSimulations/OpenSimAD/utilsOpenSimAD.py b/UtilsDynamicSimulations/OpenSimAD/utilsOpenSimAD.py index 4e23eba7..55af9efc 100644 --- a/UtilsDynamicSimulations/OpenSimAD/utilsOpenSimAD.py +++ b/UtilsDynamicSimulations/OpenSimAD/utilsOpenSimAD.py @@ -1606,7 +1606,7 @@ def buildExternalFunction(filename, pathDCAD, CPP_DIR, nInputs, cmd_tar = 'tar -xf macOS.tgz -C "{}"'.format(OpenSimAD_DIR) os.system(cmd_tar) os.remove('macOS.tgz') - cmd1 = 'cmake "' + pathBuildExpressionGraph + '" -DTARGET_NAME:STRING="' + filename + '" -DSDK_DIR:PATH="' + OpenSimADOS_DIR + '" -DCPP_DIR:PATH="' + CPP_DIR + '" -DCMAKE_INSTALL_PREFIX= "' + OpenSimADOS_DIR + '"' + cmd1 = 'cmake "' + pathBuildExpressionGraph + '" -DTARGET_NAME:STRING="' + filename + '" -DSDK_DIR:PATH="' + OpenSimADOS_DIR + '" -DCPP_DIR:PATH="' + CPP_DIR + '"' cmd2 = "make" BIN_DIR = pathBuild From 544884582f7cf5109edd016bf751e6495b89971b Mon Sep 17 00:00:00 2001 From: Antoine Falisse Date: Thu, 15 Dec 2022 16:08:05 -0800 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c0a49203..3d1426f3 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Archived code base corresponding to publication: https://zenodo.org/record/74199 - The Community variant is sufficient and is free for everyone. - During the installation, select the *workload Desktop Development with C++*. - The code was tested with the 2017, 2019, and 2022 Community editions. -3. **Linux only**: Install OpenBLAS libraries. +3. **Linux only**: Install OpenBLAS libraries - `sudo apt-get install libopenblas-base` From e963e624422b338bc731ef70bf6c470e0914dc7d Mon Sep 17 00:00:00 2001 From: Antoine Falisse Date: Thu, 15 Dec 2022 21:31:41 -0800 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d1426f3..c770f645 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Archived code base corresponding to publication: https://zenodo.org/record/74199 - The Community variant is sufficient and is free for everyone. - During the installation, select the *workload Desktop Development with C++*. - The code was tested with the 2017, 2019, and 2022 Community editions. -3. **Linux only**: Install OpenBLAS libraries +2. **Linux only**: Install OpenBLAS libraries - `sudo apt-get install libopenblas-base`