You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/idadiotis/centauro_ws/src/try_horizon/src/test.py", line 39, in <module>
prb.setDynamics(x_dot)
File "/usr/local/lib/python3.8/dist-packages/casadi_horizon-0.4.0-py3.8-linux-x86_64.egg/horizon/problem.py", line 205, in setDynamics
raise ValueError(f'state derivative dimension mismatch ({xdot.shape[0]} != {nx})')
ValueError: state derivative dimension mismatch (95 != 99)
The joint_names list has length 42 and kindyn object gives nq = 52, nv = 47.
I believe the difference in the dimension between state and state derivative is due to the Pinocchio representation of continuous joints (the 4 wheels of Centauro). In particular, for each continuous joint Pinocchio adds 2 elements in the configuration vector (cos(theta). sin(theta)) and one element(d(theta)/dt) in the velocity vector.
If the above are true, it should not be hard to modify utils.double_integrator_with_floating_base to account for continuous joints.
The text was updated successfully, but these errors were encountered:
You are indeed right, thank you very much for the comment. We will fix this as soon as possible, as @alaurenzi suggested, letting Pinocchio manage the integration.
In the meantime, I suggest switching the joint type of the wheels from continuous to revolute. Setting huge lower and upper bounds would do the trick.
Hi @FrancescoRuscelli ,
I have the above minimal piece of code, trying to create an optimal control problem for Centauro using
horizon
(code copied fromspot_walk.py
file).I am getting the following error:
The
joint_names
list has length 42 andkindyn
object givesnq = 52
,nv = 47
.I believe the difference in the dimension between state and state derivative is due to the Pinocchio representation of continuous joints (the 4 wheels of Centauro). In particular, for each continuous joint Pinocchio adds 2 elements in the configuration vector (
cos(theta)
.sin(theta)
) and one element(d(theta)/dt
) in the velocity vector.If the above are true, it should not be hard to modify
utils.double_integrator_with_floating_base
to account for continuous joints.The text was updated successfully, but these errors were encountered: