Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify RigidBodyAcceleration's usage #124

Merged
merged 1 commit into from
Dec 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/samples/RigidBodyAcceleration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

namespace base { namespace samples {

void RigidBodyAcceleration::invalidateOrientation()
RigidBodyAcceleration::RigidBodyAcceleration()
{
invalidate();
}

void RigidBodyAcceleration::invalidate()
{
cov_acceleration = Eigen::Matrix3d::Identity();
cov_acceleration *= INFINITY;
Expand Down
35 changes: 26 additions & 9 deletions src/samples/RigidBodyAcceleration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,41 @@
#include <base/Time.hpp>

namespace base { namespace samples {
struct RigidBodyAcceleration
/**
* Representation of accelerations of a body in a given (unspecified) fixed
* frame of reference
*
* While the frame of reference is unspecified, it will usually be the
* inertial frame. We encourage Rock code to use the body-fixed frame
* as the frame of expression.
*
* Indeed, Sensors (e.g. gyros, accelerometers) and models (e.g.
* hydrodynamic models) give access to velocities and accelerations w.r.t.
* the inertial frame, but expressed in the body frame. However, expressing
* the velocities/accelerations in the world frame from these
* sensing/estimation methods would require to have an estimate
* of the system's pose in the world, which is a harder thing to get.
*/
struct RigidBodyAcceleration
{
RigidBodyAcceleration();

base::Time time;

/** Linear acceleration in m/s2, world fixed frame of reference (East-North-Up) */
/** Linear acceleration in m/s2 */
base::Vector3d acceleration;
/** Covariance matrix of the linear acceleration
*/
/** Covariance matrix of the linear acceleration
*/
base::Matrix3d cov_acceleration;

/** Angular acceleration in rad/s2, world fixed frame of reference (East-North-Up) */
/** Angular acceleration in rad/s2 */
base::Vector3d angular_acceleration;
/** Covariance matrix of the angular acceleration
*/
/** Covariance matrix of the angular acceleration
*/
base::Matrix3d cov_angular_acceleration;

void invalidateOrientation();
void invalidate();

};
}}

Expand Down