Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

fix #1474 move bag encryption plugins into separate library#1499

Merged
dirk-thomas merged 3 commits intoros:melodic-develfrom
jalkino:fix-1474-nodelet-bag-encryption
Mar 28, 2019
Merged

fix #1474 move bag encryption plugins into separate library#1499
dirk-thomas merged 3 commits intoros:melodic-develfrom
jalkino:fix-1474-nodelet-bag-encryption

Conversation

@jalkino
Copy link
Copy Markdown
Contributor

@jalkino jalkino commented Sep 6, 2018

Moves the bag encryption plugins into a separate library, i.e. keep it out of librosbag_storage.so
This setup is required by pluginlib's class_loader, see http://wiki.ros.org/class_loader#Caution_of_Linking_Directly_Against_Plugin_Libraries

This fixes #1474 which was caused by librosbag_storage.so containing directly linked code (like rosbag:bag) and the encryption plugins. This setup is unsupported by class_loader. As described in the link, the class_loader tries to make it work anyway for backward compatibility by guessing where the factory object for the plugin was loaded from.
When using nodelets (which are plugins itself), the class_loader was guessing wrong and assigned the factory objects for the encryption plugins to the nodelet's .so library. This caused createInstance to fail because, according to encryptor_plugins.xml, the factory object should come from librosbag_storage.so

@jalkino
Copy link
Copy Markdown
Contributor Author

jalkino commented Sep 11, 2018

One check failed because the unit test __main__.RandomPlay.test_random_play failed. To me this seem unrelated to this PR, as this error occurred before in other PR's. It seems to be a random error / unstable test.
Can someone please re-trigger the build to check that? Thank you!

@C-NR
Copy link
Copy Markdown

C-NR commented Sep 26, 2018

For us at the autonomos group on the Dahlem Center for Machine Learning and Robotics this proposed fix works well. With it we are able to record and play back our bag files using ROS Melodic.

@sprickett
Copy link
Copy Markdown

I'm also using this fix at Createc to enable our recording and playback nodelet's under Melodic. I've not discovered any issues.

@dirk-thomas
Copy link
Copy Markdown
Member

@ros-pull-request-builder retest this please

@dseifert
Copy link
Copy Markdown

dseifert commented Dec 5, 2018

@dirk-thomas, any chance this PR could be merged and integrated for Melodic? It's been open for 3 months and multiple people confirmed that it works.

By the way, the "enhancement" label is a misclassification. This is not an enhancement, but a fix for a regression / bug in rosbag-storage. In my case the bug prevents multiple projects from actually working in Melodic, and was the biggest headache for our switch from Kinetic to Melodic.

Please let us know if there's anything we can do to assist in merging the pull request.

@dirk-thomas
Copy link
Copy Markdown
Member

Unfortunately I won't be able to look at this (and other ROS 1 tickets) before January.

@dirk-thomas dirk-thomas added the bug label Dec 5, 2018
@dseifert
Copy link
Copy Markdown

dseifert commented Jan 7, 2019

Time flies, happy new year, @dirk-thomas :-)

acowley referenced this pull request in KumarRobotics/multicam_calibration Jan 28, 2019
@dseifert
Copy link
Copy Markdown

Hi @dirk-thomas. Just a friendly reminder that this bug is still bothering (apparently quite a few) people that are using the rosbag API in nodelets. Please let me know if there's anything that I could do to assist in merging the pull request.

@dseifert
Copy link
Copy Markdown

Just to let everybody know that we are still using this pull-request on a regular basis as otherwise we can not use the rosbag API in a nodelet :-( It would be appreciated if somebody could accept the PR so this bug can finally be resolved.

@mikepurvis
Copy link
Copy Markdown
Member

This seems pretty harmless to me, and seems to work in our setup as well. I'll merge in 24h if there are no objections.

@dirk-thomas
Copy link
Copy Markdown
Member

The reason I hesitated to merge this earlier is that the patch does break API since it removed public API from a header. Though I guess it is not likely that external code uses the moved classes and if it does it should be fairly easy to address by changing an include.

Thanks for the patch.

@dirk-thomas dirk-thomas merged commit af0fbaa into ros:melodic-devel Mar 28, 2019
@dseifert
Copy link
Copy Markdown

Thank you!!

DLu pushed a commit to locusrobotics/ros_comm that referenced this pull request Apr 3, 2019
)

* fix ros#1474 move bag encryption plugins into separate library

This setup is required by the class_loader, which is part of the pluginlib, see  http://wiki.ros.org/class_loader#Caution_of_Linking_Directly_Against_Plugin_Libraries

* fix unit tests of aes_encryptor
@dirk-thomas
Copy link
Copy Markdown
Member

Please see #1687 which fixes a regression introduces with this patch.

DLu added a commit to locusrobotics/ros_comm that referenced this pull request Apr 5, 2019
tahsinkose pushed a commit to tahsinkose/ros_comm that referenced this pull request Apr 15, 2019
)

* fix ros#1474 move bag encryption plugins into separate library

This setup is required by the class_loader, which is part of the pluginlib, see  http://wiki.ros.org/class_loader#Caution_of_Linking_Directly_Against_Plugin_Libraries

* fix unit tests of aes_encryptor
@berndpfrommer
Copy link
Copy Markdown

How and when will this fix find its way into the standard Ubuntu Melodic packages?
I just upgraded all my melodic packages, but alas the ros_comm package is built on tag 1.14.3, which does not have the fix:
http://repositories.ros.org/status_page/ros_melodic_default.html
Could somebody please clarify?
Thanks!

@jonfink
Copy link
Copy Markdown
Contributor

jonfink commented Sep 5, 2019

Just a ping to find out what the plan is for this PR to hit updated packages on apt server?

Encountered this same issue integrating rosbag reading into an RVIZ panel today. Can confirm that compiling this version of rosbag_storage from source fixes the issue.

@dirk-thomas
Copy link
Copy Markdown
Member

How and when will this fix find its way into the standard Ubuntu Melodic packages?

The change is already on the melodic-devel branch so whenever a new release of this repo is being made it will be included. When that is going to happen is unclear and solely depends on having the necessary time to do so.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Declaring a rosbag::Bag member in a nodelet class leads to failure to launch the nodelet

8 participants