ros-perception / image_transport_plugins

A set of plugins for publishing and subscribing to sensor_msgs/Image topics in representations other than raw pixel data.
BSD 3-Clause "New" or "Revised" License
55 stars 120 forks source link

Disabling class_loader_hide_library_symbols() #152

Closed anilsripadarao closed 5 months ago

anilsripadarao commented 10 months ago

We need to call the CompressRVL() and DecompressRVL() functions directly. We need this as we would like to do the compression and publishing at different times/from different threads for performance issues. Disabling _class_loader_hide_librarysymbols() in the CMakeLists.txt would enable us to do this.

bmegli commented 10 months ago

No.

This is transport plugin, not general purpose library.

It should be loadable/unloadable at runtime.

See for example this commit of class loader


Hiding symbols also protects from falling into incorrect implementation at runtime

See for example here:

This should in general not happen with correctly written code


See also here:

bmegli commented 10 months ago

If you need to use CompressRVL() / DecompressRVL() the correct solution would be to:


But I also doubt you are diagnosing your problem correctly (or close enough)

bmegli commented 10 months ago

The problem you are facing likely is:

Now when driver gets data and processes it the total time it has available for frame is also limited by:


We need this as we would like to do the compression and publishing at different times/from different threads for performance issues.

The problem is typically

bmegli commented 10 months ago

We need this as we would like to do the compression and publishing at different times/from different threads for performance issues

You may achieve similar effect by using

Pros:

Cons:

bmegli commented 10 months ago

If the camera driver is written as nodelet:

I typically use image transport republish nodelet for that

anilsripadarao commented 10 months ago

OK, got it. Thanks for the clarification. Let me think about the other options.

ijnek commented 5 months ago

Closing, as problem explained above.