KevinLADLee / carla_dataset_tools

Tools for dataset generation based on CARLA simulator. (Data Collector)
GNU Affero General Public License v3.0
107 stars 21 forks source link

The error of branch fix_3dbbox #2

Closed MiaoRain closed 2 years ago

MiaoRain commented 2 years ago

Hi, Kevin, when I run python3 label_tools/kitti_objects_label.py -r record_2022_0308_1237 with branch fix_3dbbox,got the following error. Any idea about this? Thanks!

File "/home/tool/0kitti/Kitti_dataset_from_carla_sim/carla_dataset_tools-fix_3dbbox/label_tools/kitti_object/kitti_object_helper.py", line 46, in transform_o3d_bbox
    o3d_bbox = o3d.geometry.OrientedBoundingBox.create_from_points(o3d_vps_new)
RuntimeError: QH6114 qhull precision error: initial simplex is not convex. Distance=-8.6e-15

While executing:  | qhull Qt
Options selected for Qhull 2018.0.1.r 2018/12/28:
  run-id 51249400  Qtriangulate  _pre-merge  _zero-centrum  _max-width 2.2
  Error-roundoff 2.7e-13  _one-merge 1.9e-12  _near-inside 9.4e-12
  Visible-distance 5.4e-13  U-max-coplanar 5.4e-13  Width-outside 1.1e-12
  _wide-facet 3.2e-12  _narrow-hull 2.6e-11

precision problems (corrected unless 'Q0' or an error)
      2 zero divisors during back substitute

The input to qhull appears to be less than 3 dimensional, or a
computation has overflowed.

Qhull could not construct a clearly convex simplex from points:
- p2(v3): -2e+02 1.2e+02  -2.4
- p3(v2): -2e+02 1.2e+02  -1.1
- p0(v1): -2e+02 1.2e+02  -2.4
- p1(v0): -2e+02 1.2e+02  -2.4

The center point is coplanar with a facet, or a vertex is coplanar
with a neighboring facet.  The maximum round off error for
computing distances is 2.7e-13.  The center point, facets and distances
to the center point are as follows:

center point   -204.1    124.3   -2.063

facet p3 p0 p1 distance= -1.4e-15
facet p2 p0 p1 distance= -1.4e-15
facet p2 p3 p1 distance= -1.4e-15
facet p2 p3 p0 distance= -4e-06

These points either have a maximum or minimum x-coordinate, or
they maximize the determinant for k coordinates.  Trial points
are first selected from points that maximize a coordinate.

The min and max coordinates for each dimension are:
  0:    -204.1  -2.225e-308  difference= 204.1
  1:     122.6     124.8  difference= 2.209
  2:    -2.376  -2.225e-308  difference= 2.376

If the input should be full dimensional, you have several options that
may determine an initial simplex:
  - use 'QJ'  to joggle the input and make it full dimensional
  - use 'QbB' to scale the points to the unit cube
  - use 'QR0' to randomly rotate the input for different maximum points
  - use 'Qs'  to search all points for the initial simplex
  - use 'En'  to specify a maximum roundoff error less than 2.7e-13.
  - trace execution with 'T3' to see the determinant for each point.

If the input is lower dimensional:
  - use 'QJ' to joggle the input and make it full dimensional
  - use 'Qbk:0Bk:0' to delete coordinate k from the input.  You should
    pick the coordinate with the least range.  The hull will have the
    correct topology.
  - determine the flat containing the points, rotate the points
    into a coordinate plane, and delete the other coordinates.
  - add one or more points to make the input full dimensional.

"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "label_tools/kitti_objects_label.py", line 223, in <module>
    main()
  File "label_tools/kitti_objects_label.py", line 219, in main
    kitti_obj_label_tool.process()
  File "label_tools/kitti_objects_label.py", line 59, in process
    thread_pool.starmap(self.process_frame, self.rawdata_df.iterrows())
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 372, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 771, in get
    raise self._value
RuntimeError: QH6114 qhull precision error: initial simplex is not convex. Distance=-8.6e-15

While executing:  | qhull Qt
Options selected for Qhull 2018.0.1.r 2018/12/28:
  run-id 51249400  Qtriangulate  _pre-merge  _zero-centrum  _max-width 2.2
  Error-roundoff 2.7e-13  _one-merge 1.9e-12  _near-inside 9.4e-12
  Visible-distance 5.4e-13  U-max-coplanar 5.4e-13  Width-outside 1.1e-12
  _wide-facet 3.2e-12  _narrow-hull 2.6e-11

precision problems (corrected unless 'Q0' or an error)
      2 zero divisors during back substitute

The input to qhull appears to be less than 3 dimensional, or a
computation has overflowed.

Qhull could not construct a clearly convex simplex from points:
- p2(v3): -2e+02 1.2e+02  -2.4
- p3(v2): -2e+02 1.2e+02  -1.1
- p0(v1): -2e+02 1.2e+02  -2.4
- p1(v0): -2e+02 1.2e+02  -2.4

The center point is coplanar with a facet, or a vertex is coplanar
with a neighboring facet.  The maximum round off error for
computing distances is 2.7e-13.  The center point, facets and distances
to the center point are as follows:

center point   -204.1    124.3   -2.063

facet p3 p0 p1 distance= -1.4e-15
facet p2 p0 p1 distance= -1.4e-15
facet p2 p3 p1 distance= -1.4e-15
facet p2 p3 p0 distance= -4e-06

These points either have a maximum or minimum x-coordinate, or
they maximize the determinant for k coordinates.  Trial points
are first selected from points that maximize a coordinate.

The min and max coordinates for each dimension are:
  0:    -204.1  -2.225e-308  difference= 204.1
  1:     122.6     124.8  difference= 2.209
  2:    -2.376  -2.225e-308  difference= 2.376

If the input should be full dimensional, you have several options that
may determine an initial simplex:
  - use 'QJ'  to joggle the input and make it full dimensional
  - use 'QbB' to scale the points to the unit cube
  - use 'QR0' to randomly rotate the input for different maximum points
  - use 'Qs'  to search all points for the initial simplex
  - use 'En'  to specify a maximum roundoff error less than 2.7e-13.
  - trace execution with 'T3' to see the determinant for each point.

If the input is lower dimensional:
  - use 'QJ' to joggle the input and make it full dimensional
  - use 'Qbk:0Bk:0' to delete coordinate k from the input.  You should
    pick the coordinate with the least range.  The hull will have the
    correct topology.
  - determine the flat containing the points, rotate the points
    into a coordinate plane, and delete the other coordinates.
  - add one or more points to make the input full dimensional.
KevinLADLee commented 2 years ago

fixed in #3