Constraint Ball Joint

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

Constraint Ball Joint

Post by Musa Audu » Wed Nov 07, 2018 10:18 am

In the C++ code of ExampleClosedTopologyMechanism of Simbody, a ball constraint was defined using the form: "Constraint::Ball(linker1, Vec3(linkerHalfDims[0],0,0), rocker1, Vec3(0,-rockerHalfDims[1],0));" When I used the same form in my code as: SimTK::Constraint::Ball(parent_body, loc_p, child_body, loc_c); results in error: "Incomplete type is not allowed". Could anyone explain to me why it works in that scenario and not in my case? Thanks.
Musa

Tags:

User avatar
Michael Sherman
Posts: 807
Joined: Fri Apr 01, 2005 6:05 pm

Re: Constraint Ball Joint

Post by Michael Sherman » Wed Nov 07, 2018 2:38 pm

An incomplete type error can arise from a missing header file in the complaining compilation unit. It would likely help also to know which of the many objects in that statement the compiler is complaining about.

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

Re: Constraint Ball Joint

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

Hi,

It is possible that you provided the Body instances to the Ball constraint. The first argument to the constraint is a MobilizedBody object.

Code: Select all

Ball (MobilizedBody &parent, const Transform &X_PF, const Body &bodyInfo, const Transform &X_BM, Direction=Forward)
Regards

POST REPLY