Trunk tutorials:How to get translational motion in a cable-driven finite element model? #281
Unanswered
TurboS2002
asked this question in
Help - Programming with SoftRobots
Replies: 2 comments 5 replies
|
Hello @TurboS2002, Sorry for the late answer. To help you code the keyboard control, you can have a look at the Tripod tutorial. There's this controller that may help you. If you also have troubles with the trunk's translation motion, I can think of two approaches:
def fixExtremity(self):
self.node.addObject('BoxROI', name='boxROI', box=[[-20, -20, 0], [20, 20, 20]], drawBoxes=False)
self.node.addObject('PartialFixedProjectiveConstraint', fixedDirections=[1, 1, 1], indices='@boxROI.indices')And then translate the rest positions from your controller. For example: with TRUNK_NODE.getMechanicalState().rest_position.writeable() as rest_position:
for position in rest_position:
position[TRANSLATION_DIRECTION] += step
|
3 replies
|
@EulalieCoevoet Hi Eulalie, can I also ask if we only change fixedDirections=[1, 1, 1] to fixedDirections=[0, 1, 1] in self.node.addObject('PartialFixedConstraint', fixedDirections=[1, 1, 1], indices='@boxROI.indices') to achieve the translation in the base? Thanks |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm creating a finite element simulation in sofa similar to Trunk tutorials and I was wondering how to create controllers for the keyboard to control its translational motion?
All reactions