[ros-users] Node Handle details

joan_perez jnperez at iri.upc.edu
Thu Dec 23 01:20:59 UTC 2010


Thanks again for your answers, but there are still some things I do not get.
>
>
> On Tue, Dec 21, 2010 at 5:55 PM, Josh Faust <jfaust at willowgarage.com>
wrote:
>>> I use ros::init() to specify the node namespace.
>> ros::init() specifies the node's name, not its namespace.  The node's
name
>> determines where a private name ("~name") goes.
>
My bad then, I missunderstood the node name with its namespace. The only
way to add a namespace to the node is through a node handle then?

> Plus, it's better not to use the node name when advertising topics to
other nodes. In complex roslaunch scenarios, node names are likely to be
changed in the launch file. So, other nodes should rely on
> well-known topic names, not on guessing the node name.
>
> Several alternate implementations may advertise the same topic. For
example, many camera drivers advertise "camera/image_raw" and
> "camera/camera_info". If there is more than one camera, each will be
pushed down into its own namespace: "front/camera/image_raw", etc.
Consumers of the images need not worry about which device driver sends
them.
That was exactly the problem I found, many instances from a same node may
be executed at the same time trying to advertise the same topic. That is
the main reason I wanted to use namespaces.
I do not think I understood the camera example. When you say topics will
be pushed down, you mean if the developer explicity uses the node
namespace?
I can not see either, how consumers connected to the previously named
topic "camera/image_raw" can resolve the topic name if there is no
additional information (like I wanted to connect to the front camera
instead of the back one).

I hope I expressed myself correctly.
> --
>  joq
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>
> ______________________________________
> View message @
> http://ros-users.122217.n3.nabble.com/Node-Handle-details-tp2126850p2129313.html
>
> To unsubscribe from Node Handle details, visit
> http://ros-users.122217.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2126850&code=am5wZXJlekBpcmkudXBjLmVkdXwyMTI2ODUwfDE4ODQ4Nzc2NDQ=




-- 
View this message in context: http://ros-users.122217.n3.nabble.com/Node-Handle-details-tp2126850p2134341.html
Sent from the ROS-Users mailing list archive at Nabble.com.



More information about the ros-users mailing list