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

Nodelets from 2 different pkg

asked 2019-10-16 06:25:21 -0500

listenreality gravatar image

Hi. How Can I use different node as a nodelet in my pkg?

For example, I have two pkg: first: just pkg, just node, without nodelet. second: nodelet pkg. And I want to include node from first pkg as a nodelet.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-10-16 06:42:42 -0500

gvdhoorn gravatar image

updated 2019-10-17 02:09:53 -0500

How Can I use different node as a nodelet in my pkg?

Nodes cannot be used as nodelets. So what you ask is not supported right now.

Whether something is a node or a nodelet is a programming-time decision (ie: there are different ways in which you create a node or a nodelet). This cannot be changed in ROS 1.

If however you are asking whether it's possible to load a nodelet from another package, then that would be fully supported. If you could clarify we can address that question.


Edit:

So, it means: one nodelet manager = one pkg. Cannot include nodelet from other pkg?

from your edit it would appear you're actually interested in loading nodelets from other packages.

That is fully supported. Nodelets are "just" plugins (literally: they're stored in .so (shared libraries)).

As long as the nodelets you want to load into a manager are on the search path (ie: part of your workspace, or any of its underlays) you can load them.

edit flag offensive delete link more

Comments

Want to clarify " This cannot be changed" you can change package 1 to be a nodelet if you want, it requires some programming but shouldn't be too hard then you can do as they've described. But to echo, what the user is asking for is not possible.

stevemacenski gravatar image stevemacenski  ( 2019-10-16 13:13:13 -0500 )edit
1

Of course, everything can be changed. But that could very well require non-trivial effort.

And you're assuming that you have access to the source. Which may not actually be true.

My answer was an answer for the general question as stated by the OP: "how can I use a [different] node as a nodelet?"

gvdhoorn gravatar image gvdhoorn  ( 2019-10-16 14:27:47 -0500 )edit

So, it means: one nodelet manager = one pkg. Cannot include nodelet from other pkg?

listenreality gravatar image listenreality  ( 2019-10-16 21:39:21 -0500 )edit
1

one nodelet manager can load any nodelet from any package. Any nodelet manager cannot load any node

stevemacenski gravatar image stevemacenski  ( 2019-10-16 21:42:49 -0500 )edit

thank you all for help!

listenreality gravatar image listenreality  ( 2019-10-16 21:54:35 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-10-16 06:25:21 -0500

Seen: 151 times

Last updated: Oct 17 '19