opensim-core icon indicating copy to clipboard operation
opensim-core copied to clipboard

[WIP]: Do Not Merge: Quick and dirty way to get and return GravityForce from model

Open aymanhab opened this issue 1 year ago • 12 comments

Fixes issue #<issue_number>

Brief summary of changes

Testing I've completed

Looking for feedback on...

CHANGELOG.md (choose one)

  • no need to update because...
  • updated.

This change is Reviewable

aymanhab avatar Mar 01 '23 21:03 aymanhab

Here is a personal comment about this PR. I think this is exactly what I need but I can't manage to test it, trying to compil this change fails. Where I am now:

  • simbody 3.7 compiles fine with VisualStudio 2017. Why 2017 ? Because compiling with 2019 fails (as is https://github.com/simbody/simbody/issues/717)
  • spdlog (needed by opensim) compiles fine with VS2017 too
  • opensim partially compiles vith VS2017 VS2017-opensim-compilation.log When I run the opensim-core-build\Bindings\Python\Release\setup_win_python38.py locs seem correct, but at the execution step I get errors: "FileNotFoundError: [WinError 3] The specified path cannot be found: 'c:/OpenSim 4.4/bin". I really feel despaired because I'v spent much time with various version of VisualStudio, etc. Compiling python bindings only seems to be a mess...

jsn54 avatar Mar 20 '23 10:03 jsn54

Would someone please help me compile Opensim's Python bindings ? Unfortunately, #PR3414 was closed yesterday, this was an alternative way to solve the problem described in https://simtk.org/plugins/phpBB/viewtopic.php?f=91&t=15254&sid=e4de93b208ba09734d13954a9cb03480... Retrieving gravity forces through Opensim's python bindings is an essential part of my current work, but I was not able to correctly compile a swig-python module or recompile python binding because Windows compilation process is really a mess. Yet all the necessary code seems to be available... Thanks in advance !

jsn-inrs avatar May 10 '23 13:05 jsn-inrs

The PR has been updated without the need for a separate plugin, please follow the notes and check the diffs on the PR

aymanhab avatar May 11 '23 20:05 aymanhab

I tried to test this PR, but I lack skills and practice in CMake/Visual Studio to build an runable version of this PR. The attached zip file includes :

  • the "Build_and_Test_Method.txt" file explaining how I tried to build the code
  • attached files described in the former file. The compilation fails. Would someone "take me by the hand" as a total newbie to help me retrieve gravity data ? Thanks in advance ! MAJ-osim45-fromScratch.zip Actually I think I lack skills in git as well, as I've never attended a training course. I've just discovered how I should use PR (from https://www.atlassian.com/fr/git/tutorials/comparing-workflows/feature-branch-workflow) and I may not have checkout/fetch/pull the right branch. Help would be greatly appreciated... Sorry for the inconveniencing :-/

jsn-inrs avatar Jun 05 '23 13:06 jsn-inrs

Hello,

I took a look at your log files and the build problem with spdlog is due to using an early version of visualStudio that fails to compile the most recent version of this library. Can you upgrade to VisualStudio 2022 and retry.

Please let me know if you have any questions, -Ayman

On Mon, Jun 5, 2023 at 6:23 AM jsn-inrs @.***> wrote:

I tried to test this PR, but I lack skills and practice in CMake/Visual Studio to build an runable version of this PR. The attached zip file includes :

— Reply to this email directly, view it on GitHub https://github.com/opensim-org/opensim-core/pull/3416#issuecomment-1576798958, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6JY4BFA6BSWV6MHATZ2RTXJXMVJANCNFSM6AAAAAAVMTCXXM . You are receiving this because you authored the thread.Message ID: @.***>

aymanhab avatar Jun 06 '23 21:06 aymanhab

Thank you very much for the attention given to this PR. Please attached find a zip archive with logs about today's build trials. spdlog compiles and installs fine with VS2019 and VS2022. However, I can't compile simbody37 with those framework, and opensim's documentation states that the same compiler should be used for all elements of the process (spdlog, simbody37 and opensim) (?) so I feel quite desoriented... 20230607.zip

jsn-inrs avatar Jun 07 '23 13:06 jsn-inrs

Hello, sorry I couldn't understand the error (excuse my bad french) but the integrated build ci runs regularly with vs2022 without an issue e.g. https://pipelines.actions.githubusercontent.com/serviceHosts/5b528c53-c39b-437a-bbf8-bd04c2465622/_apis/pipelines/1/runs/76/signedlogcontent/2?urlExpires=2023-06-14T18%3A18%3A18.2466870Z&urlSigningMethod=HMACV1&urlSignature=n%2BnPEPOnbGXC%2BU6zO9HjCD23%2F9r7ujCMKMWDI4HX%2FtM%3D Maybe you can download the artifact from here https://github.com/opensim-org/opensim-core/actions/runs/4951492079?pr=3416#artifacts rather than build from scratch?

aymanhab avatar Jun 14 '23 18:06 aymanhab

Yes !! You did it ! Don't apologize for your bad french, it's only about Visual Studio mysteries... Well, I've downloaded this artifact (I didn't even know such thing existed) and installed it very easily. Thanks A LOT for your help and availability. Unfortunately, I don't understand what was wrong in building OpenSim on my own (M$ mysteries or my own lack of skills, surely both). Will this PR be included in future releases ? I hope so. I also hope the paper I submitted recently will be accepted, so that you may finally understand why I've been bothering you for so long. I'll keep you in touch. Once again, thanks a lot !

jsn-inrs avatar Jun 15 '23 15:06 jsn-inrs

@aymanhab, can we close this?

nickbianco avatar Sep 25 '23 17:09 nickbianco

This method and a couple other methods required by other users need to be added to Model then we can close this.

aymanhab avatar Nov 14 '23 18:11 aymanhab

Fixed by PR #3618

aymanhab avatar Nov 21 '23 22:11 aymanhab

@jsn-inrs the change was incoroprated into OpenSim::Model and will be included in the next release, you can check the artifacts to adjust accordingly. Thanks for your patience

aymanhab avatar Nov 22 '23 17:11 aymanhab