-
Notifications
You must be signed in to change notification settings - Fork 727
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
Port stereo_image_proc to ROS 2 #486
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.
LGTM, just a couple comments
int left = block_matcher_.getDisparityRange() + block_matcher_.getMinDisparity() + border - 1; | ||
int wtf; | ||
if (block_matcher_.getMinDisparity() >= 0) { | ||
wtf = border + block_matcher_.getMinDisparity(); |
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.
What does wtf
represent? I think that could be named clearer
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 wish I knew, haha. I didn't touch the logic that was here since ROS 1. Any suggestions are appreciated.
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... don't even know what that is doing (or why there isn't one of those for the height). I'm going to just back away slowly before I go too far down a rabbithole
Note, I also did some minor refactoring a25372d |
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.
Any other changes you'd like to make?
We should wait until we pass CI though,
I want to add the reconfigurable parameters, and figure out what It'd be nice if CI was green though before this one goes in. I figured since the latest dashing sync it should be working... 🤔 |
@jacobperron / @SteveMacenski - They have to manually re-build the Docker containers with the updated packages for CI to pass. |
Looks like it was updated 3 days ago https://hub.docker.com/_/ros?tab=tags |
Potentially do it the more nasty way to get CI to build? |
@SteveMacenski - You're right. I checked the SHA hash of the image it pulled and CI must be using a cached copy somewhere. I don't know that there is anyway to update this from our end. |
I don't think the image has been updated yet. If I pull |
https://circleci.com/docs/2.0/caching/#clearing-cache @jacobperron try adding a cache variable we can increment, ei Edit: ah, ok |
Also, I just noticed that my tests aren't compatible with Dashing, so I'll update those in the meantime. |
@SteveMacenski I've updated the tests so they're backwards compatible with Dashing (ecce41b). PTAL. |
TL;DR It doesn't seem like the Docker image will be updated any time soon. Not until the underlying Ubuntu image gets rebuilt: osrf/docker_images#112 It's a bit annoying, but I can refactor the CMakeLists.txt to see if we can make CI happy. |
See #487 for a proposed fix for failing CI. |
More descriptive names that will match the classes contained inside. Also moved all source files associated with the library into a directory of the same name. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Made some minimum changes required for compilation. Not feature-complete yet. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
The test simply checks if the disparity node publishes to the expected topic when it received input. Made some fixes added to CMakeLists.txt to get node to run probably and pass the test. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Similar to the test for the disparity node. Fix bug in PointCloudNode. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Replaces the old ROS 1 XML launch file. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This form of manual composition seems redundant to me and can be done with a launch file. The only thing it appeared to add was the 'advertisement checker', which was not ported. If there is strong objection to removing this executable, we can add it back. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
There are a few cases where we discard the const-qualifier for the image data. This happens because OpenCV won't accend const pointers to data. Rather than changing the API, I've introduced a const_cast instead. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Fix lint error. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
The code removed was never being used. Added a TODO regarding the use of an unset variable. This has been here since the ROS 1 implementation, I'm not sure what the logic is intended to do so I've left it for now. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Save on some vertical space. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Remove commented code related to subscriber status since this may look different in ROS 2. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Now the launch tests should work for both Dashing and Eloquent. I left some TODO's where we can simplify once we diverge from Dashing. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
7c477b7
to
09e922a
Compare
Rebased 🤞 |
Connects to #360.
I think the majority of the port is complete. Opening this PR for visibility/early feedback. I've removed OpenCV 2 support in an attempt to simplify the code.
In addition to the port, I've added some simple launch tests that can be expanded upon in the future.
Test data taken from OpenCV (from here).
Here's what's missing:
image_pipeline/stereo_image_proc/src/stereo_image_proc/disparity_node.cpp
Lines 128 to 132 in a0a361b
This feature doesn't exist in ROS 2, so I've left TODOs in the code (similar to what was done in other image_pipeline packages).
Reconfigurable callbacks for parameters. This should be achievable since parameters are configurable by default. I'll proceed replacing the use of dynamic reconfigure using the rclcpp API. I can add it to this PR or after it is merged, whatever comes first.
I should also double-check QoS compatibility with other parts of image_pipeline (mentioned in Port Image_pipeline on ROS2 #360 (comment)).
Windows support. E.g add missing visibility flags, cmake commands, etc.
I've been building/testing with ROS 2 Eloquent and the latest ROS 2 source code.