1- # localization_evaluation_toolkit -Ver.6.1 (Update 2023/03/14)
2- You can evaluate your localization result by comparing it to a reliable pose trajectory.
3- The start time, end time, and period can be different for each data.
4- The evaluation is automatically aligned with the one with the smaller number of data.
1+ # localization_evaluation_toolkit
52
6- ## Releases
7- | Version | Release Date | Python version | Note |
8- | ------- | ------------------ | -------------------- | ------------------------------------------------------------ |
9- | 6.0 | Feburary 3, 2023 | python 3.7 or higher | Support multi-file evaluation (mixtures of csv and ros2 bag) |
10- | 5.0 | January 20, 2023 | python 3.7 or higher | Support multi-file evaluation (CSV only) |
11- | 3.2 | September 29, 2022 | python 3.6 or higher | 1:1 evaluation |
3+ An evaluator for localization results, which compares with a reliable pose trajectory. Specifically, comparisons between different start times, end times, and periods are supported, since evaluation will be automatically aligned with the one with fewer data.
124
13- ## Installation
5+ ## 1. Installation & Preparation
6+
7+ Clone this repo to the local environment.
148
159``` sh
1610$ git clone https://github.com/MapIV/localization_evaluation_toolkit.git
1711```
1812
19- ## Preparation
20-
2113Evaluatable data types are limited to the format of CSV or ros2 bag, and the start time, end time, and period can be different for each data.
2214Specifically, a valid ** CSV file** requires at least the following entries.
2315
@@ -30,17 +22,19 @@ And a valid ros2 bag file should have one of the following types of topics.
3022- ` geometry_msgs/msg/PoseWithCovarianceStamped `
3123- ` nav_msgs/msg/Odometry `
3224
33- ## Execution
25+ ## 2. Main-evaluation
26+
27+ ### 2.1 Pose evaluation
3428
35- A standard configuration file for evaluation consists of the following parts.
29+ A standard configuration file for pose evaluation consists of the following parts.
3630
3731- Reference
3832- Result1, Result2, ...
3933- Optional settings
4034
4135It is required that the reference block should have the name of *** Reference*** and the names of result blocks should begin with *** Result*** .
4236When specifying the paths, it is recommended to use the absolute path.
43- There is a sample YAML file at ` config/evaluation .yaml ` .
37+ There is a sample YAML file at ` config/evaluation_pose .yaml ` .
4438To create your own configuration file, just use the following templates for CSV or ros2 bag,
4539
4640<details >
@@ -171,81 +165,236 @@ and run with
171165
172166` ` ` sh
173167$ cd localization_evaluation_toolkit
174- $ python3 scripts/main .py config/evaluation .yaml
168+ $ python3 scripts/pose_main .py config/evaluation_pose .yaml
175169```
176170
177- ## Sub-evaluation and adjustment
178-
179- ** A. Evaluate TP, NVTL, execution time and iteration with ros2 bag files**
180-
181- Please input a rosbag containing the following (at least one) topic.
182- ```
183- /localization/pose_estimator/pose_with_covariance
184- /localization/pose_estimator/nearest_voxel_transformation_likelihood
185- /localization/pose_estimator/transform_probability
186- /localization/pose_estimator/exe_time_ms
187- /localization/pose_estimator/iteration_num
188- ```
171+ For example, you may output the following graphs with the sample data.
189172
190173``` sh
191- $ cd localization_evaluation_toolkit/sub_scripts
192- $ source ~ /xxxxxx/install/setup.bash
193- $ python3 sub_ndt_evaluation.py [bag_path] [output_folder_path]
174+ $ cd localization_evaluation_toolkit
175+ $ python3 scripts/pose_main.py sample_data/config/sasashima_evaluation.yaml
194176```
195177
196- ** B. Adjust time stamp with CSV files**
197- ``` sh
198- $ cd localization_evaluation_toolkit/sub_scripts
199- $ python3 adjust_time_stamp.py [target_csv_path] [offset_csv_path] [ajust_time_stamp.yaml path] [output_folder_path]
200- ```
178+ <details >
179+ <summary >2D Trajectory</summary >
180+ <img src =" sample_data/output_sample/2d_trajectory.png " >
181+ When you zoom in on the graph, you can see the correspondence.
182+ <img src =" sample_data/output_sample/2d_trajectory_zoom.png " >
183+ </details >
201184
202- ** C. Create CSV file with covariance column from rosbag file**
203- In detail, refer to [ qiita article] ( https://qiita.com/koki2022/items/148d56e0f8eee45a0a62 )
204- ``` sh
205- $ cd localization_evaluation_toolkit/sub_scripts
206- $ python covariance_to_csv.py [input_bag_path] [output_folder_path]
185+ <details >
186+ <summary >3D Trajectory</summary >
187+ <img src =" sample_data/output_sample/3d_trajectory.png " >
188+ </details >
189+
190+ <details >
191+ <summary >X Y Z</summary >
192+ <img src =" sample_data/output_sample/xyz.png " >
193+ </details >
194+
195+ <details >
196+ <summary >X Y Z error</summary >
197+ <img src =" sample_data/output_sample/xyz_error.png " >
198+ </details >
199+
200+ <details >
201+ <summary >2D Error</summary >
202+ <img src =" sample_data/output_sample/2d_error.png " >
203+ </details >
204+
205+ <details >
206+ <summary >3D Error</summary >
207+ <img src =" sample_data/output_sample/3d_error.png " >
208+ </details >
209+
210+ <details >
211+ <summary >Longitudinal Error</summary >
212+ <img src =" sample_data/output_sample/longitudinal_error.png " >
213+ </details >
214+
215+ <details >
216+ <summary >Lateral Error</summary >
217+ <img src =" sample_data/output_sample/lateral_error.png " >
218+ </details >
219+
220+ <details >
221+ <summary >Roll Pitch Yaw</summary >
222+ You can choose the unit of the vertical axis between radian and degree.
223+ <img src =" sample_data/output_sample/rpy.png " >
224+ </details >
225+
226+ <details >
227+ <summary >Roll Pitch Yaw Error</summary >
228+ You can choose the unit of the vertical axis between radian and degree.
229+ <img src =" sample_data/output_sample/rpy_error.png " >
230+ </details >
231+
232+ ### 2.2 Twist evaluation
233+
234+ A standard configuration file for twist evaluation consists of the following parts.
235+
236+ - Reference
237+ - Twist
238+ - Optional settings
239+
240+ It is required that the reference block should have the name of *** Reference*** and the names of result blocks should begin with *** Twist*** .
241+ When specifying the paths, it is recommended to use the absolute path.
242+ There is a sample YAML file at ` config/evaluation_twist.yaml ` .
243+ To create your own configuration file, just use the following templates,
244+
245+ <details >
246+ <summary >Template of Reference (click to expand)</summary >
247+
248+ ``` yaml
249+ Reference :
250+ # # Auxiliary info
251+ label : reference
252+ path : /path/to/reference/csv
253+
254+ # # Time
255+ separate_time_stamp : false # [true]:Set secs_stamp_column and nsecs_stamp_column / [false]:Set stamp_column
256+ # --------true--------#
257+ secs_stamp_column : 1
258+ nsecs_stamp_column : 2
259+ # --------false-------#
260+ stamp_column : 2
261+
262+ # # Position
263+ x_column : 4
264+ y_column : 5
265+ z_column : 6
266+
267+ # # Rotation
268+ use_quaternion : true # [true]:Set Quaternion / [false]:Set Euler
269+ # --------true--------#
270+ # Quaternion
271+ ori_x_column : 7
272+ ori_y_column : 8
273+ ori_z_column : 9
274+ ori_w_column : 10
275+ # --------false-------#
276+ # Euler
277+ use_radian : true # [true]:radian / [false]:degree
278+ roll_column : 7
279+ pitch_column : 8
280+ yaw_column : 9
281+
282+ # # Enu velocity
283+ use_enu_vel : false # [true]: use enu velocity / [false]: ignored
284+ vel_x_column : 0
285+ vel_y_column : 0
286+ vel_z_column : 0
287+
288+ # # Angular
289+ use_angular : false # [true]: use angular / [false]: ignored
290+ angular_x_column : 0
291+ angular_y_column : 0
292+ angular_z_column : 0
293+
294+ # GNSS quality
295+ use_gnss_qual : false # [true]: use GNSS quality / [false]: ignored
296+ gnss_qual : 10
207297` ` `
208298
209- ## Output graphs
210- Sample output graphs are shown below. You can test this evaluation script easily with the following command. All graphs are output in full HD.
211- ``` sh
212- $ cd localization_evaluation_toolkit/scripts
213- $ python3 main.py ../sample_data/config/sasashima_evaluation.yaml
299+ </details>
300+
301+ <details>
302+ <summary>Template of Twist (click to expand)</summary>
303+
304+ ` ` ` yaml
305+ Twist :
306+ # # Auxiliary info
307+ label : twist
308+ path : /path/to/twist/csv
309+
310+ # # Time
311+ separate_time_stamp : false # [true]:Set secs_stamp_column and nsecs_stamp_column / [false]:Set stamp_column
312+ # --------true--------#
313+ secs_stamp_column : 1
314+ nsecs_stamp_column : 2
315+ # --------false-------#
316+ stamp_column : 2
317+
318+ # # Linear
319+ linear_x_column : 4
320+ linear_y_column : 5
321+ linear_z_column : 6
322+
323+ # # Angular
324+ angular_x_column : 7
325+ angular_y_column : 8
326+ angular_z_column : 9
214327` ` `
215328
216- 1 . 2D Trajectory
329+ </details>
217330
218- ![ 2d_traj] ( /sample_data/output_sample/2d_trajectory.png )
331+ <details>
332+ <summary>Template of optional settings (click to expand)</summary>
219333
220- When you zoom in on the graph, you can see the correspondence.
221- ![ 2D_traj_zoom] ( /sample_data/output_sample/2d_trajectory_zoom.png )
334+ ` ` ` yaml
335+ # Trajectory graph numbering
336+ progress_info : 0 # [0]:off, [1]:number, [2]:time, [3]:ros time, [4]:distance
337+ interval : 0 # progress_info is [2]:second, [3]:second, [4]:meter
222338
223- 2 . 2D Error
339+ # Misc
340+ sync_time_threshold : 0.01 # Time threshold for judgment for time synchronization [s]
341+ leap_time : 0.0 # Offset correction for time synchronizatio [s]
342+ based_heading_angle : false # [true]:The heading angle is based on North / [false]:The heading angle is based on East (ros data)
343+ distance_length : 100 # Distance to calculate relative trajectory [m]
344+ distance_step : 50 # Calculate relative trajectories step [m]
345+ eval_step_max : 3.0 # Maximum value of error to be evaluated default [m]
224346
225- ![ 2d_error] ( /sample_data/output_sample/2d_error.png )
347+ # Font
348+ title_font_size : 14
349+ label_font_size : 10
350+ ticks_font_size : 8
226351
227- 3 . Height Error
352+ # Save
353+ save_figures : true
354+ save_extension_type : png # without "."
355+ save_dataframe : true
356+ output_directory : /path/to/output/directory
357+ ` ` `
228358
229- ![ height_error ] ( /sample_data/output_sample/height_error.png )
359+ </details>
230360
231- 4 . 3D Error
361+ and run with
232362
233- ![ 3d_error] ( /sample_data/output_sample/3d_error.png )
363+ ` ` ` sh
364+ $ cd localization_evaluation_toolkit
365+ $ python3 scripts/twist_main.py config/evaluation_twist.yaml
366+ ```
234367
235- 5 . Longitudinal Error
368+ ## 3. Sub-evaluation
236369
237- ![ longitudinal_error ] ( /sample_data/output_sample/longitudinal_error.png )
370+ ### 3.1 NDT performance
238371
239- 6 . Lateral Error
372+ Evaluation of TP, NVTL, execution time, iteration and error ellipse with ros2 bag files.
240373
241- ![ lateral_error] ( /sample_data/output_sample/lateral_error.png )
374+ The input rosbag file should contain the following (at least one) topic.
375+ ```
376+ /localization/pose_estimator/pose_with_covariance
377+ /localization/pose_estimator/nearest_voxel_transformation_likelihood
378+ /localization/pose_estimator/transform_probability
379+ /localization/pose_estimator/exe_time_ms
380+ /localization/pose_estimator/iteration_num
381+ ```
382+
383+ ``` sh
384+ $ cd localization_evaluation_toolkit/sub_scripts
385+ $ source ~ /xxxxxx/install/setup.bash
386+ $ python3 sub_ndt_evaluation.py [bag_path] [output_folder_path]
387+ ```
242388
243- 7 . Roll Pitch Yaw
389+ ### 3.2 Eagleye log evaluation
244390
245- You can choose the unit of the vertical axis between radian and degree.
246- ![ rpy] ( /sample_data/output_sample/rpy.png )
391+ Currently, refer to [ the original doc page] ( https://github.com/MapIV/eagleye/tree/main-ros1/eagleye_util/trajectory_plot#eagleye_pp_single_evaluation ) for details.
247392
248- 8 . Roll Pitch Yaw Error
393+ ### 3.3 Covariance file generation
249394
250- You can choose the unit of the vertical axis between radian and degree.
251- ![ rpy_error] ( /sample_data/output_sample/rpy_error.png )
395+ Create a CSV file with covariance columns from rosbag file. In detail, refer to [ qiita article] ( https://qiita.com/koki2022/items/148d56e0f8eee45a0a62 ) for details.
396+
397+ ``` sh
398+ $ cd localization_evaluation_toolkit/sub_scripts
399+ $ python covariance_to_csv.py [input_bag_path] [output_folder_path]
400+ ```
0 commit comments