Page 1 of 1

AssemblySolver instantiation:

Posted: Sat Nov 10, 2018 7:46 pm
by mlaudu
Declaring assemblysolver object:

I read an open-link model from an XML file (skeleton_file.osim). I then added bodies to it so that it will become a closed chain body system after assembly. A snippet of my code is attached.
snippet_code.cpp
(391 Bytes) Downloaded 15 times
'weights' vector is to ensure that some of the joint angles closely remain unchanged during the assembly. This gives a compile error because the first argument of AssemblySolver is a 'const Model'. My understanding is that if I declare Model skeleton as const in the first line then I can no longer change it. Is there a way around this? I will appreciate any insight.

Re: AssemblySolver instantiation:

Posted: Mon Nov 12, 2018 1:12 am
by mitkof6
Hi,

The const in the function call ensures that this class (AssemblySolver) will not change the provided arguments, since they are provided by reference. Probably the error is generated as a result to some other issue.

Re: AssemblySolver instantiation:

Posted: Mon Nov 12, 2018 11:17 am
by mlaudu
Yes. You are right Dimitar. I was mistakenly using the CoordinateSet in the second argument of the method instead of the CoordinateReference. Thanks for the pointer.
Musa