Hi everyone.
I have been working on transtibial amputee gait using MOCO and Matlab. I modified 2D walking example model removing ankle joint and adding prosthesis model. I ran my matlab script, it worked well, but when I want to visualize given results, I can't see prosthesis mesh geometry despite these can visualize in Opensim windows application.
Someone knows why it don't show geometries? I have tried changing geometry file format but it still doesn't work .
Thank you for your attention
Visualizer can't show mesh geometry
- Nicholas Bianco
- Posts: 1050
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Visualizer can't show mesh geometry
Hi David,
Where are you keeping the prosthesis geometry? The visualize() function in Moco uses the Simbody visualizer, which doesn't use the same Geometry path as the GUI. Try adding the geometry to the MATLAB working directory where you are running your simulations.
-Nick
Where are you keeping the prosthesis geometry? The visualize() function in Moco uses the Simbody visualizer, which doesn't use the same Geometry path as the GUI. Try adding the geometry to the MATLAB working directory where you are running your simulations.
-Nick
- David Torres
- Posts: 17
- Joined: Wed Feb 11, 2015 6:38 am
Re: Visualizer can't show mesh geometry
Hi Nicholas.
Thank you for you answer.
The mesh geometries are located in working directory, more specifically in a folder named geometry, just like 2D walking example. What else can it be?
David
Thank you for you answer.
The mesh geometries are located in working directory, more specifically in a folder named geometry, just like 2D walking example. What else can it be?
David
- Nicholas Bianco
- Posts: 1050
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Visualizer can't show mesh geometry
What is the format of these files? For example, I don't think the Simbody visualizer supports .stl files.
- David Torres
- Posts: 17
- Joined: Wed Feb 11, 2015 6:38 am
Re: Visualizer can't show mesh geometry
Hi Nicholas.
The format of these files is .stl. I had changed the format to .vtp or .obj but it didn't work. In the last days I find out that unlocking prosthetic ankle joint, the simbody visualizer was able to show prosthesis mesh geometries. Then, I modified osim model adding Coordinate limit force instead of locking prosthetic joints. I don't know the right reason but it worked. In adittion, I dont know if the model stament is correct too.
David
The format of these files is .stl. I had changed the format to .vtp or .obj but it didn't work. In the last days I find out that unlocking prosthetic ankle joint, the simbody visualizer was able to show prosthesis mesh geometries. Then, I modified osim model adding Coordinate limit force instead of locking prosthetic joints. I don't know the right reason but it worked. In adittion, I dont know if the model stament is correct too.
David
- Nicholas Bianco
- Posts: 1050
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Visualizer can't show mesh geometry
Hi David,
Glad you got it to work! I think locked joints can create issues with the visualizer if the model can't meet the constraint (since locked joint are enforced as a constraint in the multibody system).
-Nick
Glad you got it to work! I think locked joints can create issues with the visualizer if the model can't meet the constraint (since locked joint are enforced as a constraint in the multibody system).
-Nick
- David Torres
- Posts: 17
- Joined: Wed Feb 11, 2015 6:38 am
Re: Visualizer can't show mesh geometry
Hi,
Thanks Nicholas!Glad you got it to work!
Is there any way to replace locked joints by model constraints?I think locked joints can create issues with the visualizer if the model can't meet the constraint (since locked joint are enforced as a constraint in the multibody system)
- Nicholas Bianco
- Posts: 1050
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Visualizer can't show mesh geometry
It's better to just replace a joint with a locked coordinate with a weld joint. You can do this with the ModelOperator ModOpReplaceJointsWithWelds.
-Nick
-Nick