Ask Your Question
1

is it possible to use a nodelet manager across multiple namespaces?

asked 2020-05-20 19:11:58 -0500

mugetsu gravatar image

I want to launch multiple cameras as nodelets and have them share the same nodelet manager. The idea is that my slam package will also launch as a nodelet under this same manager. It would be very efficient passing the image data to slam this way.

However, cameras usually are launched as individual namespaces. I am not able to get my nodelet manager to work unless all my nodelets are in the same namespaces. It doesn't even work even if the nodelet manager is in a parent namespace and the nodelets are in a child namespace.

is there a way to get past this or is it impossible to achieve what I want here? I've only seen examples so far of nodelet managers for each camera

edit retag flag offensive close merge delete

Comments

I think you just need to remap the topics for the inputs and outputs for each to be correct. Its hard to say without seeing configuration / code, but I want to say from experience, that its just a game of making sure that all the namespaces are remapped for the ins and outs, and maybe using the leading / for global to on inputs to make sure you can get them.

stevemacenski gravatar image stevemacenski  ( 2020-05-20 20:44:39 -0500 )edit

@mugetsu have you figured out a way how to do this?

Mehdi. gravatar image Mehdi.  ( 2021-04-22 11:42:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-04-23 09:48:31 -0500

Mehdi. gravatar image

The way I made it work is by specifying the full path to the nodelet manager when loading a nodelet from a namespace

for example

<node pkg="nodelet" type="nodelet" name="my_nodelet_manager" args="manager" cwd="node" output="screen" />

<group ns="camera1">
  <node node pkg="nodelet" type="nodelet" name="my_nodelet" args="load pkg_name/nodelet_name /my_nodelet_manager" />
</group>

adding the slash in front of my_nodelet_manager in the nodelet loading command will make sure it won't look for the nodelet manager inside the namespace "camera1" but will try finding it using its global path. This also works with subnamespaces. If you want your camera and also the nodelet manager to be inside the slam namespace just do

<group ns="slam">
    <node pkg="nodelet" type="nodelet" name="my_nodelet_manager" args="manager" cwd="node" output="screen" />
    <group ns="camera1">
      <node node pkg="nodelet" type="nodelet" name="my_nodelet"
       args="load pkg_name/nodelet_name /slam/my_nodelet_manager" />
    </group>

</group>

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-05-20 19:11:58 -0500

Seen: 86 times

Last updated: Apr 23