MichaelGrupp / evo

Python package for the evaluation of odometry and SLAM
https://michaelgrupp.github.io/evo/
GNU General Public License v3.0
3.43k stars 746 forks source link

[ERROR] evo module evo.main_traj crashed - no logfile written (disabled) #688

Closed MononobenoFuto closed 2 months ago

MononobenoFuto commented 2 months ago

Description: thank you for the excellent tool. I have used it for a long time but today I suddenly met a strange question. I try to trace the problem and found in 741 line of /home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py

size = button.winfo_pixels('18p') 

size equals to 0, but i don't know what causes this problem

Command:

evo_traj tum /home/nyamori/catkin_r3live/result/pose.txt -p --plot_mode=xyz

Console output:


[ERROR] Unhandled error in evo.main_traj
Traceback (most recent call last):
  File "/home/nyamori/.local/lib/python3.11/site-packages/evo/entry_points.py", line 95, in launch
    main_module.run(args)
  File "/home/nyamori/.local/lib/python3.11/site-packages/evo/main_traj.py", line 310, in run
    fig_xyz, axarr_xyz = plt.subplots(3, sharex="col",
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/pyplot.py", line 1598, in subplots
    fig = figure(**fig_kw)
          ^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/pyplot.py", line 934, in figure
    manager = new_figure_manager(
              ^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/pyplot.py", line 465, in new_figure_manager
    return _get_backend_mod().new_figure_manager(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 3396, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 3401, in new_figure_manager_given_figure
    return cls.FigureCanvas.new_manager(figure, num)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 1785, in new_manager
    return cls.manager_class.create_with_canvas(cls, figure, num)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 507, in create_with_canvas
    manager = cls(canvas, num, window)
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 460, in __init__
    super().__init__(canvas, num)
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 2654, in __init__
    self.toolbar = self._toolbar2_class(self.canvas)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 627, in __init__
    self._buttons[text] = button = self._Button(
                                   ^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 829, in _Button
    NavigationToolbar2Tk._set_image_for_button(self, b)
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 765, in _set_image_for_button
    image = ImageTk.PhotoImage(im.resize((size, size)), master=self)
                               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/PIL/Image.py", line 2178, in resize
    im = im.resize(size, resample, box)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/PIL/Image.py", line 2200, in resize
    return self._new(self.im.resize(size, resample, box))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: height and width must be > 0

[ERROR] evo module evo.main_traj crashed - no logfile written (disabled)
(base) nyamori@nyamori:~/catkin_ws/src/LVI-SAM-Easyused$ evo_traj tum /home/nyamori/catkin_r3live/result/pose.txt -p
--------------------------------------------------------------------------------
name:   pose
infos:  238 poses, 3.601m path length, 27.209s duration
0
[ERROR] Unhandled error in evo.main_traj
Traceback (most recent call last):
  File "/home/nyamori/.local/lib/python3.11/site-packages/evo/entry_points.py", line 95, in launch
    main_module.run(args)
  File "/home/nyamori/.local/lib/python3.11/site-packages/evo/main_traj.py", line 310, in run
    fig_xyz, axarr_xyz = plt.subplots(3, sharex="col",
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/pyplot.py", line 1598, in subplots
    fig = figure(**fig_kw)
          ^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/pyplot.py", line 934, in figure
    manager = new_figure_manager(
              ^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/pyplot.py", line 465, in new_figure_manager
    return _get_backend_mod().new_figure_manager(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 3396, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 3401, in new_figure_manager_given_figure
    return cls.FigureCanvas.new_manager(figure, num)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 1785, in new_manager
    return cls.manager_class.create_with_canvas(cls, figure, num)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 507, in create_with_canvas
    manager = cls(canvas, num, window)
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 460, in __init__
    super().__init__(canvas, num)
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 2654, in __init__
    self.toolbar = self._toolbar2_class(self.canvas)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 627, in __init__
    self._buttons[text] = button = self._Button(
                                   ^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 829, in _Button
    NavigationToolbar2Tk._set_image_for_button(self, b)
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 765, in _set_image_for_button
    image = ImageTk.PhotoImage(im.resize((size, size)), master=self)
                               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/PIL/Image.py", line 2178, in resize
    im = im.resize(size, resample, box)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/PIL/Image.py", line 2200, in resize
    return self._new(self.im.resize(size, resample, box))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: height and width must be > 0

[ERROR] evo module evo.main_traj crashed - no logfile written (disabled)
(base) nyamori@nyamori:~/catkin_ws/src/LVI-SAM-Easyused$ evo_traj tum /home/nyamori/catkin_r3live/result/pose.txt
--------------------------------------------------------------------------------
name:   pose
infos:  238 poses, 3.601m path length, 27.209s duration
(base) nyamori@nyamori:~/catkin_ws/src/LVI-SAM-Easyused$ evo_traj tum /home/nyamori/catkin_r3live/result/pose.txt -p -plot_mode=xz
usage: evo_traj tum [-h] [-f] [-a] [-s] [--n_to_align N_TO_ALIGN] [--align_origin] [--sync] [--transform_left TRANSFORM_LEFT]
                    [--transform_right TRANSFORM_RIGHT] [--propagate_transform] [--invert_transform] [--ref REF] [--t_offset T_OFFSET]
                    [--t_max_diff T_MAX_DIFF] [--merge] [--project_to_plane {xy,xz,yz}] [--downsample DOWNSAMPLE]
                    [--motion_filter DISTANCE ANGLE_DEGREES] [-p] [--plot_relative_time] [--plot_mode {xy,xz,yx,yz,zx,zy,xyz}]
                    [--ros_map_yaml ROS_MAP_YAML] [--save_plot SAVE_PLOT] [--save_table SAVE_TABLE] [--serialize_plot SERIALIZE_PLOT]
                    [--save_as_tum] [--save_as_kitti] [--save_as_bag] [--save_as_bag2] [--logfile LOGFILE] [--no_warnings] [-v]
                    [--show_full_names] [--silent] [--debug] [-c CONFIG]
                    traj_files [traj_files ...]
evo_traj tum: error: argument -p/--plot: ignored explicit argument 'lot_mode=xz'
(base) nyamori@nyamori:~/catkin_ws/src/LVI-SAM-Easyused$ evo_traj tum /home/nyamori/catkin_r3live/result/pose.txt -p --plot_mode=xz
--------------------------------------------------------------------------------
name:   pose
infos:  238 poses, 3.601m path length, 27.209s duration
0
[ERROR] Unhandled error in evo.main_traj
Traceback (most recent call last):
  File "/home/nyamori/.local/lib/python3.11/site-packages/evo/entry_points.py", line 95, in launch
    main_module.run(args)
  File "/home/nyamori/.local/lib/python3.11/site-packages/evo/main_traj.py", line 310, in run
    fig_xyz, axarr_xyz = plt.subplots(3, sharex="col",
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/pyplot.py", line 1598, in subplots
    fig = figure(**fig_kw)
          ^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/pyplot.py", line 934, in figure
    manager = new_figure_manager(
              ^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/pyplot.py", line 465, in new_figure_manager
    return _get_backend_mod().new_figure_manager(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 3396, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 3401, in new_figure_manager_given_figure
    return cls.FigureCanvas.new_manager(figure, num)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 1785, in new_manager
    return cls.manager_class.create_with_canvas(cls, figure, num)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 507, in create_with_canvas
    manager = cls(canvas, num, window)
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 460, in __init__
    super().__init__(canvas, num)
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 2654, in __init__
    self.toolbar = self._toolbar2_class(self.canvas)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 627, in __init__
    self._buttons[text] = button = self._Button(
                                   ^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 829, in _Button
    NavigationToolbar2Tk._set_image_for_button(self, b)
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/matplotlib/backends/_backend_tk.py", line 765, in _set_image_for_button
    image = ImageTk.PhotoImage(im.resize((size, size)), master=self)
                               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/PIL/Image.py", line 2178, in resize
    im = im.resize(size, resample, box)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyamori/anaconda3/lib/python3.11/site-packages/PIL/Image.py", line 2200, in resize
    return self._new(self.im.resize(size, resample, box))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: height and width must be > 0

Additional files:

evo pkg --version: v1.29.0
evo pkg --pyversion: v3.11.7
operating system and version: Ubuntu20.04
no change to source code
output of  `evo_config show --brief --no_color`
{
    "console_logging_format": "%(message)s",
    "euler_angle_sequence": "sxyz",
    "global_logfile_enabled": false,
    "plot_axis_marker_scale": 0.0,
    "plot_backend": "TkAgg",
    "plot_export_format": "pdf",
    "plot_figsize": [
        6,
        6
    ],
    "plot_fontfamily": "sans-serif",
    "plot_fontscale": 1.0,
    "plot_invert_xaxis": false,
    "plot_invert_yaxis": false,
    "plot_linewidth": 1.5,
    "plot_mode_default": "xyz",
    "plot_multi_cmap": "none",
    "plot_pose_correspondences": false,
    "plot_pose_correspondences_linestyle": "dotted",
    "plot_reference_alpha": 0.5,
    "plot_reference_axis_marker_scale": 0.0,
    "plot_reference_color": "black",
    "plot_reference_linestyle": "--",
    "plot_seaborn_enabled": true,
    "plot_seaborn_palette": "deep6",
    "plot_seaborn_style": "darkgrid",
    "plot_show_axis": true,
    "plot_show_legend": true,
    "plot_split": false,
    "plot_start_end_markers": false,
    "plot_statistics": [
        "rmse",
        "median",
        "mean",
        "std",
        "min",
        "max"
    ],
    "plot_texsystem": "pdflatex",
    "plot_trajectory_alpha": 0.75,
    "plot_trajectory_cmap": "jet",
    "plot_trajectory_length_unit": "m",
    "plot_trajectory_linestyle": "-",
    "plot_usetex": false,
    "plot_xyz_realistic": true,
    "pygments_style": "monokai",
    "ros_map_alpha_value": 1.0,
    "ros_map_cmap": "Greys_r",
    "ros_map_enable_masking": true,
    "ros_map_unknown_cell_value": 205,
    "ros_map_viewport": "keep_unchanged",
    "save_traj_in_zip": false,
    "table_export_data": "stats",
    "table_export_format": "csv",
    "table_export_transpose": true,
    "tf_cache_lookup_frequency": 10,
    "tf_cache_max_time": 10000.0
}