Skip to content
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

ROS2: Image proc non zero crop #459

Merged
merged 12 commits into from Nov 26, 2019

Conversation

klintan
Copy link
Contributor

@klintan klintan commented Sep 17, 2019

As per issue #430 there are some missing nodes from image_proc package that needs to be added.

This is for the CropNonZeroNode.

It is built very very similar to the Rectify and Debayer node, so maybe review should be conjunction with #457 .

@klintan klintan changed the title Image proc non zero crop ROS2: Image proc non zero crop Oct 1, 2019
Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, is this just a straight port? Anything you want to mention?

image_proc/src/crop_non_zero.cpp Outdated Show resolved Hide resolved
image_proc/src/crop_non_zero.cpp Outdated Show resolved Hide resolved
@klintan
Copy link
Contributor Author

klintan commented Oct 16, 2019

LGTM, is this just a straight port? Anything you want to mention?

Nothing in particular, I need to do some more testing. But should be a straight port.

@SteveMacenski
Copy link
Member

OK tell me when you're happy with it after testing all the relevent options

@klintan
Copy link
Contributor Author

klintan commented Oct 29, 2019

Rebased on top of the new master and fixed PR feedback. Fixed some other issues I forgot to handle when testing it. I couldn't find any issues now at least, after testing.

Let me know if I missed something or if you have any feedback on my changes.

Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small stuff but looks fine

image_proc/CMakeLists.txt Show resolved Hide resolved
@klintan
Copy link
Contributor Author

klintan commented Nov 2, 2019

Tests failing on image_publisher not sure why, perhaps a temporary Circle issue, I don't have rights to rerun the workflow either. Should not affect this code.

image_proc/src/crop_non_zero.cpp Outdated Show resolved Hide resolved
image_proc/include/crop_non_zero.hpp Outdated Show resolved Hide resolved
image_proc/include/crop_non_zero.hpp Outdated Show resolved Hide resolved
image_proc/src/crop_non_zero.cpp Outdated Show resolved Hide resolved
image_proc/src/crop_non_zero.cpp Show resolved Hide resolved
Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

just needs circle ci building

@SteveMacenski
Copy link
Member

@klintan pull in ros2 once I have #470 merged. This will fix builds so it should just be whatever changes you've made

@JWhitleyWork
Copy link
Collaborator

CI restarted. The error that came up is usually because the compiler ran out of memory.

@klintan
Copy link
Contributor Author

klintan commented Nov 3, 2019

@klintan pull in ros2 once I have #470 merged. This will fix builds so it should just be whatever changes you've made

Hm I did a rebase on the latest changes, but still failing :/

@JWhitleyWork
Copy link
Collaborator

@klintan - I'm testing this locally to see what's up. It's a compiler error but I'm not sure why it's happening yet.

@JWhitleyWork
Copy link
Collaborator

@klintan - I created klintan#3, which I think will solve the problem. Please test it.

@SteveMacenski
Copy link
Member

@JWhitleyAStuff can you PR that and just merge it? That's been irritating me as well

Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy again when @JWhitleyAStuff is

@JWhitleyWork
Copy link
Collaborator

@klintan - Once you rebase on master, I'm good to merge.

@SteveMacenski
Copy link
Member

You mean on ros2, right?

@JWhitleyWork
Copy link
Collaborator

Yes, sorry.

@klintan
Copy link
Contributor Author

klintan commented Nov 8, 2019

i'll rebase asap.

@klintan
Copy link
Contributor Author

klintan commented Nov 10, 2019

@JWhitleyAStuff I had to change
dst.create(src.rows / 2, src.cols / 2, cv::DataType<DstPixel>::type);
to
dst.create(src.rows / 2, src.cols / 2, cv::traits::Type<DstPixel>::value);
per opencv/opencv#10115 , which version of opencv do you run? (I'm on 3.4.5) otherwise it wouldn't build. Perhaps it's something with my env since circleci seems to be fine with that ?

Fixed all other issues. Perhaps the crop_decimate fix should be in a different PR if it's a problem.

edit: circleci does not build with that change, so reverted regardless. But I think it's worth looking into that issue.

@SteveMacenski
Copy link
Member

@klintan that's a good use for the preprocessor ifs on the version, there's a bunch of examples in the code for supporting multiple opencv versions that way

@klintan
Copy link
Contributor Author

klintan commented Nov 24, 2019

@klintan that's a good use for the preprocessor ifs on the version, there's a bunch of examples in the code for supporting multiple opencv versions that way

Ok used a condition for the opencv version, that fixed the issue on circle and locally.

@SteveMacenski
Copy link
Member

Just waiting on @JWhitleyAStuff feedback then

Copy link
Collaborator

@JWhitleyWork JWhitleyWork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@SteveMacenski
Copy link
Member

@klintan any thing else you want to add before merging?

@SteveMacenski SteveMacenski merged commit bb4c2db into ros-perception:ros2 Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants