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

Minimal Noetic #530

Merged
merged 12 commits into from May 14, 2020
Merged

Minimal Noetic #530

merged 12 commits into from May 14, 2020

Conversation

JWhitleyWork
Copy link
Collaborator

Re-write of #507 with some cherry-picks from that branch but without significant feature changes.

ahcorde and others added 9 commits May 13, 2020 16:32
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
@JWhitleyWork
Copy link
Collaborator Author

@clalancette Tests are still failing and I'm not familiar enough with the math behind the code to fix them. Would you mind taking a look?

@JWhitleyWork JWhitleyWork changed the base branch from melodic to noetic May 14, 2020 18:19
@SteveMacenski
Copy link
Member

@JWhitleyWork the Circle builds are failing from lack of memory. Can you reduce the CI builds to 1 at a time? 4 appears to be too much.

We already had to do that with ROS2 branch recently (https://github.com/ros-perception/image_pipeline/blob/ros2/.circleci/config.yml), not sure what changed. Maybe Circle is throttling us.

@SteveMacenski
Copy link
Member

https://github.com/ros-perception/image_pipeline/pull/530/files#diff-72ab43337037c75a52cd0446749284f3R190-R197

These are the only functional changes I see, maybe changing this cast did something?

Alot of the errors I see are

TypeError: integer argument expected, got float

on lines in the test like cv2.circle(pattern, (x*(1 + 2*i + (j%2)) + x/2, x*j + x/2), x/3, (0,0,0), -1) that might cause a problem. See above the actual FAILED tests, you'll see a couple of these errors

@JWhitleyWork
Copy link
Collaborator Author

Can you reduce the CI builds to 1 at a time?

Done

@SteveMacenski Sorry for lack of clarification. Here are the build failures that I'm talking about:

13:32:14 Scanning dependencies of target _run_tests_camera_calibration_nosetests_test.directed.py
13:32:14 -- run_tests.py: execute commands
13:32:14   "/usr/bin/cmake" -E make_directory /tmp/ws/test_results/camera_calibration
13:32:14   /usr/bin/nosetests3 -P --process-timeout=60 /tmp/ws/src/image_pipeline/camera_calibration/test/directed.py --with-xunit --xunit-file=/tmp/ws/test_results/camera_calibration/nosetests-test.directed.py.xml
13:32:15 FFF.F
13:32:26 ======================================================================
13:32:26 FAIL: test_monocular (directed.TestArtificial)
13:32:26 ----------------------------------------------------------------------
13:32:26 Traceback (most recent call last):
13:32:26   File "/tmp/ws/src/image_pipeline/camera_calibration/test/directed.py", line 258, in test_monocular
13:32:26     self.assert_good_mono(mc, self.limages[i], setup.lin_err)
13:32:26   File "/tmp/ws/src/image_pipeline/camera_calibration/test/directed.py", line 236, in assert_good_mono
13:32:26     self.assertTrue(lin_err < max_err, 'lin_err is %f' % lin_err)
13:32:26 AssertionError: False is not true : lin_err is 0.200393
13:32:26 -------------------- >> begin captured stdout << ---------------------
13:32:26 linear error is 0.200393
13:32:26 
13:32:26 --------------------- >> end captured stdout << ----------------------
13:32:26 
13:32:26 ======================================================================
13:32:26 FAIL: Test that the distortion coefficients returned for a rational_polynomial model are not empty.
13:32:26 ----------------------------------------------------------------------
13:32:26 Traceback (most recent call last):
13:32:26   File "/tmp/ws/src/image_pipeline/camera_calibration/test/directed.py", line 281, in test_rational_polynomial_model
13:32:26     self.assert_good_mono(mc, self.limages[i], setup.lin_err)
13:32:26   File "/tmp/ws/src/image_pipeline/camera_calibration/test/directed.py", line 236, in assert_good_mono
13:32:26     self.assertTrue(lin_err < max_err, 'lin_err is %f' % lin_err)
13:32:26 AssertionError: False is not true : lin_err is 0.215554
13:32:26 -------------------- >> begin captured stdout << ---------------------
13:32:26 linear error is 0.215554
13:32:26 
13:32:26 --------------------- >> end captured stdout << ----------------------
13:32:26 
13:32:26 ======================================================================
13:32:26 FAIL: test_monocular (directed.TestDirected)
13:32:26 ----------------------------------------------------------------------
13:32:26 Traceback (most recent call last):
13:32:26   File "/tmp/ws/src/image_pipeline/camera_calibration/test/directed.py", line 93, in test_monocular
13:32:26     self.assert_good_mono(mc, dim, max_errs[i])
13:32:26   File "/tmp/ws/src/image_pipeline/camera_calibration/test/directed.py", line 82, in assert_good_mono
13:32:26     self.assertTrue(lin_err < max_err, 'lin_err is %f' % lin_err)
13:32:26 AssertionError: False is not true : lin_err is 2.349721
13:32:26 
13:32:26 ======================================================================
13:32:26 FAIL: test_stereo (directed.TestDirected)
13:32:26 ----------------------------------------------------------------------
13:32:26 Traceback (most recent call last):
13:32:26   File "/tmp/ws/src/image_pipeline/camera_calibration/test/directed.py", line 122, in test_stereo
13:32:26     self.assertTrue(epierror < epierrors[i],
13:32:26 AssertionError: False is not true : Epipolar error is 1.745842 for resolution i = 0
13:32:26 -------------------- >> begin captured stdout << ---------------------
13:32:26 Dim = (320, 240)
13:32:26 
13:32:26 Left:
13:32:26 D = [-0.41515829993748576, 0.05110770632388463, 0.07098419147531078, -0.06099314655212798, 0.0]
13:32:26 K = [241.92199869716805, 0.0, 232.55796349899597, 0.0, 249.2727425475938, 35.235295320848486, 0.0, 0.0, 1.0]
13:32:26 R = [0.9792180825079992, 0.07252016617033023, 0.1894010886663131, -0.07248074638854332, 0.9973442246295716, -0.007144158522771803, -0.18941617748311937, -0.006732243063535294, 0.981873815014443]
13:32:26 P = [3033.80782706034, 0.0, 192.16491222381592, 0.0, 0.0, 3033.80782706034, 80.99110150337219, 0.0, 0.0, 0.0, 1.0, 0.0]
13:32:26 
13:32:26 Right:
13:32:26 D = [-0.4195090199363406, 0.05603810767161762, 0.07101175369447646, -0.06441343860299868, 0.0]
13:32:26 K = [241.49812702968313, 0.0, 238.56509880116838, 0.0, 249.06214913696053, 32.67009253686523, 0.0, 0.0, 1.0]
13:32:26 R = [0.9816596131367914, 0.0683023428180517, 0.17798649921185128, -0.06833936111763889, 0.9976445090246253, -0.005930036681791607, -0.17797228901758255, -0.006342206128768554, 0.9840150612481814]
13:32:26 P = [3033.80782706034, 0.0, 192.16491222381592, -285.39522943093715, 0.0, 3033.80782706034, 80.99110150337219, 0.0, 0.0, 0.0, 1.0, 0.0]
13:32:26 self.T = [-0.09234631409917826, -0.006425312317199932, -0.01674347904474744]
13:32:26 self.R = [0.9999229626365073, 0.00423040385007531, 0.011669296272495834, -0.004225813037723542, 0.9999909838333203, -0.00041803856090849416, -0.011670959532113154, 0.0003686940919905222, 0.9999318240601537]
13:32:26 
13:32:26 --------------------- >> end captured stdout << ----------------------
13:32:26 
13:32:26 ----------------------------------------------------------------------
13:32:26 Ran 5 tests in 11.732s
13:32:26 
13:32:26 FAILED (failures=4)
13:32:26 -- run_tests.py: verify result "/tmp/ws/test_results/camera_calibration/nosetests-test.directed.py.xml"
13:32:26 Built target _run_tests_camera_calibration_nosetests_test.directed.py
13:32:26 Scanning dependencies of target _run_tests_camera_calibration_nosetests_test.multiple_boards.py
13:32:26 -- run_tests.py: execute commands
13:32:26   "/usr/bin/cmake" -E make_directory /tmp/ws/test_results/camera_calibration
13:32:26   /usr/bin/nosetests3 -P --process-timeout=60 /tmp/ws/src/image_pipeline/camera_calibration/test/multiple_boards.py --with-xunit --xunit-file=/tmp/ws/test_results/camera_calibration/nosetests-test.multiple_boards.py.xml
13:32:33 F
13:32:33 ======================================================================
13:32:33 FAIL: test_multiple_boards (multiple_boards.TestMultipleBoards)
13:32:33 ----------------------------------------------------------------------
13:32:33 Traceback (most recent call last):
13:32:33   File "/tmp/ws/src/image_pipeline/camera_calibration/test/multiple_boards.py", line 71, in test_multiple_boards
13:32:33     self.assert_(epi_big < 1.0, "Epipolar error for large checkerboard > 1.0. Error: %.2f" % epi_big)
13:32:33 AssertionError: False is not true : Epipolar error for large checkerboard > 1.0. Error: 152.00
13:32:33 -------------------- >> begin captured stdout << ---------------------
13:32:33 
13:32:33 Left:
13:32:33 D = [8.033206324131141, -1112.4968054883295, -0.12464117007090397, 0.05145877700150152, 44346.23866762433]
13:32:33 K = [3859.287985260978, 0.0, 283.5779783443467, 0.0, 3172.76596484317, 346.65918955202807, 0.0, 0.0, 1.0]
13:32:33 R = [0.130008206809717, 0.008478185353019177, 0.9914766696878157, -0.03679333342088533, 0.9993159696919921, -0.0037206631577533767, -0.9908300140679538, -0.03599601494157029, 0.13023121795646708]
13:32:33 P = [10071.06031034245, 0.0, -48972.69860839844, 0.0, 0.0, 10071.06031034245, 1907.7120513916016, 0.0, 0.0, 0.0, 1.0, 0.0]
13:32:33 
13:32:33 Right:
13:32:33 D = [-2.9599126406348053, 371.7125110296346, -0.13320120391531134, 0.09444426126177655, 3.430916753556746]
13:32:33 K = [3948.9941661898433, 0.0, 267.96478042930727, 0.0, 3400.628522793096, 181.75860807601285, 0.0, 0.0, 1.0]
13:32:33 R = [0.12433607052142116, 0.06127832696737718, 0.9903461557512967, -0.03289563728133663, 0.9977970921299045, -0.05760937410666613, -0.9916947204735674, -0.02541514472093939, 0.12607795923025877]
13:32:33 P = [10071.06031034245, 0.0, -48972.69860839844, -3892.741051307987, 0.0, 10071.06031034245, 1907.7120513916016, 0.0, 0.0, 0.0, 1.0, 0.0]
13:32:33 self.T = [-0.0480593016983534, -0.023685754189796043, -0.38279595362357993]
13:32:33 self.R = [0.9999759435587814, 0.0038780665591547437, -0.0057509045799394864, -0.003563507490409819, 0.9985489416209146, 0.05373371941450881, 0.005950942622021858, -0.05371193338089902, 0.9985387396062284]
13:32:33 
13:32:33 --------------------- >> end captured stdout << ----------------------
13:32:33 -------------------- >> begin captured logging << --------------------
13:32:33 rospy.topics: INFO: topicmanager initialized
13:32:33 --------------------- >> end captured logging << ---------------------
13:32:33 
13:32:33 ----------------------------------------------------------------------
13:32:33 Ran 1 test in 6.757s
13:32:33 
13:32:33 FAILED (failures=1)

@JWhitleyWork JWhitleyWork requested review from SteveMacenski and removed request for clalancette May 14, 2020 19:32
@SteveMacenski
Copy link
Member

My first gut check would be trying to remove the int() that were added as part of this port and see if that fixes things. That seems to be the only functional change. After that, then I think its worth looking a the changes between CV3 and 4 in calibration.

@JWhitleyWork
Copy link
Collaborator Author

@SteveMacenski Found it. There was a float division (/) that needed to be an integer division (//). This wasn't a problem in Python2 because the conversion is implicit.

@SteveMacenski
Copy link
Member

N still failed, weirdly

@JWhitleyWork
Copy link
Collaborator Author

N still failed, weirdly

If you look at the log, it actually passed but the Github hook seems to report "Unstable" as "failed." Not sure why.

@SteveMacenski
Copy link
Member

SteveMacenski commented May 14, 2020

I think it failed from the quality gate due to build warnings. We could also try to rerun.

@JWhitleyWork
Copy link
Collaborator Author

@SteveMacenski Go for it. I'm not familiar with how to kick builds on the build farm other than pushing changes.

@SteveMacenski
Copy link
Member

like that ;-)

@SteveMacenski
Copy link
Member

Its still closer than the other PR, we should close that since this supersedes

@JWhitleyWork JWhitleyWork mentioned this pull request May 14, 2020
@JWhitleyWork
Copy link
Collaborator Author

Still getting failure due to GTK deprecation warnings. I'll look into them real quick.

@JWhitleyWork
Copy link
Collaborator Author

@SteveMacenski So, oddly, there are 3 deprecated functions in GTK2 that cause these errors while it builds just fine with GTK3. I updated to GTK3. Unfortunately, I have no way to test it since a camera driver hasn't been released yet for Noetic! Really don't think it should be a problem, though. The GTK functionality is very minimal.

@SteveMacenski
Copy link
Member

I deeply hate GTK and VTK. Its the bane of my maintaining existence.

just use rviz

@JWhitleyWork JWhitleyWork merged commit e71a45c into noetic May 14, 2020
@JWhitleyWork JWhitleyWork deleted the fix/noetic branch May 14, 2020 23:45
@SteveMacenski
Copy link
Member

Let me know if you want to release or if I should tomorrow. I don't mind.

@JWhitleyWork
Copy link
Collaborator Author

I'd appreciate it if you would. I have a lot of Autoware stuff to do tonight.

@SteveMacenski
Copy link
Member

Will do

wep21 pushed a commit to wep21/image_pipeline that referenced this pull request Oct 17, 2021
* cmake_minimum_required to 3.0.2

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Adapted to OpenCV4

Signed-off-by: ahcorde <ahcorde@gmail.com>

* import setup from setuptools instead of distutils-core

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Adapted .circleci to noetic

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Updating CI for Noetic with temp image.

* Updated directed.py test

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fixed compilation test_rectify

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Applying some fixes from ahcorde d1bed52.

* Removing import of print_function from __future__.

* CI: Reducing simultaneous jobs to 1.

* Fixing float/integer division bug.

* Updating image_view to use GTK3.

Co-authored-by: ahcorde <ahcorde@gmail.com>
JWhitleyWork pushed a commit that referenced this pull request Nov 11, 2021
* cmake_minimum_required to 3.0.2

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Adapted to OpenCV4

Signed-off-by: ahcorde <ahcorde@gmail.com>

* import setup from setuptools instead of distutils-core

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Adapted .circleci to noetic

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Updating CI for Noetic with temp image.

* Updated directed.py test

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fixed compilation test_rectify

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Applying some fixes from ahcorde d1bed52.

* Removing import of print_function from __future__.

* CI: Reducing simultaneous jobs to 1.

* Fixing float/integer division bug.

* Updating image_view to use GTK3.

Co-authored-by: ahcorde <ahcorde@gmail.com>
JWhitleyWork pushed a commit that referenced this pull request Apr 14, 2022
* cmake_minimum_required to 3.0.2

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Adapted to OpenCV4

Signed-off-by: ahcorde <ahcorde@gmail.com>

* import setup from setuptools instead of distutils-core

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Adapted .circleci to noetic

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Updating CI for Noetic with temp image.

* Updated directed.py test

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fixed compilation test_rectify

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Applying some fixes from ahcorde d1bed52.

* Removing import of print_function from __future__.

* CI: Reducing simultaneous jobs to 1.

* Fixing float/integer division bug.

* Updating image_view to use GTK3.

Co-authored-by: ahcorde <ahcorde@gmail.com>
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