Access Visualizer Option
Posted: Mon May 13, 2024 3:36 am
Hi,
I want to play with the vizualizer option in my code, do you know if there is a way to access command like change Background,etc... in Python.
I want to play with the vizualizer option in my code, do you know if there is a way to access command like change Background,etc... in Python.
Code: Select all
import opensim as osim
# Files Paths
model_path = "gait10dof18musc_P1__cycling_torque_driven_model.osim"
motion_file = "gait10dof18musc_P1__cycling_muscle_driven_model_2024-05-13_11-08-22.sto"
# Model importation
model = osim.Model(model_path)
newModel = model.clone()
newModel.set_ForceSet(osim.ForceSet())
# Motion Importatopn
table = osim.TimeSeriesTable(motion_file)
# Visualization
viz = osim.VisualizerUtilities()
viz.showMotion(newModel, table)