loco-3d / crocoddyl

Crocoddyl is an optimal control library for robot control under contact sequence. Its solver is based on various efficient Differential Dynamic Programming (DDP)-like algorithms
BSD 3-Clause "New" or "Revised" License
858 stars 174 forks source link

Crocoddyl does not work with numpy anymore (np.__version__ >= 2.23) #1105

Closed ymontmarin closed 2 years ago

ymontmarin commented 2 years ago

Hello,

Just to let you know that numpy has decide to remove the method np.asscalar that was deprecated since 1.16 and is removed from 2.23. The method in 7 files in crocoddyle. In current versioning on conda for pinocchio, it prevents using python 3.11.

I patched the conda recipe https://github.com/conda-forge/crocoddyl-feedstock/pull/24 waiting for upstream fix.

Best, Yann

cmastalli commented 2 years ago

Hi @ymontmarin

I am not familiar with the development in conda. But you might be aware that we have already sorted out this issue (which includes other modifications in these files) in an ongoing branch to be merged.

I hope your patch doesn't create future conflicts with what will be merged later.

nim65s commented 2 years ago

Hi @ymontmarin,

Instead of pinning numpy to old versions, could you apply #1106 as patch on conda ? NB: github allows to directly get a patch from a PR by adding .patch at the end of the url: https://github.com/loco-3d/crocoddyl/pull/1106.patch

ymontmarin commented 2 years ago

@nim65s @cmastalli thank you ! I pinned the version because asscalar was maybe not the only compatibility issue. But as you confirm, I used a patch instead: https://github.com/conda-forge/crocoddyl-feedstock/pull/25

Thank you !