ethz-asl / data-driven-dynamics

Data Driven Dynamics Modeling for Aerial Vehicles
Other
92 stars 13 forks source link

body rotation influence on angular acceleration #104

Open manumerous opened 3 years ago

manumerous commented 3 years ago

The influence of the body angular velocity on the angular acceleration is not yet taken into account: image

There is already a function computing features for omega x omega in the dynamics model:

    def compute_body_rotation_features(self, angular_vel_topic_list):
        """Include the moment contribution due to rotation body frame:
        w x Iw = X_body_rot * v
        Where v = (I_y-I_z, I_z-I_x, I_x- I_y)^T
        is comprised of the inertia moments we want to estimate
        """
        angular_vel_mat = (self.data_df[angular_vel_topic_list]).to_numpy()
        X_body_rot = np.zeros((3*angular_vel_mat.shape[0], 3))
        X_body_rot_coef_list = ["I_yy-I_zz", "I_zz-I_xx", "I_xx- I_yy"]
        for i in range(angular_vel_mat.shape[0]):
            X_body_rot[3*i, 0] = angular_vel_mat[i,
                                                 1]*angular_vel_mat[i, 2]
            X_body_rot[3*i + 1, 0] = angular_vel_mat[i, 2] * \
                angular_vel_mat[i, 0]
            X_body_rot[3*i + 2, 0] = angular_vel_mat[i, 0] * \
                angular_vel_mat[i, 1]
        return X_body_rot, X_body_rot_coef_list

To really take this effect into account it would be necessary to define I_xx, .., I_zz as optimization variables which would rend the problem nonlinear. I guess this is long-therm the way to go. What do you think @Jaeyoung-Lim ?

Jaeyoung-Lim commented 3 years ago

@manumerous Yes, but probably for this to be observable, we need the rotational velocity of the rotors.

For multirotors, as long as the coordinate frame is aligned with the principle axis of the drone, omega X I omega is zero. So ignoring this effect is not too bad.

For other platforms, this may introduce some problems. Lets note that we are ignoring this effect and revisit this after we resolve more urgent problems in this repository.

Jaeyoung-Lim commented 3 years ago
    `X_body_rot_coef_list = ["I_yy-I_zz", "I_zz-I_xx", "I_xx- I_yy"]`

Are we actually estimating the moment of inertia? or are we just calculating the difference?

Jaeyoung-Lim commented 3 years ago

@manumerous I think I am now extremely confused by this formulation. Where is the inverse of the moment_of_inertia applied?