ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

UKF vs EKF performance

asked 2019-08-27 14:58:07 -0500

mugetsu gravatar image

I hear alot about how UKF is better than EKF at the cost of CPU usage. How much are we talking about here in terms of the robot_localization ekf and ukf nodes?

edit retag flag offensive close merge delete

Comments

1

What metrics are you looking for? These are really well documented algorithms used across many industries. I'd recommend consulting research and benchmark papers. This isn't specific to robot localization.

stevemacenski gravatar image stevemacenski  ( 2019-08-27 17:11:31 -0500 )edit

@stevemacenski:

at the cost of CPU usage

so it would appear the metric OP is interested in is "CPU usage".

gvdhoorn gravatar image gvdhoorn  ( 2019-08-28 03:05:45 -0500 )edit

For most localization methods I would expect these things to be use-case specific. It is probably true that you can rank methods from heavy on the CPU to lightweight, but depending on the size of your map, amount of landmarks/features your sampling methods etc. the differences between methods will change. I don't think you'll find an easy answer to this question (besides collecting your own empirical results). If you don't want to perform real life testing or simulation then at least provide us with more information about your use-case. This way people that have experimented with these methods before using similar setups may be able to provide you with some rough estimates.

MCornelis gravatar image MCornelis  ( 2019-08-28 04:56:05 -0500 )edit

For most localization methods I would expect these things to be use-case specific. It is probably true that you can rank methods from heavy on the CPU to lightweight, but depending on the size of your map, amount of landmarks/features your sampling methods etc. the differences between methods will change.

Slightly off-topic, but: big-O analysis and similar methods can definitely be used to express the (runtime) complexity of algorithms, without having to use benchmarking. It would allow to compare algorithms based on their input sizes (ie: "size of your map, amount of landmarks/features your sampling methods etc") and say something about which would outperform which.

Whether that exists for these specific algorithms is something else.

gvdhoorn gravatar image gvdhoorn  ( 2019-08-28 05:31:52 -0500 )edit

This is true but I don't think the difference between UKF and EKF is of that magnitude (I could be wrong here), if one would be O(n) and the other O(n^2) for instance, then yes of course you could get a pretty good idea based on the size of your input.

MCornelis gravatar image MCornelis  ( 2019-08-28 06:33:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-10-23 08:34:46 -0500

peci1 gravatar image

updated 2022-10-23 08:35:41 -0500

I just ran a test on 10th-get Nuc i7 computer and the performance requirements of ekf_localization_node vs ukf_localization_node are negligible. I use the same config for both, just change the nodes. I have one input IMU topic @100 Hz and one input 2D odometry @15 Hz in the testcase. Output frequency is set to 50 Hz. two_d_mode is false.

Both EKF and UKF use 5.3 % +- 1 % of one CPU core on average.

EKF rostopic delay stats:average delay: 0.021 min: 0.001s max: 0.050s std dev: 0.01381s window: 200

UKF rostopic delay stats:average delay: 0.025 min: 0.005s max: 0.054s std dev: 0.01379s window: 200

Maybe on a less performant computer like Raspberry pi, the results would differ more. But for the strong computers, there is really no difference.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-08-27 14:58:07 -0500

Seen: 520 times

Last updated: Oct 23 '22