throttle in topic_tools can not give me the rate I want
Dear all,
I have a node publishing Odom messages at 200Hz and I don't want to change this.
One of my subscriber can not handle the messages so fast so I use throttle
in topic_tools
to throttle the publisher at 100Hz.
The strange thing is that I only get 25Hz Odom_throttle(checked with rostopic hz
). So what's the problem?
I also noticed that if I defined my subscriber(listen to the 200Hz topic) like this
ros::Subscriber sub = nh.subscribe("odom", 1, odomCallback);
then I will also only get 25Hz result.
I have to define the subscriber as following to get 200Hz result:
ros::Subscriber sub = nh.subscribe("odom", 1, viconCallback, ros::TransportHints().tcpNoDelay());
Look forward to any help!
I also issue this at Github https://github.com/ros/ros_comm/issue...