Skip to content

Replace rosbag2_cpp typesupport helpers with rclcpp typesupport helpers#105

Merged
facontidavide merged 5 commits intoPlotJuggler:mainfrom
authaldo:fix_rosbag2_typesupport
Apr 20, 2026
Merged

Replace rosbag2_cpp typesupport helpers with rclcpp typesupport helpers#105
facontidavide merged 5 commits intoPlotJuggler:mainfrom
authaldo:fix_rosbag2_typesupport

Conversation

@authaldo
Copy link
Copy Markdown
Contributor

Hey @facontidavide ,

first of all thanks for making such an amazing tool availabe as open source!

While trying to update a docker image for Jazzy, I stumbled upon an issue that the plotjuggler ros plugins currently do not build against the current jazzy branch.
More specifically, this backported commit removed the typesupport helpers header from rosbag2_cpp. Consequently, I replaced them the same way they did it in the rosbag repository (with their rclcpp equivalent).

I solely tested this against Jazzy as that is the only version I am currently using , but given it is a backported commit I assume rolling to face the same problem. Not sure about older versions.

@facontidavide
Copy link
Copy Markdown
Contributor

does it work in Humble?

@facontidavide
Copy link
Copy Markdown
Contributor

as expected (see CI), this change is not backcompatible with Humble.

If you fix it, I will be happy to merge it

@authaldo
Copy link
Copy Markdown
Contributor Author

What would be your preferred way to fix this?

I like the fact that this repository has a single main branch compatible with all active ROS versions. However, since the change doesn't seem to be backported to Humble, these versions have already diverged with respect to the changed header (humble contains the header, while e.g. for jazzy the file has been removed.
Honestly, I would have expected to see this in failing jazzy and rolling pipelines on the current main, however, it may be that the change hasn't found its way into the latest images yet? Or am I missing something else? 🤔

In my view there are a few options:
a) try to achieve a humble backport of the typesupport_helper commit so that all three active versions share this change (not sure whether this is possible)
b) create a separate humble branch without this MR
c) detect the ROS version in the plugin code and handle the difference there

@facontidavide
Copy link
Copy Markdown
Contributor

facontidavide commented Dec 28, 2025

Humble is detected by cmake and a defintion is added to compile code conditionally.

https://github.com/PlotJuggler/plotjuggler-ros-plugins/blob/main/src/CMakeLists.txt#L50-L54

Therefore, a clear approach would be hide those functions behing our own, and internally use #ifdef to use one implementation or the other.

Anyway, as long as CI is happy and there are no conflict, I will be happy to merge

Signed-off-by: Dominik Authaler <dominik.authaler@uni-ulm.de>
…pp::get_typesupport_handle

Signed-off-by: Dominik Authaler <dominik.authaler@uni-ulm.de>
Signed-off-by: Dominik Authaler <dominik.authaler@uni-ulm.de>
@authaldo authaldo force-pushed the fix_rosbag2_typesupport branch 2 times, most recently from 3dc6149 to fe30da2 Compare January 8, 2026 16:24
Signed-off-by: Dominik Authaler <dominik.authaler@uni-ulm.de>
@authaldo authaldo force-pushed the fix_rosbag2_typesupport branch from fe30da2 to 0c1710d Compare January 8, 2026 16:28
@facontidavide
Copy link
Copy Markdown
Contributor

pre-commit :)

Signed-off-by: Dominik Authaler <dominik.authaler@uni-ulm.de>
@authaldo
Copy link
Copy Markdown
Contributor Author

CI should be fine now, please let me know if anything else is missing :)

@wentasah
Copy link
Copy Markdown
Contributor

Is there something preventing the merge of this PR? It would fix the build failure in rolling, which will soon be released as lyrical (I think).

@facontidavide facontidavide merged commit 63e6e28 into PlotJuggler:main Apr 20, 2026
4 checks passed
@authaldo
Copy link
Copy Markdown
Contributor Author

Thanks @wentasah for bringing this up again, I had almost forgotten about this PR.

I just discovered that the CI for the main branch is failing (just after the merge) and am not yet fully sure how that relates to my changes. It seems like the CI hasn't been triggered again before the merge, only afterwards.
Thus, the green CI has potentially been over two months old.

Nonetheless, the log output of the jobs is a bit weird:
For the rolling job, the failure to find ament_package indicates in my view a more general problem with the CI, as that part hasn't been touched in the changes.

The humble failure however directly relates to the changes, as it seems like the wrong branch is chosen within the wrapper file. Not sure why that happens, since the log output from within cmake correctly identifies the humble env, and the mechanism with the define had already worked in the PR CI.
Additionally, I am not able to reproduce the failure against the osrf/ros:humble-desktop image 🤔

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants