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

Added instructions to use Gazebo sources with rosdep #6656

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

sauk2
Copy link
Contributor

@sauk2 sauk2 commented Mar 2, 2025

Summary

Following the discussion in ArduPilot/ardupilot_ros#32, this update improves the "ROS 2 with Gazebo" setup instructions by adding Gazebo sources to rosdep.

The current approach allows users to bypass rosdep errors using the -r flag, which can later lead to build failures. By instructing users to add Gazebo sources, rosdep will properly install the required gz libraries.

@Hwurzburg Hwurzburg requested a review from Ryanf55 March 2, 2025 12:01
sudo apt update
rosdep update
rosdep install --from-paths src --ignore-src -r
rosdep install --from-paths src --ignore-src -y
Copy link
Contributor

Choose a reason for hiding this comment

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

You should leave in sudo apt update and rosdep update. It's necessary. Please only remove the -r flag.

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt update

Add Gazebo sources to `rosdep`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Add Gazebo sources to `rosdep`.
Add Gazebo sources to `rosdep` for the non-default paring of ROS 2 humble and Gazebo Harmonic.

It's helpful to explain context.

@sauk2
Copy link
Contributor Author

sauk2 commented Mar 4, 2025

@Ryanf55 Thanks for the feedback. I have made the requested changes!

@sauk2 sauk2 requested a review from Ryanf55 March 4, 2025 09:44
Copy link
Contributor

@Ryanf55 Ryanf55 left a comment

Choose a reason for hiding this comment

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

Looks good. Huge thanks for iterating.

@@ -44,7 +44,7 @@ Add Gazebo APT sources.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt update

Add Gazebo sources to `rosdep`.
Add Gazebo sources to `rosdep` for the non-default paring of ROS 2 humble and Gazebo Harmonic.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Add Gazebo sources to `rosdep` for the non-default paring of ROS 2 humble and Gazebo Harmonic.
Add Gazebo sources to `rosdep` for the non-default pairing of ROS 2 humble and Gazebo Harmonic.

Just a spelling error, otherwise LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about that. Fixed the mistake!

@Hwurzburg
Copy link
Contributor

squash commits and I'll merge it..thanks

@sauk2
Copy link
Contributor Author

sauk2 commented Mar 4, 2025

squash commits and I'll merge it..thanks

Done!

@Hwurzburg Hwurzburg merged commit eecc6c0 into ArduPilot:master Mar 4, 2025
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