Page 1 of 1

Path Wrapping Sets in muscles

Posted: Fri Jun 02, 2017 11:40 am
by cscott
Hello!

I'm somewhat new to OpenSim and was looking through the code for the arm26.osim model. Within the model under many of the muscles, there are spots where a PathWrapSet is defined. Under the PathWrapSet there's a PathWrap and under there is a <range>. Here is some code from the arm26.osim code as an example:

Code: Select all

<PathWrapSet>
		<objects>
			<PathWrap>
				<wrap_object>TRI</wrap_object>
				<method>hybrid</method>
				<range> -1 -1</range>
			</PathWrap>
			<PathWrap>
				<wrap_object>TRIlonghh</wrap_object>
				<method>hybrid</method>
				<range> -1 -1</range>
			</PathWrap>

I've been having troubles understanding what the <range> -1 -1 </range> function does and do the values necessarily have to be -1 -1?

Re: Path Wrapping Sets in muscles

Posted: Fri Jun 02, 2017 12:08 pm
by tkuchida
There doesn't appear to be any doxygen documentation for the PathWrap class (https://simtk.org/api_docs/opensim/api_docs/) so I checked the code directly. Here's what I found: https://github.com/opensim-org/opensim- ... Wrap.h#L65. The description of the property is "The range of indices to use to compute the path over the wrap object." but the comment indicates that the property isn't being respected.

Thanks for pointing this out. I've created an issue on GitHub here: https://github.com/opensim-org/opensim-core/issues/1740

Re: Path Wrapping Sets in muscles

Posted: Thu Jun 08, 2017 5:25 pm
by brycekillen05
Hi Connor,

You can find OpenSim API Documentation on PathWrapSet etc on the older version of Opensim (2.4) here https://simtk.org/api_docs/opensim/api_docs24/

You may have already found you the answer you were looking for with respect to your original question but I will answer it in case you haven't.

The pathWrapSet for each muscle includes the set of wrap objects a specific muscle will wrap around. The range refers to when the muscle can wrap. AS you probably know a muscle can be represented by a number of points including origin, insertion and via points. This "range" tag defined between which points a muscle can wrap on a given object.

For example consider a simple example where a muscle is represented as an origin, a via point and an insertion. Let's also say you have a wrapping surface between the origin and via point. You would only want the muscle to wrap on this surface between these two points. Therefore you can set the range to be from 0 1 so the muscle will only wrap on this object between it's origin and the via point.

Hopefully this answers your question if you haven't already found it. I noticed you are posting a lot of wrapping surfaces so the above doxygen page may also provide you with some other API function documentations for these wrapping surfaces.

Thanks

Bryce Killen

Re: Path Wrapping Sets in muscles

Posted: Fri Jun 09, 2017 2:51 pm
by tkuchida
Thanks, Bryce. I think you have correctly described the intent of the property, and there seems to be some code in GeometryPath.cpp that uses it, but I don't think there is any test coverage for a non-default range. I suggest using a simple model to verify that this property is behaving as you expect.