VIS4ROB-lab / HyperSLAM

Modular, open-source implementations of continuous-time simultaneous localization and mapping algorithms.
BSD 3-Clause "New" or "Revised" License
228 stars 12 forks source link

stereo_inertial error #11

Open zzwu29 opened 1 year ago

zzwu29 commented 1 year ago

Thanks for your great work! But I have a question, could you please help me solve it? When I run stereo settings, all is ok

python run.py stereo --datasets euroc --sequences MH_01_easy

But with the stereo_inertial setting, I cannot get the right output

python run.py stereo_inertial --datasets euroc --sequences MH_01_easy

图片 Finally, I cannot find the script comparison.py to compare multiple result folders with the above layout.

Thank you!

WuZihao12 commented 1 year ago

Hi, can you run stereo-inertial mode correctly? I can't run it correctly

WuZihao12 commented 1 year ago

@zzwu29

zzwu29 commented 1 year ago

Hi, can you run stereo-inertial mode correctly? I can't run it correctly

Sorry, I can't. If you have a method, please contact me.

JzHuai0108 commented 1 month ago

I am grappling with the same problem. Have you folks conquer this pitfall?

ZzhYgwh commented 4 days ago

I am also running the stereo + IMU version, but there is also an error, which seems to come from optimizer.cpp:

auto CeresOptimizer::updateSensor(IMU& / imu /, const Range& / range /) -> void { CHECK(false); }

Backtracking this function, I can be found:

auto AbstractOptimizer::process(const InertialMeasurement& message) -> void { // Fetch parameters. const auto& stamp = message.stamp(); auto& imu = const_cast<IMU&>(message.sensor());

// Update gyroscope bias. const auto& gyroscope_bias = imu.gyroscopeBias(); const auto& accelerometer_bias = imu.accelerometerBias(); if (gyroscope_bias.elements().empty() || accelerometer_bias.elements().empty() || !gyroscope_bias.range().contains(stamp) || !accelerometerbias.range().contains(stamp)) { updateSensor(imu, window); } DCHECK(gyroscope_bias.range().contains(stamp)); DCHECK(accelerometer_bias.range().contains(stamp));

// Create observation and residual. auto& observation = mutableEnvironment().addInertialMeasurement(message); add(observation); }

Although I haven't read the entire project file, I feel that this is the content of the IMU update, so I suspect that the current version of the code has not yet released the inertia content. The author should have left an interface, and the assertion failed when the interface was called, which may be the reason for the error. I hope the author can open source this part. If the above statement is wrong, please correct it!