htadashi / OptimalMotionPrimitives

2 stars 1 forks source link

Possible error in function `compute_costate_rev.m` #9

Closed htadashi closed 1 year ago

htadashi commented 1 year ago

https://github.com/htadashi/OptimalMotionPrimitives/blob/636f8747a9036e61f9b31569766e523dd3ddedd5/mechanical_system/compute_costate_rev.m#L7

Hi @demerdjieva, I suspect that we missed an minus sign here. Please also double-check this equation by checking (11) and (12) of our IFAC paper and also the computations that you wrote for the double pendulum.

htadashi commented 1 year ago

Also kindly update the computations that you wrote for the double pendulum with the computation of (11) for the particular case of the double pendulum, as this will be an important information for your report/thesis :)

demerdjieva commented 1 year ago

Hello @htadashi,

I took a screenshot from the computations related to the function compute_costate_rev.m, that I have added so far to the report: fp_costate However, don't we need the costate for the reverse system? The same way it has been done in the g_invertible case (in the folder g_invertible, in the live script OMF_sampling.mlx, the function p = compute_costate_rev(x, u, g) ?

Moreover, I wanted to ask you where I should update the computations for the double pendulum. Should I do that to the paper directly (as I don't have access to the link you have sent me, I only have access to the first submission version of the paper), or should I do that in the same document as the calculations for the double pendulum ?

htadashi commented 1 year ago

Hi @demerdjieva, thanks for double checking! Yes, you are right. I forgot that this function assumes that we are using the reverse system. Since we are using the reverse system, we use -g instead of g, and that is why we did not put a minus sign in that line.

You may ignore my request about updating the text since you already have wrote the computations in the report (I thought they were not written yet).

I will send you the link for the final submission by email.