How to evaluate a height map within CasADi

133 views
Skip to first unread message

A.S

unread,
Dec 3, 2020, 7:43:05 PM12/3/20
to CasADi
Dear Joris, 

I was wondering how it might be possible to incorporate a height map, where the height
at a position on a grid is given by a function such as z = height(x, y) within a trajectory
optimization framework for a robot. Because this function only takes real values for x, and y, and not casadi MX or SX variables, how could I evaluate z in this case? (I am assuming x and y are casadi symbolic variables, since I won't know before hand where the robot will be, but I do know, using the height(x,y) function, what the z position would be at that position).

Sincerely,
Alex  

Joris Gillis

unread,
Dec 8, 2020, 9:10:39 AM12/8/20
to CasADi
Dear Alex,

The term to look for is Callbacl or "Custom code" cfr https://web.casadi.org/docs/#subclassing-callback
Best to pass the options "enable_fd" (finite differencing) to be able to use your Function in an optimization context

Best regards,
   Joris

A.S

unread,
Dec 8, 2020, 7:30:06 PM12/8/20
to CasADi
thank you so much,
Sincerely,
Alex

li guo

unread,
Apr 28, 2022, 11:15:05 AM4/28/22
to CasADi

Hi,
How to use callback function for ipopt solver in C++?
Can someone give me some examples to learn? 
Thanks. 
Reply all
Reply to author
Forward
0 new messages