Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure exo tests can run in parallel #712

Merged
merged 1 commit into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions Application/MocapExamples/BVH_BoxLift/Model/box.any
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,21 @@ Main.ModelSetup.MocapExtraDrivers.ExtraDrivers ={
};
};

// We need to manually ensure these exists here because this code is included
// before the MoCap framework ensure that they are created.
Comment on lines +229 to +230
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could make sense to add a description over here about what this code does for the user: that is they can save box outputs with specific prefixes.

#ifndef MOCAP_TEST_FILENAME_PREFIX
#define MOCAP_TEST_FILENAME_PREFIX ""
melund marked this conversation as resolved.
Show resolved Hide resolved
#endif
#ifndef MOCAP_OUTPUT_FILENAME_PREFIX
#define MOCAP_OUTPUT_FILENAME_PREFIX ""
#endif


// We save the box kinematic information so we can use it to drive the box in the inverse study
Main.Studies.MarkerTracking.JointAngleOutputs ={
AnyOutputFile BoxPos = {
FileName = ANYBODY_PATH_OUTPUT + "/" + Main.ModelSetup.TrialSpecificData.TrialFileName + "_BoxPos.txt";
FileName = ANYBODY_PATH_OUTPUT + "/" + MOCAP_TEST_FILENAME_PREFIX + MOCAP_OUTPUT_FILENAME_PREFIX
+ Main.ModelSetup.TrialSpecificData.TrialFileName + "_BoxPos.txt";
SepSign = ",";
SepSpaceAutoOnOff = Off;
Header.TitleSectionOnOff = Off;
Expand All @@ -245,7 +256,8 @@ Main.Studies.MarkerTracking.JointAngleOutputs ={
Main.Studies.InverseDynamicStudy.ModelEnvironmentConnection.JointsAndDrivers ={
AnyKinDriver BoxDriver = {
#include "<ANYBODY_PATH_AMMR>/Tools/AnyMocap/InterpolateJointAngleData.any"
FileReader.FileName = ANYBODY_PATH_OUTPUT + "/" + Main.ModelSetup.TrialSpecificData.TrialFileName + "_BoxPos.txt";
FileReader.FileName = ANYBODY_PATH_OUTPUT + "/" + MOCAP_TEST_FILENAME_PREFIX + MOCAP_OUTPUT_FILENAME_PREFIX
+ Main.ModelSetup.TrialSpecificData.TrialFileName + "_BoxPos.txt";
/// The default data if no data has been generated.
FileReader.Data0 = repmat(6, FileReader.Length0, {0});
AnyKinMeasure& PosLin = Main.EnvironmentModel.Lin_Box;
Expand Down
10 changes: 6 additions & 4 deletions Tests/Applications/test_ExoConceptTrunk_BoxLift.any
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

#include "../libdef.any"

#path MOCAP_PATH_MAINFILEDIR "../../Application/Examples/ExoskeletonTrunk/"
#path MOCAP_PATH_MAINFILE "<MOCAP_PATH_MAINFILEDIR>/ExoConceptTrunk_BoxLift.main.any"


#ifdef TEST_NAME
#define MOCAP_TEST_FILENAME_PREFIX TEST_NAME + "_"
#else
Expand All @@ -15,6 +11,12 @@
#endif


#path MOCAP_PATH_MAINFILEDIR "../../Application/Examples/ExoskeletonTrunk/"
#path MOCAP_PATH_MAINFILE "<MOCAP_PATH_MAINFILEDIR>/ExoConceptTrunk_BoxLift.main.any"




#ifdef CREATE_IMAGE
#undef MOCAP_TEST_FILENAME_PREFIX
#path TEMP_PATH "<MOCAP_PATH_MAINFILEDIR>/Output"
Expand Down
12 changes: 7 additions & 5 deletions Tests/Applications/test_ExoConcept_BoxLift.any
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@

#include "../libdef.any"

#path MOCAP_PATH_MAINFILEDIR "../../Application/Examples/ExoskeletonConcept/"
#path MOCAP_PATH_MAINFILE "<MOCAP_PATH_MAINFILEDIR>/ExoConcept_BoxLift.Main.any"


#ifdef TEST_NAME
#define MOCAP_TEST_FILENAME_PREFIX TEST_NAME + "_"
#else
#define MOCAP_TEST_FILENAME_PREFIX "GUI1_"
#define CREATE_IMAGE
//#define CREATE_IMAGE
#endif
melund marked this conversation as resolved.
Show resolved Hide resolved


#path MOCAP_PATH_MAINFILEDIR "../../Application/Examples/ExoskeletonConcept/"
#path MOCAP_PATH_MAINFILE "<MOCAP_PATH_MAINFILEDIR>/ExoConcept_BoxLift.Main.any"




#ifdef CREATE_IMAGE
#undef MOCAP_TEST_FILENAME_PREFIX
#path TEMP_PATH "<MOCAP_PATH_MAINFILEDIR>/Output"
Expand Down