ros-drivers / flir_ptu

ROS driver for FLIR pan-tilt units
http://wiki.ros.org/flir_ptu_driver
14 stars 35 forks source link

BUG - flir_ptu_driver/src/node.cpp spin callback not respecting requested rate #27

Open marklewis3000 opened 8 years ago

marklewis3000 commented 8 years ago

EASY FIX: change the integer '1' to double '1.0'

The spincallback is occurring as fast as it can without sleeping, hundreds of times a second, resulting in too many JointState messages and increasing processor/network load.

This is because the parameter to "createTimer(ros::Duration(1 / hz)" incorrectly evaluates to an integer which will be '0'. The createTimer() parameter is supposed to be a double.

Instead the '1 / hz' should be '1.0 / hz' to make it evaluate to a 'double'. Change the '1' to '1.0'