Skip to content

Commit

Permalink
ci(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Nov 14, 2023
1 parent ae7abb3 commit d1a3552
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import dataclasses
import sqlite3

from constants import THRESHOLD_FOR_INITIALIZED_ERROR
from geometry_msgs.msg import PoseWithCovarianceStamped
from geometry_msgs.msg import TwistWithCovarianceStamped
from nav_msgs.msg import Odometry
Expand All @@ -29,7 +30,6 @@
from scipy.spatial.transform import Rotation
from tqdm import tqdm

from constants import THRESHOLD_FOR_INITIALIZED_ERROR

@dataclasses.dataclass
class ErrorResults:
Expand Down Expand Up @@ -209,8 +209,7 @@ def __init__(self, bagfile, params, use_normal_ekf=False, bagfile_base=None):
stddev_long_2d, stddev_short_2d = calc_long_short_radius(ekf_dr_pose_cov_list)
stddev_long_2d_gt, stddev_short_2d_gt = calc_long_short_radius(ekf_gt_pose_cov_list)

ignore_index = np.where(
stddev_long_2d_gt < THRESHOLD_FOR_INITIALIZED_ERROR)[0][0]
ignore_index = np.where(stddev_long_2d_gt < THRESHOLD_FOR_INITIALIZED_ERROR)[0][0]

long_radius_results = ErrorResults(
"long_radius",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Threshold used for detecting invalid values for expected errors which tends to have significantly large values at the beginning of the bag file
# which is around 1e8 [m]. This value is used to ignore the initial part of the bag file.
THRESHOLD_FOR_INITIALIZED_ERROR = 100.0 # [m]
THRESHOLD_FOR_INITIALIZED_ERROR = 100.0 # [m]
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from constants import THRESHOLD_FOR_INITIALIZED_ERROR
import matplotlib.pyplot as plt
import numpy as np

from constants import THRESHOLD_FOR_INITIALIZED_ERROR

def plot_thresholds(recall_list, lower_bound, threshold, scale, save_path=None):
fig = plt.figure(figsize=(8, 6))
Expand All @@ -45,8 +45,9 @@ def plot_thresholds(recall_list, lower_bound, threshold, scale, save_path=None):

def plot_bag_compare(save_path, results):
# Ignore the initial part larger than this value, since the values right after launch may diverge.
ignore_index = np.where(
results.long_radius.expected_error < THRESHOLD_FOR_INITIALIZED_ERROR)[0][0]
ignore_index = np.where(results.long_radius.expected_error < THRESHOLD_FOR_INITIALIZED_ERROR)[
0
][0]
error_maximum = np.max(
np.hstack(
[
Expand Down

0 comments on commit d1a3552

Please sign in to comment.