VIS4ROB-lab / HyperSLAM

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

stereo_inertial error #11

Closed zzwu29 closed 3 months 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 6 months ago

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

ZzhYgwh commented 4 months 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!

McEmzi commented 3 months ago

@ZzhYgwh is correct in assuming that the IMU support would have been added (or rather ported) in a future patch. Compared to its original internal version, HyperSLAM underwent extensive structural remodeling before its release, resulting in the sub-repositories now available on GitHub. However, development on HyperSLAM has largely been discontinued due to limited resources and manpower.

Attached, you will find the exact original version of HyperSLAM used for our evaluations (to the best of my knowledge). Please note, however, that its overall structure significantly differs from the publicly available version and is provided as is.

HyperDevelop-IROS2022.zip

In favor of further developing HyperSLAM, we shifted our focus to eliminating the associated complexity of spline residual evaluations altogether as well as implementing a distributed optimization framework. The soon-to-be-released Hyperion includes far superior auto-generated residual/cost implementations which you might find helpful to quickly develop a continuous-time pipeline tailored to your needs.