Search found 6 matches

by Zuren Arrh
Tue Oct 16, 2018 3:38 am
Forum: OpenSim
Topic: Problem with the position of the model
Replies: 5
Views: 497

Re: Problem with the position of the model

Here's a MATLAB version; Python should be analogous. % OpenSim 3.3 import org.opensim.modeling.*; model = Model('gait2354_simbody.osim'); model.setUseVisualizer(true); state = model.initSystem(); model.updCoordinateSet().get('pelvis_ty').setValue(state, 0.95); model.getVisualizer().show(state); The...
by Zuren Arrh
Tue Oct 16, 2018 3:35 am
Forum: OpenSim
Topic: Problem about importing opensim in Pycharm
Replies: 2
Views: 643

Re: Problem about importing opensim in Pycharm

Hi, I think I have encountered a similar error. The problem may be due to installing these dependencies using administrative rights. A quick fix that may work for you is to try to add the folder which contains the DLLs (e.g. somewhere in E:\Anaconda3\envs\opensim-rl\lib\site-packages\opensim) to th...
by Zuren Arrh
Sun Oct 14, 2018 7:15 am
Forum: OpenSim
Topic: Problem about importing opensim in Pycharm
Replies: 2
Views: 643

Problem about importing opensim in Pycharm

Hi all, Rencently I'm trying to learn to use OpenSim through Python, and choose the NIPS2018 competition 'AI for Prosthetics' to start. I follow the official instructions to install some packages as follow: conda create -n opensim-rl -c kidzik opensim python=3.6.1 source activate opensim-rl conda in...
by Zuren Arrh
Sun Oct 14, 2018 6:46 am
Forum: OpenSim
Topic: Problem with the position of the model
Replies: 5
Views: 497

Re: Problem with the position of the model

You can change the position of the pelvis body: model.updCoordinateSet().get(coordinate_name).setValue(state, value) Sorry to bother again, I try to fix it myself through the official document, but the API part are all c++, and there's no detailed explanation about 'updCoordinateSet()'. I'm not sur...
by Zuren Arrh
Sun Oct 14, 2018 6:43 am
Forum: OpenSim
Topic: Problem with the position of the model
Replies: 5
Views: 497

Re: Problem with the position of the model

Sorry to bother again, I try to fix it myself through the official document, but the API part are all c++, and there's no detailed explanation about 'updCoordinateSet()'. I'm not sure what the variables 'coordinate_name' and 'value' mean in the code and how to get their values before adding them int...
by Zuren Arrh
Sat Oct 13, 2018 5:38 am
Forum: OpenSim
Topic: Problem with the position of the model
Replies: 5
Views: 497

Problem with the position of the model

Hi all, I'm a beginner with OpenSim, and recently I'm trying to import model file and visualize it through Python. According to the official document, I wrote some code to import the standard model file 'gait2345_simbody.osim' as follow: import opensim folderName = 'E:/OpenSim 3.3/Models/Gait2354_Si...