IMU Sensor Model

\tableofcontents

Chrono::Sensor supports three sensors commonly used collectively as an IMU. These are accelerometer, gyroscope, and magnetometer.

Accelerometer Creation

// create a noise model
auto
noise_model=chrono_types::make_shared<ChNoiseNormalDrift>(
    100.f,                  // float updateRate,
    {0,0,0},                // float mean,
    {0.001,0.001,0.001},    // float stdev,
    .01f,                   // float bias_drift,
    .1f                     // float tau_drift
);

auto acc= chrono_types::make_shared<ChAccelerometerSensor>(
    parent_body,        // body to which the IMU is attached
    imu_update_rate,    // update rate
    imu_offset_pose,    // offset pose from body
    noise_model         // noise model
);

acc->SetName("Accelerometer");

acc->SetLag(.001); //1 millisecond lag
acc->SetCollectionWindow(.001);  //1 millisecond collection time

// Accelerometer data access filter
acc->PushFilter(chrono_types::make_shared<ChFilterAccelAccess>());

// Addsensorto manager
manager->AddSensor(acc);

Gyroscope Creation

Magnetometer Creation

IMU Data Access

Last updated