Low frequency with robot_localization package
Hey, I've started to work with the robot localization package. My sensors are imu which is running at 100Hz Lidar at 10 Hz and a velocity sensor which is running at 20 Hz.
I want to run the EKF at a low frequency (1-5Hz) in order to save computation time. but I see that even if I'm lowering the frequency there is a queue that holds all my measurements and does to all of them the predict and update stages.
I'm looking for an efficient way to lower my frequency and save the computations. 1) Am I missing something? Is there a way to lower the EKF computations without damaging the filter performance? even if my sensors are running at high frequency? 2) Do you think that there is an efficient way to prepare my data in order to send it at a low frequency before I'm publishing it to the robot localization node?
Thanks!
Did you build this from source, or installed
.deb
s? If the former: were compiler optimisations enabled? They aren't by default in most cases. Math-heavy code tends to benefit quite heavily from optimisations.Thanks, Yes, I'm building it from the source. What kind of compiler optimizations do I have to enable? for now, I have
add_compile_options(-Wall -Wextra -Wpedantic)
should I add more?Those are flags that enable compiler diagnostics (ie: warnings and errors). They do not influence optimisation.
To build a ROS CMake-based package with optimisations, it should be enough to add
-DCMAKE_BUILD_TYPE=Release
to thecatkin_make
orcatkin build
command line (orRelWithDebInfo
if you'd still like debug info to be added to the binary).