Skip to content

Added CMAKE logic to disable Contact Sensor and Spawner components.#842

Merged
michalpelka merged 3 commits intoo3de:feature/simulation_interfacesfrom
RobotecAI:mp/disable_gazebo_msgs
Mar 21, 2025
Merged

Added CMAKE logic to disable Contact Sensor and Spawner components.#842
michalpelka merged 3 commits intoo3de:feature/simulation_interfacesfrom
RobotecAI:mp/disable_gazebo_msgs

Conversation

@michalpelka
Copy link
Copy Markdown
Contributor

@michalpelka michalpelka commented Mar 20, 2025

Components will be disabled when gazebo_msgs is no longer available.

What does this PR do?

This PR will disable compilation of the Contact Sensor and ROS 2 Spawner if gazebo_msgs package is not available.

As is discussed in RFC 95 and ros-simulation/gazebo_ros_pkgs#1532 and https://community.gazebosim.org/t/gazebo-classic-end-of-life/2563 said package is non-longer maintained.

To enable smooth transition, dependant code is disabled. To enable this code, advanced user needs to build gazebo_msgs from released last source.

How was this PR tested?

I simply removed ros-humble-gazebo-msgs package using Synaptic.

with ros-humble-gazebo-msgs installed without ros-humble-gazebo-msgs installed
Screenshot from 2025-03-20 13-43-26 Screenshot from 2025-03-20 13-40-10

Components will be disabled when gazebo_msgs is no longer available.

Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
@michalpelka michalpelka requested review from a team as code owners March 20, 2025 12:56
Comment thread Gems/ROS2/Code/CMakeLists.txt Outdated
Comment thread Gems/ROS2/Code/ros2_files.cmake Outdated
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
@michalpelka michalpelka requested a review from pijaro March 20, 2025 15:56
Copy link
Copy Markdown
Collaborator

@jhanca-robotecai jhanca-robotecai left a comment

Choose a reason for hiding this comment

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

Nitpick comments about the text.

The implementation is fine, It works when building the project from scratch - in my case, it did not recognize the change when I tried to test it in the following order:

  • build the project (gazebo_msgs available)
  • remove gazego_msgs
  • rebuild the project
    This might be considered a corner-case.

Comment thread Gems/ROS2/Code/CMakeLists.txt Outdated
Comment thread Gems/ROS2/Code/CMakeLists.txt Outdated
Co-authored-by: Jan Hanca <jan.hanca@robotec.ai>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
@michalpelka michalpelka merged commit 01f0198 into o3de:feature/simulation_interfaces Mar 21, 2025
1 check passed
jhanca-robotecai added a commit to RobotecAI/o3de-extras that referenced this pull request Jun 13, 2025
…3de#842)

Components will be disabled when gazebo_msgs is no longer available.
Apply suggestions from code review
---------
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Co-authored-by: Jan Hanca <jan.hanca@robotec.ai>
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
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