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'
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'