I think the problem with jetson is that there are 2 opencv installed, one used by ROS (containing only runtime libraries) and another one with dev files. We would have to confirm for latest jetpack though.
For previous jetpacks, here is a post here to fix it:
https://github.com/introlab/rtabmap/issues/427#issuecomment-608052821or the recommended workaround with docker:
https://github.com/introlab/rtabmap_ros/issues/943