cartographer-project / point_cloud_viewer

View billions of points in your browser.
Apache License 2.0
339 stars 98 forks source link

Assertion fails on node_drawer.rs:35 #298

Closed Ellon closed 5 years ago

Ellon commented 5 years ago

Hi all,

I managed to compile build_octree and sdl_viewer, and I created a octree directory from my .ply file. But when I try to visualize it with sdl_viewer I get the following error:

[mellon@mellon-hp loc_acquisition_2019-05-28-08-10-36.velodyne_only.octree]$ RUST_BACKTRACE=1 ~/Source/google/point_cloud_viewer/target/release/sdl_viewer .
Currently visible nodes: 3927, time to calculate: 2.710629ms
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `5001`,
 right: `6668`', sdl_viewer/src/node_drawer.rs:35:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::continue_panic_fmt
   6: std::panicking::begin_panic_fmt
   7: sdl_viewer::node_drawer::reshuffle
   8: sdl_viewer::node_drawer::NodeViewContainer::consume_arrived_nodes
   9: sdl_viewer::PointCloudRenderer::draw
  10: sdl_viewer::run
  11: sdl_viewer::main
  12: std::rt::lang_start::{{closure}}
  13: std::panicking::try::do_call
  14: __rust_maybe_catch_panic
  15: std::rt::lang_start_internal
  16: main
  17: __libc_start_main
  18: _start

As you can see it seems to come from the parameters given to the reshuffle function.

For info I'm using Fedora 29, and I installed all the required packages using dnf: rust, protobuf-compiler, golang, cmake, SDL2, and SDL2-devel. Rust gRPC protobuf plugin was intalled using cargo install grpcio-compiler as indicated in the README. The symbolic link on target/protobuf/bin/protoc to the systems protoc is set. The local cargo environment is added to my PATH:

[mellon@mellon-hp loc_acquisition_2019-05-28-08-10-36.velodyne_only.octree]$ echo $PATH | tr ':' '\n' | grep cargo
/home/mellon/.cargo/bin

And I'm using Rust 1.35.0:

[mellon@mellon-hp loc_acquisition_2019-05-28-08-10-36.velodyne_only.octree]$ rustc --version
rustc 1.35.0

Any ideas on how to solve this ?

feuerste commented 5 years ago

Hi Ellon, sorry to hear you ran into problems. Just 2 hours ago we fixed a severe bug affecting octree generation (see #296). Can you please try build_octree again and see if it now works?

Ellon commented 5 years ago

Hi @feuerste,

Thanks for your reply.

Indeed I was one commit behind the one that fixed this bug (bad timing for a git clone :laughing: ). It seems to work fine now. :) Thanks !