Ask Your Question
0

can we make the imu_tools complementary filter output at a slower rate than the filter input

asked 2019-10-22 05:56:21 -0600

wintermute gravatar image

Hello,

I made a complementary filter, getting data from my imu board at 400 hz. and outputting the results at 400hz.

I feed that data to robot_pose_ekf, along with odom data, and it works. What I am having trouble with is that, when I visualize the imu messages on rviz, I get stale data warnings from time to time. basically rviz is running on my laptop, and imu filter is running on the RPI, connected over the network, so because of the network lag, some messages do delay and I get status errors.

If I lover the sensor board output frequency to 50hz, I get no errors.

Is there a way to reduce the output rate of the imu_complementary_filter? Just for visualization? I can of course listen on the output data, then republish 1 out of N messages to reduce speed, but is there any other way that can be used for this kind of situation?

Best regards. Can

edit retag flag offensive close merge delete

Comments

Why don't you just modify your node to publish at 50 hz? You can take mean of four readings and publish one.

Choco93 gravatar imageChoco93 ( 2019-10-22 07:21:02 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-10-22 06:20:15 -0600

gvdhoorn gravatar image

The topic_tools/throttle node(let) can throttle topics for you based on bandwidth and max desired rate.

I don't completely understand your question, but perhaps that node could be helpful here.

edit flag offensive delete link more

Comments

@gvdhoorn thank you thats exactly what I needed. (although I had written a simple script to do the same, i will redo it now with throttle)

@Choco93 my node outputs imu readings, angular velocity and orientation, as a querternion. I wonder if there is any way to average those? angular velocity would be easy, but I am not sure how to average quarternions, or if that would be feasible (in terms of orientation calculation)

Best regards, and than you to both. -Can

wintermute gravatar imagewintermute ( 2019-10-22 10:48:34 -0600 )edit

@wintermute are you getting quaternions from your IMU or are you converting rpy into quaternions yourself?

Choco93 gravatar imageChoco93 ( 2019-10-23 02:01:42 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-10-22 05:56:21 -0600

Seen: 8 times

Last updated: Oct 22