opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
795 stars 318 forks source link

Add test case for model conversion #206

Open aymanhab opened 10 years ago

aymanhab commented 10 years ago

To make sure old models deserialize and display correctly, need a textual rep of Display and a suite of old models using old format.

jenhicks commented 9 years ago

@aymanhab Is this still an open issue (per your OpenSim 4.0 presentation)?

jenhicks commented 9 years ago

Additional comment from @aseth1 Most components are verified by virtue of older model files being used by other test cases. But in many test cases (esp. Joints, Constraints and Forces) models are built programmatically (without loading a model from file) and the serialization loop is tested only in the latest version.

In order to ensure that the content of older models is preserved they must be verified to contain the same content in the latest version of the model.

aymanhab commented 8 years ago

I tried to open the simple model bouncing_block from release 3.3 and it failed to open with PointToPointSpring::connect() failed to connect ....

aseth1 commented 8 years ago

@aymanhab In which build did you try to open the model? Is that model in the repository. Is there a test case for it? What was the complete error message? That will help track it down. Thanks!

aymanhab commented 8 years ago

@aseth1 This is occuring in my build of the GUI based off master before your last commit, so it may have been fixed. The model is from earlier distribution (3.3) and the error message is attached. captureerrormsg

aseth1 commented 8 years ago

Great. It's helpful to know that the component could not be found. It may be addressed by recent changes but it could also be due to a bug in the update from XML. Can you point me to the model file. Thanks.

aymanhab commented 8 years ago

Sure, OpenSim3.3\Models\BouncingBlock\bouncing_block.osim Since we split the repositories, the model file doesn't live in the opensim-core repo.

aseth1 commented 8 years ago

PointToPointSpring does not override updateFromXMLNode(). We should not spot fix this. Instead we should write a test to find all the Components that should be updated and we know it should find this one.

tkuchida commented 7 years ago

From #1407:

Related to #206 (marked "Next Release"). We should have a folder of model files in all formats to rigorously exercise the updateFromXMLNode() methods in a dedicated test case…

chrisdembia commented 7 years ago

PointToPointSpring does not override updateFromXMLNode(). We should not spot fix this. Instead we should write a test to find all the Components that should be updated and we know it should find this one.

Do you have an idea for how to write such a test? We at least need to add updateFromXMLNode() for PointToPointSpring before the release.

chrisdembia commented 7 years ago

Perhaps we just need to just search the repo for each usage of the OpenSim_DECLARE_SOCKET macro.

tkuchida commented 7 years ago

From #1903: Move models, setup files, etc. to ${OPENSIM_SHARED_TEST_FILES_DIR} to avoid duplication of these files in the repo. Might need to add suffix to filename or make a subdirectory for each model version since there are several models with the same filename but different versions. It's valuable to maintain several versions of the same model to test the updateFromXMLNode() infrastructure.