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.
'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.
AssemblySolver instantiation:
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: AssemblySolver instantiation:
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.
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:
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
Musa