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

ROS: build as ament package if ROS available #53

Merged
merged 3 commits into from
Apr 17, 2023

Conversation

srmainwaring
Copy link
Collaborator

Allow ardupilot_gazebo to be built as a ROS 2 ament package if the ament dependencies are available, otherwise default to a standalone cmake only build.

Details

  • Add ROS 2 ament package configuration.
  • Build as ament package if possible, otherwise revert to standard cmake build.
  • Add install section to CMakeLists.txt
  • Add environment hooks to update GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH.

- Add ROS ament package configuration.
- Build as ament package if possible, otherwise revert to standard cmake.

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
@srmainwaring srmainwaring added the enhancement New feature or request label Apr 15, 2023
@srmainwaring srmainwaring self-assigned this Apr 15, 2023
- Use QUIET in find_package for ament_cmake.

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
<author>Rhys Mainwaring</author>

<buildtool_depend>ament_cmake</buildtool_depend>

Copy link
Collaborator

Choose a reason for hiding this comment

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

probably need some gazebo build depends here , right ?

Copy link
Collaborator Author

@srmainwaring srmainwaring Apr 17, 2023

Choose a reason for hiding this comment

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

You're right. I think it should be:

<depend>gz-cmake3</depend>
<depend>gz-sim7</depend>

However these don't appear in the ROS index for Ubuntu 22.04 as the recommended config is to use Gazebo Fortress with ROS 2 Humble (although most of the community seem to be using Garden). There is a similar issue with the ros_gz bridge.

The following packages are available in apt search:

  <build_depend>rapidjson-dev</build_depend>  
  <build_depend>libgz-cmake3-dev</build_depend>
  <build_depend>libgz-sim7-dev</build_depend>

So I'll register these as system rather than ROS index dependencies.

- Add build dependencies on rapidjson-dev, libgz-cmake3-dev, libgz-sim7-dev.

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
@srmainwaring srmainwaring merged commit a739479 into ArduPilot:main Apr 17, 2023
3 checks passed
@srmainwaring srmainwaring deleted the pr/pr-colcon-pkg branch May 8, 2023 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants