nao control rate [closed]
How can I reduce nao control rate in ros??
I use ros publisher "/cmd_vel"
like this,
ros::NodeHandle n; ros::Publisher cmd_pub = n.advertise<geometry_msgs::twist>("/cmd_vel", 1000);
while (ros::ok()) {
cmd_pub(msg); ros::getGlobalCallbackQueue()->callAvailable(ros::WallDuration(0.5));
}
so, my control rate is 0.5 seconds.
if I control nao for each 0.4 or 0.3 or less, nao ignore some order.
How can I reduce this interval? I already use spin() or spinOnce(), else(changing function).