machines-in-motion / biconvex_mpc

BSD 3-Clause "New" or "Revised" License
29 stars 7 forks source link

Examples fail #4

Open nswdc opened 1 year ago

nswdc commented 1 year ago

Hello,

I am trying to run the examples but I regularly go with this error :

self.kd.set_com_tracking_weight(self.params.cent_wt[0])
TypeError: set_com_tracking_weight(): incompatible function arguments. The following argument types are supported:
    1. (self: biconvex_mpc_cpp.KinoDynMP, arg0: numpy.ndarray[numpy.float64[m, 1]]) -> None

A workaround is to change jump.cent_wt = [1., 5e+2] by jump.cent_wt = np.array( [[1.], [5e+2]]).

Then I encounter this error :

Traceback (most recent call last):
  File "/home/nicolas/wdc_workspace/src/biconvex_mpc/examples/atlas_jump_test.py", line 99, in <module>
    xs_plan, us_plan, f_plan = gg.optimize(q, v, 0., v_des, w_des)
  File "/home/nicolas/wdc_workspace/src/biconvex_mpc/examples/mpc/abstract_cyclic_gen1.py", line 395, in optimize
    self.kd.optimize(q, v, 50, 1)
RuntimeError: In /opt/openrobots/include/crocoddyl/core/cost-base.hxx
crocoddyl::CostModelAbstractTpl<Scalar>::CostModelAbstractTpl(boost::shared_ptr<crocoddyl::StateAbstractTpl<_Scalar> >, boost::shared_ptr<crocoddyl::ActivationModelAbstractTpl<_Scalar> >, boost::shared_ptr<crocoddyl::ResidualModelAbstractTpl<Scalar> >) [with _Scalar = double] 23
Invalid argument: nr is equals to `6`

It's the case for several examples. I suspect an incompatibility between various version of libraries (crocoddyl vs biconvex_mpc). My version :

>>> import crocoddyl
>>> print(crocoddyl.__version__)
1.9.0
>>> import pinocchio
>>> print(pinocchio.__version__)
2.6.17

My python is 3.10.

The examples that failed with this behavior for me : atlas_walk_test.py atlas_jump_test.py solo12_bound_test.py

MorePanda123 commented 6 months ago

I have the same problem and My python is 3.69. The version of crocoddyl is 1.9.0r1.