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

Update for compatibility with image_geometry 4.1.0 #968

Conversation

ScottMonaghan
Copy link
Contributor

@ScottMonaghan ScottMonaghan commented Apr 23, 2024

This is a PR to fix:

As noted in #966, as of writing image_geometry 4.1.0 has been released, is updated on index.ros.org, but it has not yet been migrated to packages.ros.org.

As such camera_calibration will also require the source of image_geometry 4.1.0 or higher to successfully build.

I tested to ensure successful build with colcon build & colcon test.

Note that colcon test has the following warning that is out of scope of this PR:

=============================== warnings summary ===============================

src/camera_calibration/calibrator.py:47

  Warning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

Please let me know if there are any questions, concerns, or requested changes.

@ahcorde
Copy link
Contributor

ahcorde commented Apr 23, 2024

Thank you @ScottMonaghan for the contribution.

CI is broken, we need to wait to have a osrf/ros2:testing docker image based on noble. It should be available in the following weeks. Added to my TODO list

@ahcorde
Copy link
Contributor

ahcorde commented May 8, 2024

@ros-pull-request-builder retest this please

@ahcorde ahcorde self-requested a review May 8, 2024 18:30
@ahcorde ahcorde merged commit 794f2ee into ros-perception:rolling May 8, 2024
3 of 4 checks passed
@mikeferguson
Copy link
Member

It appears this may not be complete? The latest dev job has a failed test:

Error Message
AttributeError: 'StereoCameraModel' object has no attribute 'from_camera_info'. Did you mean: 'fromCameraInfo'?
Stacktrace
test/test_directed.py:132: in test_stereo
    self.assertAlmostEqual(sc.chessboard_size_from_images(self.l[dim][0], self.r[dim][0]), .108, 2)
src/camera_calibration/calibrator.py:1308: in chessboard_size_from_images
    return self.chessboard_size(lundistorted, rundistorted, board)
src/camera_calibration/calibrator.py:1320: in chessboard_size
    cam.from_camera_info(*msg)
E   AttributeError: 'StereoCameraModel' object has no attribute 'from_camera_info'. Did you mean: 'fromCameraInfo'?

https://build.ros2.org/job/Jdev__image_pipeline__ubuntu_noble_amd64/2/testReport/junit/camera_calibration.test.test_directed/TestDirected/test_stereo/

@ScottMonaghan
Copy link
Contributor Author

Hmm... that means we're referencing an image_geometry package older than the current 4.1 release: https://index.ros.org/p/image_geometry/github-ros-perception-vision_opencv/#rolling

In 4.1 from_camera_info replaces FromCameraInfo which has been deprecated.

@mikeferguson
Copy link
Member

Looks like Rolling has 4.1 - but Jazzy only has 4.0? Is that expected?

@ScottMonaghan
Copy link
Contributor Author

ScottMonaghan commented May 8, 2024

Certainly not what I expected, but I'm new here and may have made a mistake.

@ijnek, can you offer some insight here? image-geometry should be 4.1 for Jazzy correct?

@ScottMonaghan ScottMonaghan changed the title Update for compatibility with image_pipeline 4.1.0 Update for compatibility with image_geometry 4.1.0 May 11, 2024
Kotochleb pushed a commit to Kotochleb/image_pipeline that referenced this pull request May 27, 2024
This is a PR to fix: 
- ros-perception#966 

As noted in ros-perception#966, as of writing image_pipeline [4.1.0 has been
released](https://github.com/ros-perception/vision_opencv/releases/tag/4.1.0),
is updated on
[index.ros.org](https://index.ros.org/p/image_geometry/github-ros-perception-vision_opencv/#rolling),
but it has not yet been migrated to
[packages.ros.org](http://packages.ros.org/ros2/ubuntu/dists/noble/main/binary-amd64/Packages).

As such `camera_calibration` will also require the source of
[image_pipeline
4.1.0](https://github.com/ros-perception/vision_opencv/releases/tag/4.1.0)
or higher to successfully build.

I tested to ensure successful build with colcon build & colcon test.

Note that colcon test has the following warning that is out of scope of
this PR:
```
=============================== warnings summary ===============================

src/camera_calibration/calibrator.py:47

  Warning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
```
Please let me know if there are any questions, concerns, or requested
changes.
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.

3 participants