Search found 12 matches
- Thu Mar 05, 2020 1:13 pm
- Forum: OpenSim
- Topic: flushing and loading models to/from file
- Replies: 5
- Views: 408
Re: flushing and loading models to/from file
One final question about this example. The python code of this example uses an object called Manager to run a simulation of the arm movement. This same object exists in cpp. However, the github page for this same example coded in cpp uses a bultin function called simulate(). What is the difference b...
- Thu Mar 05, 2020 8:24 am
- Forum: OpenSim
- Topic: flushing and loading models to/from file
- Replies: 5
- Views: 408
Re: flushing and loading models to/from file
Ok. I guess that if you want to work with different initial/default states, you'll need to replicate the model saving them with different filenames, each one with its own defaults reset. In my first message code, it seems preferred to use updCoordinate() method rather than getCoordinate() to change ...
- Wed Mar 04, 2020 2:23 pm
- Forum: OpenSim
- Topic: flushing and loading models to/from file
- Replies: 5
- Views: 408
flushing and loading models to/from file
I was playing with one of the example files (this one: ${OPENSIM_HOME}/share/doc/OpenSim/Code/Python/build_simple_arm_model.py) when I realized that I could save it as an XML file to later load this simple model. This is interesting because one can save some coding to build the model. However, the e...
- Wed Feb 19, 2020 7:41 am
- Forum: OpenSim
- Topic: python 3.8
- Replies: 3
- Views: 283
Re: python 3.8
Ok, so here is the deal from the tests I have made... OpenSim4.0 + python2.7 seems ok OpenSim4.1 + python3.7 seems ok OpenSim4.1 + python3.8 fails while loading _simbody.pyd This was tested with two different windows 10 machines. Note that if %OPENSIM_HOME%\bin is not in %PATH% the combo OpenSim4.1 ...
- Mon Feb 17, 2020 11:21 am
- Forum: OpenSim
- Topic: python 3.8
- Replies: 3
- Views: 283
python 3.8
I was testing OpenSim 4.1 installation and python scripting using this URL: https://simtk-confluence.stanford.edu/display/OpenSim/Scripting+in+Python For some unknown reason, my python installation cannot load some dll although my PATH and PYTHONPATH has the above configuration. This machine is a Wi...
- Mon Jan 13, 2020 12:40 pm
- Forum: OpenSim
- Topic: reading real time rotations
- Replies: 13
- Views: 601
Re: reading real time rotations
Well, I might need to change more than one coordinate. From your words, using the Visualizer API seems the correct way of doing it. I also believe that if I code in cpp it will run faster than in python. However, my cpp code segfaults while the equivalent python code runs fine. I can't see a reason ...
- Mon Jan 13, 2020 5:02 am
- Forum: OpenSim
- Topic: reading real time rotations
- Replies: 13
- Views: 601
Re: reading real time rotations
I was trying to translate the above code from python to cpp, but it segfaults while calling the getValue function below. I don't get why. What is wrong in here? SimTK::State wstate = model.getWorkingState(); OpenSim::CoordinateSet cdset = model.getCoordinateSet(); for (unsigned int i=0; i < cdset.ge...
- Fri Jan 10, 2020 5:48 pm
- Forum: OpenSim
- Topic: reading real time rotations
- Replies: 13
- Views: 601
Re: reading real time rotations
Well, good to know that I have successfully changed values. However, what I really want for now is visualizing these changes in the UI. But it seems that this is not the correct way of doing it. Is there a way - through scripting or maybe other options - to make changes in joint rotations appear in ...
- Thu Jan 09, 2020 12:03 pm
- Forum: OpenSim
- Topic: reading real time rotations
- Replies: 13
- Views: 601
Re: reading real time rotations
Ok, so here is what I did. The code below executed in the scripting shell window is able to read and dump the rotational coordinates of a loaded model. I used the Arm26 model. model = getCurrentModel() state_ref = getStateRef(model) cd_set = model.getCoordinateSet() for i in range(cd_set.getSize()):...
- Fri Jan 03, 2020 11:14 am
- Forum: OpenSim
- Topic: reading real time rotations
- Replies: 13
- Views: 601
Re: reading real time rotations
After studying rtosim, opensim and simtk for a while, I have found that, for now, I don't need to use rtosim and that there are other ways to do what I want to. It seems that it is possible to update joint rotation values for a previoulsy opened model in opensim using a python script. This would be ...