-
Notifications
You must be signed in to change notification settings - Fork 39
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
[viz] Use inlined byte array for heatmap png; remove VTK as dep #307
[viz] Use inlined byte array for heatmap png; remove VTK as dep #307
Conversation
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.
+@jwnimmer-tri Would you be up for review?
\cc @kunimatsu-tri @calderpg-tri @IanTheEngineer
Reviewable status: 0 of 7 files reviewed, all discussions resolved (waiting on @jwnimmer-tri)
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: 0 of 7 files reviewed, 2 unresolved discussions (waiting on @EricCousineau-TRI)
a discussion (no related file):
The need for VTK in drake_ros is extremely minimal. The code only uses it to encode a constant RGB array into constant PNG bytes.
The simpler fix would be to put the PNG data into a constexpr char kHeapmapPng[] = ...
and purge VTK entirely. Within the next release or two of Drake, we will have a PNG-to-memory writer public API, so you could revert to back using that pattern if you don't like the constexpr long-term.
.github/workflows/bazelized_drake_ros.yml
line 57 at r1 (raw file):
# but can't download the archive with bazel until we have the dependencies installed # so bazel_ros2_rules can inspect it. run: sudo apt-get install -y libconsole-bridge-dev libvtk9-dev
So this is adding the package to CI. How are users of drake-ros supposed to know that they need this package?
This PR seems only to unwind the deprecation console warning, but not actually solve the more acute problem of a build failure for users.
e475875
to
3e81a1c
Compare
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: 0 of 14 files reviewed, 2 unresolved discussions (waiting on @jwnimmer-tri)
a discussion (no related file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
The need for VTK in drake_ros is extremely minimal. The code only uses it to encode a constant RGB array into constant PNG bytes.
The simpler fix would be to put the PNG data into a
constexpr char kHeapmapPng[] = ...
and purge VTK entirely. Within the next release or two of Drake, we will have a PNG-to-memory writer public API, so you could revert to back using that pattern if you don't like the constexpr long-term.
Done.
.github/workflows/bazelized_drake_ros.yml
line 57 at r1 (raw file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
So this is adding the package to CI. How are users of drake-ros supposed to know that they need this package?
This PR seems only to unwind the deprecation console warning, but not actually solve the more acute problem of a build failure for users.
See TODO above - we can't (easily) use rosdep
for this CI setup because of the current usage of tarball.
For developers, rosdep
should handle it, as mentioned here:
drake-ros/drake_ros_examples/README.md
Lines 89 to 90 in 8e8f411
# Install required dependencies. | |
rosdep install --from-paths src -ryi |
This is referenced by
CONTRIBUTING.md
.
(Moot now though)
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.
Reviewed 14 of 14 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @EricCousineau-TRI)
drake_ros/viz/BUILD.bazel
line 28 at r2 (raw file):
hdrs = glob( ["*.h"], exclude = ["heamtap_png.raw.h"],
BTW If you make the *.inc
change, this particular edit could disappear.
drake_ros/viz/contact_markers_system.cc
line 91 at r2 (raw file):
std::vector<uint8_t> GenerateHeatmapPng() { return #include "./heatmap_png.raw.h"
BTW In my experience, a more typical extension for this file would be *.inc
as in #include "./heatmap_png.inc"
.
https://drake.mit.edu/styleguide/cppguide.html#Self_contained_Headers
3e81a1c
to
9d4b079
Compare
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: 9 of 14 files reviewed, all discussions resolved (waiting on @jwnimmer-tri)
drake_ros/viz/BUILD.bazel
line 28 at r2 (raw file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
BTW If you make the
*.inc
change, this particular edit could disappear.
Done, thanks!
drake_ros/viz/contact_markers_system.cc
line 91 at r2 (raw file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
BTW In my experience, a more typical extension for this file would be
*.inc
as in#include "./heatmap_png.inc"
.https://drake.mit.edu/styleguide/cppguide.html#Self_contained_Headers
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.
Reviewed 5 of 5 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @EricCousineau-TRI)
CI failure not immediately clear, but assuming it's once again "out of disk space". Merging. |
As mentioned in #305
This change is