-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for plotjuggler & improves parsing logic. #336
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Aditya Pande <[email protected]>
Signed-off-by: Aditya Pande <[email protected]>
Signed-off-by: Aditya Pande <[email protected]>
Had to add an exception for
Otherwise I think this should be applicable to all packages. Also shows up in CI. |
Signed-off-by: Aditya Pande <[email protected]>
Signed-off-by: Aditya Pande <[email protected]>
I did see |
drake-ros/bazel_ros2_rules/ros2/resources/ros2bzl/scraping/ament_cmake.py Lines 133 to 139 in 4c17af0
To see the target, you would need to change the TemporaryDirectory , or add an option for "sandbox debugging" mode for the generated files.
My guess is that it indeed is missing |
Is this PR just meant to address Q1 of #333? Could you mention as much in the overview (just to make sure I've set expectations well) If you're adding |
Signed-off-by: Aditya Pande <[email protected]>
Signed-off-by: Aditya Pande <[email protected]>
Working on colcon based CI here, though I was able to run plotjuggler with its plugins using |
Signed-off-by: Aditya Pande <[email protected]>
Signed-off-by: Aditya Pande <[email protected]>
Signed-off-by: Aditya Pande <[email protected]>
Signed-off-by: Aditya Pande <[email protected]>
The problem here is the extra plugin libs that are not a part of any target and are tricky to add:
which would have to live entrirely in bazel_ros2_rules. |
can we just generate a |
Okay, after a bit of investigation : plotjuggler-ros uses a Qt based plugin system instead of pluginlib, which ROS uses. This is causing problems with the parsing of plugins, and hence we do not have the plugins bundled up into a package. We do have a mechanism for parsing plugins, but that assumes we're doing things the ROS way. (
Nothing in the package metadata specifies that we have plugins in plotjuggler-ros. i.e. we need some special rule tweaking here just for plotjuggler_ros. |
Signed-off-by: Aditya Pande <[email protected]>
Signed-off-by: Aditya Pande <[email protected]>
Alright, we have a rollup target now that can load the required plugins :
|
Signed-off-by: Aditya Pande <[email protected]>
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. we need some special rule tweaking here just for plotjuggler_ros.
gotcha, special-case makes sense then, thanks!
Alright, we have a rollup target now that can load the required plugins
can you post a screenshot confirming that it has loaded the ROS 2 topic plugin?
Reviewed 2 of 3 files at r1, 1 of 1 files at r2, 2 of 3 files at r3, 1 of 3 files at r4, 1 of 2 files at r5, 1 of 1 files at r6, 1 of 1 files at r7, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @adityapande-1995 and @ahcorde)
bazel_ros2_rules/ros2/resources/ros2bzl/templates.py
line 111 at r7 (raw file):
for library in metadata['plugin_libraries'] ) # Add an exception for plotjuggler-ros, as it does not
nit Per your investigation above, it would help future readers to include more detail.
Can you mention it is using Qt plugins, and perhaps provide a link to plotjuggler code that details on this?
bazel_ros2_rules/ros2/resources/ros2bzl/templates.py
line 116 at r7 (raw file):
prefix = "_opt_ros_humble/lib/plotjuggler_ros/" data.extend([ prefix + "libDataLoadROS2.so",
nit These values may change.
Is it possible to simply glob these files?
ros2_example_bazel_installed/WORKSPACE
line 84 at r7 (raw file):
# "rmw_fastrtps_cpp", ] + [ # Extra packages
The notion of "extra" may be unclear.
I recommend putting these in the first list starting on L67.
ros2_example_bazel_installed/ros2_example_apps/plotjuggler.py
line 1 at r6 (raw file):
Previously, ahcorde (Alejandro Hernández Cordero) wrote…
#!/usr/bin/env python3 """
We actually do not use shebangs inside Python files that will be executed via Bazel, as these files are not intended to be independently executable.
Aditya, can you remove the shebang?
Signed-off-by: Aditya Pande <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 6 of 9 files reviewed, 3 unresolved discussions (waiting on @ahcorde and @EricCousineau-TRI)
ros2_example_bazel_installed/WORKSPACE
line 84 at r7 (raw file):
Previously, EricCousineau-TRI (Eric Cousineau) wrote…
The notion of "extra" may be unclear.
I recommend putting these in the first list starting on L67.
Done.
ros2_example_bazel_installed/ros2_example_apps/plotjuggler.py
line 1 at r6 (raw file):
Previously, EricCousineau-TRI (Eric Cousineau) wrote…
We actually do not use shebangs inside Python files that will be executed via Bazel, as these files are not intended to be independently executable.
Aditya, can you remove the shebang?
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 6 of 9 files reviewed, 3 unresolved discussions (waiting on @ahcorde and @EricCousineau-TRI)
Signed-off-by: Aditya Pande <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 6 of 9 files reviewed, 2 unresolved discussions (waiting on @ahcorde and @EricCousineau-TRI)
bazel_ros2_rules/ros2/resources/ros2bzl/templates.py
line 116 at r7 (raw file):
Previously, EricCousineau-TRI (Eric Cousineau) wrote…
nit These values may change.
Is it possible to simply glob these files?
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissed @ahcorde from a discussion.
Reviewable status: 6 of 9 files reviewed, 1 unresolved discussion (waiting on @EricCousineau-TRI)
ros2_example_bazel_installed/WORKSPACE
line 84 at r7 (raw file):
Previously, adityapande-1995 (Aditya Pande) wrote…
Done.
Now the list isn't sorted anymore ("Please keep this list sorted")
Addresses first part of #333, by fixing the parsing logic for conditional tags. Also includes plotjuggler in ros2_examples.
This change is