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

feat(deviation_estimator): use yaw stddev instead of max for stddev gyro #140

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,12 @@ void DeviationEstimator::timer_callback()
stddev_vx_msg.data = stddev_vx;
pub_stddev_vx_->publish(stddev_vx_msg);

double stddev_angvel_imu = 0.0;
stddev_angvel_imu = std::max(stddev_angvel_imu, stddev_angvel_base.x);
stddev_angvel_imu = std::max(stddev_angvel_imu, stddev_angvel_base.y);
stddev_angvel_imu = std::max(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
Loading