Modifying Existing Joints: Remove Redundant Coordinate

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Vinay Kumar
Posts: 34
Joined: Thu Nov 08, 2018 6:50 am

Modifying Existing Joints: Remove Redundant Coordinate

Post by Vinay Kumar » Mon Feb 10, 2020 1:39 am

Hello,

I am trying to restructure the gait2354.osim Coordinate and Joint structure. I am having trouble initializing the integrator using the edited model. The example code is available at https://github.com/vinaym815/OpenSimExa ... 54.cpp#L13.

In this example I wished to remove the z axis translation of the ground_pelvis custom joint. First, I changed the Z axis translation function to a constant one and then removed the coordinate using the CoordinateSet.remove(). I am able to initialize system; however, the program crashes when I try to initialize the manger. The edited model still have pelvis_tz coordinate in the XML file and removing it solves the issue. Any idea how to remove this redundant coordinate programatically.

Thank You

Tags:

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Modifying Existing Joints: Remove Redundant Coordinate

Post by Ayman Habib » Mon Feb 10, 2020 10:35 am

Hello Vinay,

Can you explain why you want to remove a coordinate? In general coordinate definitions are part of the joint type (underlying computational system, allocates state variables based on joint type) so coordinates can't be removed, however they can be locked to a specific value if you want to fix them. Please explain what you're trying to do so we can suggest solutions.

Best regards,
-Ayman

User avatar
Vinay Kumar
Posts: 34
Joined: Thu Nov 08, 2018 6:50 am

Re: Modifying Existing Joints: Remove Redundant Coordinate

Post by Vinay Kumar » Tue Feb 11, 2020 7:25 pm

Hi Ayman,
aymanh wrote:
Mon Feb 10, 2020 10:35 am
Can you explain why you want to remove a coordinate?
I wanted to synthesize Sit to Stand motion. Since the joints undergo states with substantial hip and knee flexion angles, I wanted to simplify the Full Upper and Lower Body Model https://simtk.org/projects/model-high-flex. The simplification would involve restriction of motion to two dimensional space as well as the removal of some muscles. To achieve this I wanted to edit some exiting joint definitions.
aymanh wrote:
Mon Feb 10, 2020 10:35 am
They (the coordinates) can be locked to a specific value if you want to fix them.
I thought of doing that but editing the joints seemed like a cleaner solution and most probably computationally efficient as numerous forward simulations will be run by the optimization algorithm.

Thank you
Vinay

Update: I discovered editing the XML to be much simpler than expected (primarily because none of muscle wrap points were conditioned on the coordinates). However, I have a follow-up question. Why the coordinates are part of joint definitions? If they were independent:
1) We would not require OpenSim::CoordinateCouplerConstraint(),
2) Implementing symmetry within the models would have been easier.
3) Muscle Conditional Path points are functions of coordinates and occur as part of muscles, independent of joints anyways.

POST REPLY