Advertising new publisher after first spin in rosserial_windows
Apologies for the stupid question, but I'm still trying to grasp the basic concepts of rosnodes.
Is it possible to advertise a new publisher after the first spin? I'm currently using rosserial_windows and advertising a "late" publisher/topic results in a "Received message with unrecognized topic" warning and the new topic does not show in rostopic list. Is this a built-in limitation of ros nodes?
Just to be clear here's the order of execution:
Initialize connection
Advertise publishers/services
spinOnce
Publish a message + spinOnce (x 100)
Advertise new publisher + spinOnce
New topic does not show up, throws warning: "Received message with unrecognized topic"
Thank you!
Not an answer, but please realise that you cannot consider anything
rosserial
as representative of the "basic concepts of rosnodes".rosserial
implements a specialised subset, and has to deal with the restrictions of resource constrained platforms, which has led to some design decisions that .... resulted in sometimes rather different behaviour and API.
Creating publishers and subscribers can be done at any time in 'normal ROS', but
rosserial
might have to do some special initialisation that requires a specific temporal ordering.Thank you! That clears up a lot of things.