Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: kminoda <[email protected]>
  • Loading branch information
kminoda committed Oct 26, 2023
1 parent 3f75ad1 commit 08c1d29
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,16 +316,11 @@ void DeviationEstimator::timer_callback()
stddev_vx_msg.data = stddev_vx;
pub_stddev_vx_->publish(stddev_vx_msg);

// For IMU link standard deviation, we use the minimum value from the calculated standard
// deviation in base_link. This is because the standard deviation estimation of x and y in
// base_link may not be accurate especially when the data contains a motion when the people are
// getting on/off the vehicle, which causes the vehicle to tilt in roll and pitch. In this case,
// we would like to use the standard deviation of yaw axis in base_link, which is often the
// smallest value among the three axes.
double stddev_angvel_imu = std::numeric_limits<double>::max();
stddev_angvel_imu = std::min(stddev_angvel_imu, stddev_angvel_base.x);
stddev_angvel_imu = std::min(stddev_angvel_imu, stddev_angvel_base.y);
stddev_angvel_imu = std::min(stddev_angvel_imu, stddev_angvel_base.z);
// For IMU link standard deviation, we use the yaw standard deviation in base_link.
// This is because the standard deviation estimation of x and y in base_link may not be accurate especially when
// the data contains a motion when the people are getting on/off the vehicle, which causes the vehicle to tilt in roll and pitch.
// In this case, we would like to use the standard deviation of yaw axis in base_link.
double stddev_angvel_imu = stddev_angvel_base.z;
geometry_msgs::msg::Vector3 stddev_angvel_imu_msg =
createVector3(stddev_angvel_imu, stddev_angvel_imu, stddev_angvel_imu);
pub_stddev_angvel_->publish(stddev_angvel_imu_msg);
Expand Down

0 comments on commit 08c1d29

Please sign in to comment.