Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error sol.print_cost() #712

Open
AnaisFarr opened this issue Jul 7, 2023 · 0 comments
Open

Error sol.print_cost() #712

AnaisFarr opened this issue Jul 7, 2023 · 0 comments

Comments

@AnaisFarr
Copy link
Contributor

I'm currently running simulations in several phases. In my phase 0, q, qdot and tau are declared as q, qdot and tau. But in my phase 1, which contains holonomic constraints, the q, qdot and tau of the independent segments are declared as u, udot and tau. The problem is that in solution.py, the key chosen is that of the first phase and the key name (here q) is considered to be the same for all phases. However, this is not the case in my example. As a result, I get this error for the phase 1 because the real key is u:

KeyError: 'q'

On this line of solution.py (l.1457):

 for key in nlp.states:
            x = np.concatenate((x, self._states["scaled"][phase_idx][key][:, node_idx]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant