python API : -add a marker to a model
Posted: Fri May 27, 2016 9:00 am
Hi
I have a memory issue when i want to append markers to my model.
if my model already get marker, i can use the updMarkerSet() method. then, that works fine
In my case, the model group Makerset is empty.
i add marker with this snippet
the last line works fines when I run the code once.
if i run again it. I got a memory issue. my python process stop working
what is the best way to add a marker with the python API ?
I have a memory issue when i want to append markers to my model.
if my model already get marker, i can use the updMarkerSet() method. then, that works fine
In my case, the model group Makerset is empty.
i add marker with this snippet
Code: Select all
m = opensim.Marker()
m.setOffset(opensim.Vec3(localPos[0]/toMeter,localPos[1]/toMeter,localPos[2]/toMeter))
m.setName(label)
m.setBodyName(osimBodyName)
m.setFixed(False)
m_model.getMarkerSet().set(0,m)
if i run again it. I got a memory issue. my python process stop working
what is the best way to add a marker with the python API ?