extrinsic_calibration icon indicating copy to clipboard operation
extrinsic_calibration copied to clipboard

Output from the pycppad function is not being accepted by constraint function

Open smahajan07 opened this issue 6 years ago • 5 comments

Pycppad uses two functions independent and adfun in the following way

a_var = independent(np.hstack([x0, l0]))
jacobian = adfun(a_var, g(a_var[:dim_x], a_var[dim_x:])).jacobian

But when the g function is called, it calls ax2Rot and both of these are expecting float values whereas what they get looks like this

[<pycppad.cppad_.a_float object at 0x7f358ab170c8>
 <pycppad.cppad_.a_float object at 0x7f358ab17140>
 <pycppad.cppad_.a_float object at 0x7f358ab171b8>]

Attaching the screenshot of the error. Screenshot from 2019-10-23 09-54-54

smahajan07 avatar Oct 23 '19 17:10 smahajan07

same problem

dlutguobin avatar Jun 03 '20 06:06 dlutguobin

same problem,have you guys solved this?

Torchmm avatar Jun 08 '20 07:06 Torchmm

Same problem.

JanezCim avatar Jun 09 '20 18:06 JanezCim

run pip install -U numpy works for me.

see commit https://github.com/numpy/numpy/commit/e33b286755401d81a96bb2d847b46c3096ac9903

yenkn avatar Jul 27 '20 07:07 yenkn

Are you guys using pycppad from here https://github.com/b45ch1/pycppad.git ? Because from what I see it doesn't really compile on Ubuntu 18.04 or newer and I had to adapt it. This one seems the newer still maintained version https://github.com/bradbell/cppad_py but it seems to have a different API and GPL license.

mehditlili avatar Jan 19 '21 10:01 mehditlili