Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Are these variables allocate twice, because I start the nodelet twice, or does one nodelet overwrite the other?

Assuming you didn't use any "tricks", so use standard member variables: each nodelet is independent of another, so each gets their own instance of your variables.

Are these variables allocate twice, because I start the nodelet twice, or does one nodelet overwrite the other?

Assuming you didn't use any "tricks", so use standard member variables: each nodelet is independent of another, so each gets their own instance of your variables.

This is no different from other C++ classes you write: each object gets its own instance of all member variables. Nothing is shared, unless you specifically set things up such that they are.

Are these variables allocate twice, because I start the nodelet twice, or does one nodelet overwrite the other?

Assuming you didn't use any "tricks", so use standard member variables: each nodelet is independent of another, so each gets their own instance of your variables.

This is no different from other C++ classes you write: each object gets its own instance of all member variables. Nothing is shared, unless you specifically set things up such that they are.


Edit:

I run two nodelets of the same name.

Did you intend to write "of the same type"?