You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using nodelets, I discovered that the API does not provide a method for returning a nodelet object from the nodelet loader. Although such a method is not the proposed way to use nodelets, it would be very useful for unit testing nodelets with google tests.
method to instantiate the object, and to share that pointer with the unit tests. However it would be more elegant to be able to get the object (pointer) using a loader method.
The text was updated successfully, but these errors were encountered:
Unfortunately I don't have access to that code anymore.
If I remember correctly though, you must create a function that creates nodelets and create a loader providing that function.
In your function you can have a std::map or even an std::vector that, while instantiating the nodelet, also adds it to that structure.
From your app, you use that new loader to instantiate the nodelet, and you can access that structure to get your instance at any time.
While using nodelets, I discovered that the API does not provide a method for returning a nodelet object from the nodelet loader. Although such a method is not the proposed way to use nodelets, it would be very useful for unit testing nodelets with google tests.
Right now, the only way to do this is to use the
method to instantiate the object, and to share that pointer with the unit tests. However it would be more elegant to be able to get the object (pointer) using a loader method.
The text was updated successfully, but these errors were encountered: