AssemblySolver instantiation:

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Musa Audu
Posts: 47
Joined: Mon Nov 24, 2008 11:30 am

AssemblySolver instantiation:

Post by Musa Audu » Sat Nov 10, 2018 7:46 pm

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 16 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.

Tags:

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: AssemblySolver instantiation:

Post by Dimitar Stanev » Mon Nov 12, 2018 1:12 am

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.

User avatar
Musa Audu
Posts: 47
Joined: Mon Nov 24, 2008 11:30 am

Re: AssemblySolver instantiation:

Post by Musa Audu » Mon Nov 12, 2018 11:17 am

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

POST REPLY