Page 2 of 2

Re: Model conversion from OpenSim4 to Hyfydy

Posted: Fri Sep 03, 2021 5:20 am
by tgeijten
There's a new SCONE release (2.0.0 BETA 9), which has support for closed kinematic chains in .hfd files -- get it from https://hyfydy.com/downloads. I will send you a separate mail with an example.

Re: Model conversion from OpenSim4 to Hyfydy

Posted: Sat Sep 04, 2021 9:21 am
by mn13rt
For future references, if anyone is searching how to make closed kinematic chains this is the structure for the joint that closes the loop. The key point being the second joint is in line with the body.

Code: Select all

body {
	name = obj6
	density = 1000
	geometry {
		type = box
		dim = [ 0.04 0.5 0.04 ]
	}
	joint {
		name = j6
		parent = obj5
		stiffness = $stiffness
		damping = $damping
		pos_in_parent { x = 0 y = -0.25 z = 0 }
		pos_in_child { x = 0 y = 0.25 z = 0 }
		ref_ori [ 0 0 60 ]
		limits [ -45..45 -45..45 -45..45 ]
		limit_stiffness = $limit_stiffness
		limit_damping = 0
	}
}
joint {
	name = j7
	parent = obj1
	child = obj6
	stiffness = $stiffness
	damping = $damping
	pos_in_parent { x = 0 y = 0.25 z = 0 }
	pos_in_child { x = 0 y = -0.25 z = 0 }
	#ref_ori [ 0 0 300 ]
	limits [ -45..45 -45..45 -45..45 ]
	limit_stiffness = $limit_stiffness
}

Re: Model conversion from OpenSim4 to Hyfydy

Posted: Sat Sep 04, 2021 9:40 am
by mn13rt
Cheers for the help so far Thomas. The model is almost up and running, my next question relates to the joint system.

The issue I am having is although when I import the model the parts are in the correct position
Screenshot 2021-09-04 172815.png
Screenshot 2021-09-04 172815.png (57.99 KiB) Viewed 261 times
when I hit evaluate some of the parts move out of position.
Screenshot 2021-09-04 172905.png
Screenshot 2021-09-04 172905.png (55.07 KiB) Viewed 261 times
There is usually a slight shift in position during the initialisation but these parts are moving out of position. I tried playing with the joint stiffness but it didn't really change anything.

Any ideas why this might be happening?

and is there a way to create a weld joint like in the OpenSim format?