ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
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 -0500

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 image Choco93  ( 2019-10-22 07:21:02 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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 image wintermute  ( 2019-10-22 10:48:34 -0500 )edit

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

Choco93 gravatar image Choco93  ( 2019-10-23 02:01:42 -0500 )edit

Question Tools

2 followers

Stats

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

Seen: 320 times

Last updated: Oct 22 '19