while(ros :: ok) Dynamic publish
Hi All,
I am beginner in ROS, please excuse me if this question is silly.
I have the below snippet.
int main()
{
//Initialize and start the node
ros::Publisher pub;
//Define and create some messages
abc;
while(ros : ok)
{
ros_time = ros::time::now();
pub.publish(abc);
ros::spinOnce();
}
}
Now I need to update the abc every 5 ms and publish the updated one. Can anybody please tell me how this could be implemented.
Thank you. KK
Hey! Could you maybe first do the tutorials on creating C++ Publishers? It quite exactly shows you what you need to do.
@NEngelhard thank you.. Going through the tutorials..