-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question using osim_to_biomod #615
Comments
@aceglia could have a deeper look into it. As a first guess, I would try to execute a code with bioviz to check the result from the converter: """
This file is to display the human model into bioviz
"""
import bioviz
export_model = False
background_color = (1, 1, 1) if export_model else (0.5, 0.5, 0.5)
show_gravity_vector = False if export_model else True
show_floor = False if export_model else True
show_local_ref_frame = False if export_model else True
show_global_ref_frame = False if export_model else True
show_markers = False if export_model else True
show_mass_center = False if export_model else True
show_global_center_of_mass = False if export_model else True
show_segments_center_of_mass = False if export_model else True
model_name = "YOUR_MODEL.bioMod"
biorbd_viz = bioviz.Viz(
model_name,
show_gravity_vector=show_gravity_vector,
show_floor=show_floor,
show_local_ref_frame=show_local_ref_frame,
show_global_ref_frame=show_global_ref_frame,
show_markers=show_markers,
show_mass_center=show_mass_center,
show_global_center_of_mass=show_global_center_of_mass,
show_segments_center_of_mass=show_segments_center_of_mass,
mesh_opacity=1,
background_color=background_color,
)
biorbd_viz.set_camera_position(-0.5, 3.5922578781963685, 0.1)
biorbd_viz.resize(1000, 1000)
if export_model:
biorbd_viz.snapshot("doc/model.png")
biorbd_viz.exec() |
Sorry for that! I guess you are right and it should be an issue in https://github.com/pyomeca/osim_to_biomod |
Dear @tiagocoelhoma ranges
-1.5707963300000001 1.5707963300000001
None
None which is indeed an invalid value. If you don't need the ranges, I suggest you simply remove them :) |
Dear @tiagocoelhoma, |
Dear @aceglia ! Thank you for your reply. I updated the file and tested it. Just to give a feedback on the script, besides "none" values are not shown anymore, I had to comment the "ranges" that had no values inserted on the generated file. For example, if the generated file has:
in order to run, I had to comment "ranges". For my particular case, I'm not sure, however, if these specifics values (as the example above) should have been commented in my application. I'm reviewing if there is any utility on these values. Another thing I should point out is that since the pin joint wasn't implemented (see error below) I had to try weld and custom joints to complete the conversion. As a result, some translation information between segments associated with this joint (eg, knee) is missed and the segments are superimposed.
The original osim file is attatched below if you want to run it (.txt so i could upload it here) Thank you for your attention. |
Just a quick reply for the ranges. As far as the computation are concerned, ranges are completely ignored. It is mostly used by bioviz (the vizualiser) to limit the slider to useful ranges. I let @aceglia answers the rest! |
I've added a commit to the PR to fix the last problem with uncommented ranges in biomod. |
Closing since it relates to osim_to_biomod |
Hi there!
Im having some problems using the converteed file from the osim_to_biomod tool. I will attach one file as example (from model leg39.osim). Please find the resulting (converted) file below:
legexample.txt (edit: txt format so I could upload it here)
I tried to use this file with a simple example to plot the results (for instace, custom_plotting.py) but I got the following error:
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
Ps: all ".vtp" files are installed within the project path
I dont know if it is a silly question (sorry for that). I will try to work on this but maybe you could give some insight.
Thank you for you attention!
The text was updated successfully, but these errors were encountered: