Hey people!
I would have a quick question. I manage to retrieve the jointSet of the model through model.getJointSet().
Then I manage to find different joints, for example the shoulder-arm joint through: jointset.get(x) (x is the index of the joint). This returns me a Joint type object.
I would like to ask how could I modify this joints coordinates? For example it has an 'arm_add_r' coordinate which moves the arm upside. And then display this result on the screen?
At the moment I am displaying the result through:
model.getVisualizer().show(model.state)
manager.integrate(10)
P.S: Also during this manager.integrate my model is falling downwards, exiting the screen. Why is it happening?
THANK YOU!
Python Joint Control
- Csongor Barabasi
- Posts: 6
- Joined: Thu Oct 18, 2018 12:17 am
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Python Joint Control
A quick question, is no guarantee of a quick answer, nor short.I would have a quick question.
I would like to ask how could I modify this joints coordinates? And then display this result on the screen?
Code: Select all
model.setUseVisualizer(True)
state = model.initSystem()
model.updCoordinateSet().get('arm_add_r').setValue(state, new_value)
model.getVisualizer().show(state)
When you call manager.integrate(10) you are running a forward dynamics simulation from t0 =0s to tf=10s. As gravity is acting on the model the model falls downwards. If you are interested only in visualizing the model you can update the coordinates, realize to position stage and then call the show method.P.S: Also during this manager.integrate my model is falling downwards, exiting the screen. Why is it happening?