Skip to content

Build apriltag_ros on macOS - #234

Open
lucascolley wants to merge 3 commits into
RoboStack:mainfrom
lucascolley:apriltag-ros-macos
Open

lucascolley wants to merge 3 commits into
RoboStack:mainfrom
lucascolley:apriltag-ros-macos

Conversation

@lucascolley

Copy link
Copy Markdown

build apriltag_ros on macOS, for tartanroboticscollective/ros2-workshop-turtlebot3#29.


LLM text:

apriltag_ros was Linux-only ("earlier macOS and Windows builds failed"). The
macOS build only needs -Werror and the GNU-only linker flags
(-Wl,-z,relro,-z,now,-z,defs) left out, which humble's and lyrical's patches
(and rolling's .osx.patch) already did; jazzy's patch didn't.

  • Every distribution builds the same apriltag_ros 3.4.0, so replace the four
    distribution patches and rolling's .osx.patch with one
    shared/patch/ros2-apriltag-ros.patch (OpenCV 5 calib/geometry split + macOS).
  • Select apriltag_ros on not win instead of linux.
  • Exclude camera_ros on non-Linux platforms: it needs libcamera (Linux-only),
    and apriltag_ros only uses it (exec_depend) for its camera launch file.
    apriltag_ros is the only package depending on it.

Verified on osx-arm64: apriltag_ros builds for every distribution, the jazzy
build's apriltag_node starts, and no camera_ros/libcamera recipes are
generated on macOS.

apriltag_ros was Linux-only ("earlier macOS and Windows builds failed"). The
macOS build only needs -Werror and the GNU-only linker flags
(-Wl,-z,relro,-z,now,-z,defs) left out, which humble's and lyrical's patches
(and rolling's .osx.patch) already did; jazzy's patch didn't.

- Every distribution builds the same apriltag_ros 3.4.0, so replace the four
  distribution patches and rolling's .osx.patch with one
  shared/patch/ros2-apriltag-ros.patch (OpenCV 5 calib/geometry split + macOS).
- Select apriltag_ros on `not win` instead of `linux`.
- Exclude camera_ros on non-Linux platforms: it needs libcamera (Linux-only),
  and apriltag_ros only uses it (exec_depend) for its camera launch file.
  apriltag_ros is the only package depending on it.

Verified on osx-arm64: apriltag_ros builds for every distribution, the jazzy
build's apriltag_node starts, and no camera_ros/libcamera recipes are
generated on macOS.
Comment thread shared/vinca.yaml Outdated

- if: not win
then:
- apriltag_ros # macOS needs no -Werror and no GNU linker flags (patch); Windows builds failed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would remove the macos comment, as it it is what we already solved

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread shared/vinca.yaml Outdated

- if: not linux
then:
- camera_ros # libcamera is Linux-only; also dropped from apriltag_ros (only its camera launch file uses it)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why aprital_ros is mentioned here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@traversaro

Copy link
Copy Markdown
Member

For reference, the macos change was upstreamed in https://github.com/christianrauch/apriltag_ros/pull/66/changes , when it is upstreamed we may need to go back to distro-specific patches.

@Tobias-Fischer

Copy link
Copy Markdown
Collaborator

@lucascolley can you please address Silvio’s comments so we can merge here?

@lucascolley lucascolley left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@Tobias-Fischer addressed

Comment thread shared/vinca.yaml Outdated

- if: not linux
then:
- camera_ros # libcamera is Linux-only; also dropped from apriltag_ros (only its camera launch file uses it)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread shared/vinca.yaml Outdated

- if: not win
then:
- apriltag_ros # macOS needs no -Werror and no GNU linker flags (patch); Windows builds failed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@Tobias-Fischer

Copy link
Copy Markdown
Collaborator

Have cancelled CI for now to free up resources for the humble & jazzy rebuilds

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