Model conversion from OpenSim4 to Hyfydy

SCONE is a software tool for predictive simulations of biomechanical movement. It uses OpenSim for modeling and simulation, and performs optimization using various control strategies, including feed-forward control, proprioceptic feedback control, and bal
User avatar
Thomas Geijtenbeek
Posts: 461
Joined: Wed Mar 12, 2014 8:08 am

Re: Model conversion from OpenSim4 to Hyfydy

Post by Thomas Geijtenbeek » Fri Sep 03, 2021 5:20 am

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.

User avatar
Rory Turnbull
Posts: 28
Joined: Mon Dec 16, 2019 1:57 am

Re: Model conversion from OpenSim4 to Hyfydy

Post by Rory Turnbull » Sat Sep 04, 2021 9:21 am

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
}

User avatar
Rory Turnbull
Posts: 28
Joined: Mon Dec 16, 2019 1:57 am

Re: Model conversion from OpenSim4 to Hyfydy

Post by Rory Turnbull » Sat Sep 04, 2021 9:40 am

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 418 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 418 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?

POST REPLY