Hi,
We have two questions that we hope someone can help us with:
Q.1. We want to track the trajectory of a particular body segment (such as the toes) with MocoOutputTrackingGoal. We defined the output path for the body as: "FootGoal->setOutputPath("/bodyset/ltoes|position");". Is this the correct way? We are not acquainted with that pipe (|) operation to set a path. Are there other ways to capturing the position of a body segment via the path definition?
Q.2. The path or trajectory we want to track is a function of time from time t0 to time tf. We also want to make tf in the overall problem an unknown to be determined via MocoFinalTimeGoal. How can we make the tf in the definition of the trajectory adjust for the varying tf in the Moco solution?
Thanks for any insight.
MocoOutputTracking Goal Problems:
- Nicholas Bianco
- Posts: 1045
- Joined: Thu Oct 04, 2012 8:09 pm
Re: MocoOutputTracking Goal Problems:
Hi Musa,
Happy to help.
Best,
Nick
Happy to help.
That is the correct format. The "|" character here is not representing a pipe operation, but rather is just the format we use to designate Outputs in OpenSim. Note that "position" is a Vec3 Output, so you should probably specify the component of the position you want to track with each MocoOutputGoal you define (otherwise it will track the norm of the position by default). You might also consider using MocoTranslationTrackingGoal as an alternative.Q.1. We want to track the trajectory of a particular body segment (such as the toes) with MocoOutputTrackingGoal. We defined the output path for the body as: "FootGoal->setOutputPath("/bodyset/ltoes|position");". Is this the correct way? We are not acquainted with that pipe (|) operation to set a path. Are there other ways to capturing the position of a body segment via the path definition?
Unfortunately, this feature, where the reference trajectory is dynamically stretched to match the time range in the current trajectory, is not currently available in Moco. We are aware that it is a desired feature, but it would require some significant re-engineering in Moco so there is not a timeline for implementation yet.Q.2. The path or trajectory we want to track is a function of time from time t0 to time tf. We also want to make tf in the overall problem an unknown to be determined via MocoFinalTimeGoal. How can we make the tf in the definition of the trajectory adjust for the varying tf in the Moco solution?
Best,
Nick
Re: MocoOutputTracking Goal Problems:
Great. Thanks Nick. We do use the setOutputIndex() function to select the desired index of the vector to use for the foot position. We appreciate your insight and look forward to a future version that allows inclusion of dynamic stretching of the reference desired trajectory to match the current time trajectory.