ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

what does advertising topics mean?

asked 2015-01-08 02:15:48 -0600

Akali gravatar image

i just do command rosbag play -d 4 <bagfile name="">

then commend window print this : Waiting 4 seconds after advertising topics..

i dont get what does 'advertising topic' mean.

plz somebody let me know clearly

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2015-01-08 03:24:51 -0600

updated 2015-01-08 03:25:31 -0600

Rosbag is telling you that in 4 seconds after all the publishers are created, it will start to publish the data. This delay will allow all the XMLRPC handshake to be done by the subscribers. In pseudo code that look like this :

Nodehandle n
pub = n.advertise("topic")
sleep(4)
while(data to publish in bag file) {
 pub.publish(data);
 sleep(nextDataDate-now);
}

In the Talker / Listener sample here) the takler "advertise" roscore that a topic exists...

When Node Talker Advertise that a topic exists, it is equivalent to say : "Hi roscore, I am Node "Talker", and I publish a data called "chatter", if some one is interested (subscribing) for this data, I am reachable on this URI "...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-01-08 02:15:48 -0600

Seen: 2,037 times

Last updated: Jan 08 '15