SCvx icon indicating copy to clipboard operation
SCvx copied to clipboard

Questions

Open GYskyfall opened this issue 5 years ago • 2 comments

Question1

#Question about **linearized lower thrust constraint**
        lhs = [U_last_p[:, k] / (cvx.norm(U_last_p[:, k])) * U_v[:, k] for k in range(K)]
        constraints += [
            self.T_min - cvx.vstack(lhs) <= self.s_prime
        ]

constraints in rocket_landing_3d.py the U_last_p[:, k] and U_v[:, k] are numpy array ,just use * ,the outcome still is numpy array, however self.T_min is scalar , Why is there no error when a scalar minus array?

GYskyfall avatar Aug 06 '19 01:08 GYskyfall

Question2 I am confused about the Coordinate System in the code In the inertial reference , z-axis points UP In the body-fixed reference , z-axis points along the vertical axis of the vehicle

However the euler_to quat function seems not consistent with the coordinate system Would you please explain to me?

here is the euler_to quat function code:

def euler_to_quat(a):
    a = np.deg2rad(a)

    cy = np.cos(a[1] * 0.5)
    sy = np.sin(a[1] * 0.5)
    cr = np.cos(a[0] * 0.5)
    sr = np.sin(a[0] * 0.5)
    cp = np.cos(a[2] * 0.5)
    sp = np.sin(a[2] * 0.5)

    q = np.zeros(4)

    q[0] = cy * cr * cp + sy * sr * sp
    q[1] = cy * sr * cp - sy * cr * sp
    q[3] = cy * cr * sp + sy * sr * cp
    q[2] = sy * cr * cp - cy * sr * sp

    return q

GYskyfall avatar Aug 06 '19 01:08 GYskyfall

I am also curious about the coordinate conventions used in the code

npn0010 avatar Aug 25 '23 21:08 npn0010