Skip to content

Get Jerk at time t for a Piece of a Trajectory #8

Description

@MasonJohnHawver42

Is this how you would find the jerk at time t for a piece of a trajectory?

// Get the jerk at time t in this piece
inline Eigen::Vector3d getJerk(double t)
{
    // Normalize the time
    t /= duration;
    Eigen::Vector3d jerk(0.0, 0.0, 0.0);
    double tn = 1.0;
    int l = 1;
    int m = 2;
    int n = 3;
    for (int i = TrajOrder - 3; i >= 0; i--)
    {
        jerk += l * m * n * tn * normalizedCoeffMat().col(i);
        tn *= t;
        l++;
        m++;
        n++;
    }
    // Recover the actual jerk
    jerk /= (duration * duration * duration);
    return jerk;
}

This is for min snap but it could be applied to min jerk too. If this seems correct to you I'll happily send a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions