Skip to content

Commit

Permalink
Merge pull request HeYijia#2 from KitKat7/master
Browse files Browse the repository at this point in the history
fix random noise
  • Loading branch information
HeYijia authored May 14, 2018
2 parents b34a4d9 + 949428c commit 11c902a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/imu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ IMU::IMU(Param p): param_(p)

void IMU::addIMUnoise(MotionData& data)
{
std::default_random_engine generator_;
std::random_device rd;
std::default_random_engine generator_(rd());
std::normal_distribution<double> noise(0.0, 1.0);

Eigen::Vector3d noise_gyro(noise(generator_),noise(generator_),noise(generator_));
Expand Down

0 comments on commit 11c902a

Please sign in to comment.