From 40d8bb7caec40af4f213606b56e8f2d793d27613 Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Thu, 17 Nov 2022 15:50:28 -0800 Subject: [PATCH 1/8] 4.7.0 release (#312) Signed-off-by: Nate Koenig Signed-off-by: Nate Koenig Co-authored-by: Nate Koenig --- CMakeLists.txt | 2 +- Changelog.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c8057cb..b4c087c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR) #============================================================================ # Initialize the project #============================================================================ -project(ignition-fuel_tools4 VERSION 4.6.0) +project(ignition-fuel_tools4 VERSION 4.7.0) #============================================================================ # Find ignition-cmake diff --git a/Changelog.md b/Changelog.md index 63869ed1..327a8930 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ ## Gazebo Fuel Tools 4.x +### Gazebo Fuel Tools 4.7.0 (2022-11-17) + +1. ign -> gz Migrate Ignition Headers : gz-fuel-tools. + * [Pull request #285](https://github.com/gazebosim/gz-fuel-tools/pull/285) + ### Gazebo Fuel Tools 4.6.0 (2022-08-15) . Ignition to Gazebo server rename From f5072801558d93c1af1348efa6d0895f3ee2ee9f Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Thu, 17 Nov 2022 16:14:12 -0800 Subject: [PATCH 2/8] 7.2.0 release (#313) Signed-off-by: Nate Koenig Signed-off-by: Nate Koenig Co-authored-by: Nate Koenig --- CMakeLists.txt | 2 +- Changelog.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 517fae73..e89d8b55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR) #============================================================================ # Initialize the project #============================================================================ -project(ignition-fuel_tools7 VERSION 7.1.0) +project(ignition-fuel_tools7 VERSION 7.2.0) #============================================================================ # Find ignition-cmake diff --git a/Changelog.md b/Changelog.md index acac596e..1a15fc7e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ ## Gazebo Fuel Tools 7.x +### Gazebo Fuel Tools 7.2.0 (2021-11-17) + +1. Forward port 4.7.0. + * [Pull request #306](https://github.com/gazebosim/gz-fuel-tools/pull/306) + ### Gazebo Fuel Tools 7.1.0 (2021-08-16) 1. Ignition to Gazebo server rename effort From 3a1ec58af5c6e2f67b65dfdb3f5e6ba9c2dda0d5 Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Mon, 28 Nov 2022 15:19:51 -0800 Subject: [PATCH 3/8] Reduce asset download sizes (#316) Signed-off-by: Nate Koenig Signed-off-by: Nate Koenig Co-authored-by: Nate Koenig --- src/FuelClient_TEST.cc | 214 +++++++++++++++++++++-------------------- 1 file changed, 110 insertions(+), 104 deletions(-) diff --git a/src/FuelClient_TEST.cc b/src/FuelClient_TEST.cc index c4220d29..78eee9bb 100644 --- a/src/FuelClient_TEST.cc +++ b/src/FuelClient_TEST.cc @@ -145,12 +145,12 @@ TEST_F(FuelClientTest, ParseModelURL) FuelClient client; ModelIdentifier id; const std::string url{ - "https://some.example.org/1.0/german/models/Cardboard Box"}; + "https://some.example.org/1.0/openroboticstest/models/Cardboard Box"}; EXPECT_TRUE(client.ParseModelUrl(common::URI(url), id)); EXPECT_EQ(id.Server().Url().Str(), "https://some.example.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "german"); + EXPECT_EQ(id.Owner(), "openroboticstest"); EXPECT_EQ(id.Name(), "cardboard box"); EXPECT_EQ(id.Version(), 0u); } @@ -164,12 +164,12 @@ TEST_F(FuelClientTest, ParseModelURL) FuelClient client(config); ModelIdentifier id; const std::string url{ - "https://fuel.ignitionrobotics.org/1.0/german/models/Cardboard Box/4"}; + "https://fuel.gazebosim.org/1.0/openroboticstest/models/Cardboard Box/4"}; EXPECT_TRUE(client.ParseModelUrl(common::URI(url), id)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "german"); + EXPECT_EQ(id.Owner(), "openroboticstest"); EXPECT_EQ(id.Name(), "cardboard box"); EXPECT_EQ(id.Version(), 4u); } @@ -183,12 +183,13 @@ TEST_F(FuelClientTest, ParseModelURL) FuelClient client(config); ModelIdentifier id; const std::string url{ - "https://fuel.ignitionrobotics.org/5.0/german/models/Cardboard Box/6"}; + "https://fuel.gazebosim.org/5.0/openroboticstest/models/Cardboard Box/6/" + }; EXPECT_TRUE(client.ParseModelUrl(common::URI(url), id)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "german"); + EXPECT_EQ(id.Owner(), "openroboticstest"); EXPECT_EQ(id.Name(), "cardboard box"); EXPECT_EQ(id.Version(), 6u); } @@ -200,12 +201,12 @@ TEST_F(FuelClientTest, ParseModelURL) FuelClient client; ModelIdentifier id; const std::string url{ - "https://fuel.ignitionrobotics.org/german/models/Cardboard Box"}; + "https://fuel.gazebosim.org/openroboticstest/models/Cardboard Box"}; EXPECT_TRUE(client.ParseModelUrl(common::URI(url), id)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_FALSE(id.Server().Version().empty()); - EXPECT_EQ(id.Owner(), "german"); + EXPECT_EQ(id.Owner(), "openroboticstest"); EXPECT_EQ(id.Name(), "cardboard box"); EXPECT_EQ(id.Version(), 0u); } @@ -219,12 +220,12 @@ TEST_F(FuelClientTest, ParseModelURL) FuelClient client(config); ModelIdentifier id; const std::string url{ - "https://fuel.ignitionrobotics.org/german/models/Cardboard Box/tip"}; + "https://fuel.gazebosim.org/openroboticstest/models/Cardboard Box/tip"}; EXPECT_TRUE(client.ParseModelUrl(common::URI(url), id)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "german"); + EXPECT_EQ(id.Owner(), "openroboticstest"); EXPECT_EQ(id.Name(), "cardboard box"); EXPECT_EQ(id.Version(), 0u); } @@ -254,28 +255,30 @@ TEST_F(FuelClientTest, ParseModelURL) FuelClient client; ModelIdentifier id; const std::string url{ - "https://fuel.ignitionrobotics.org/german/models/Cardboard Box/banana"}; + "https://fuel.gazebosim.org/openroboticstest/models/Cardboard Box/banana" + }; EXPECT_FALSE(client.ParseModelUrl(common::URI(url), id)); } { FuelClient client; ModelIdentifier id; const std::string url{ - "https://fuel.ignitionrobotics.org/banana/german/models/Cardboard Box"}; + "https://fuel.gazebosim.org/banana/openroboticstest/models/Cardboard Box" + }; EXPECT_FALSE(client.ParseModelUrl(common::URI(url), id)); } { FuelClient client; ModelIdentifier id; const std::string url{ - "https://fuel.ignitionrobotics.org/99/german/models/Cardboard Box"}; + "https://fuel.gazebosim.org/99/openroboticstest/models/Cardboard Box"}; EXPECT_FALSE(client.ParseModelUrl(common::URI(url), id)); } { FuelClient client; ModelIdentifier id; const std::string url{ - "https://fuel.ignitionrobotics.org/2/2/german/models" + "https://fuel.gazebosim.org/2/2/openroboticstest/models" "/Cardboard Box/banana"}; EXPECT_FALSE(client.ParseModelUrl(common::URI(url), id)); } @@ -290,15 +293,15 @@ TEST_F(FuelClientTest, ParseModelFileURL) ModelIdentifier id; std::string filePath; const common::URI modelUrl{ - "https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/" - "Cordless Drill/tip/files/meshes/cordless_drill.dae"}; + "https://fuel.gazebosim.org/1.0/openroboticstest/models/" + "backpack/tip/files/model.sdf"}; EXPECT_TRUE(client.ParseModelFileUrl(modelUrl, id, filePath)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "openrobotics"); - EXPECT_EQ(id.Name(), "cordless drill"); - EXPECT_EQ(filePath, "meshes/cordless_drill.dae"); + EXPECT_EQ(id.Owner(), "openroboticstest"); + EXPECT_EQ(id.Name(), "backpack"); + EXPECT_EQ(filePath, "model.sdf"); } // URL - with client config @@ -309,15 +312,15 @@ TEST_F(FuelClientTest, ParseModelFileURL) ModelIdentifier id; std::string filePath; const common::URI modelUrl{ - "https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Pine Tree/tip/" - "files/materials/scripts/pine_tree.material"}; + "https://fuel.gazebosim.org/1.0/openroboticstest/models/backpack/" + "tip/files/model.sdf"}; EXPECT_TRUE(client.ParseModelFileUrl(modelUrl, id, filePath)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "openrobotics"); - EXPECT_EQ(id.Name(), "pine tree"); - EXPECT_EQ(filePath, "materials/scripts/pine_tree.material"); + EXPECT_EQ(id.Owner(), "openroboticstest"); + EXPECT_EQ(id.Name(), "backpack"); + EXPECT_EQ(filePath, "model.sdf"); } // URL - version different from config @@ -328,14 +331,14 @@ TEST_F(FuelClientTest, ParseModelFileURL) ModelIdentifier id; std::string filePath; const common::URI modelUrl{ - "https://fuel.ignitionrobotics.org/5.0/OpenRobotics/models/Pine Tree/tip/" - "files/model.sdf"}; + "https://fuel.gazebosim.org/5.0/openroboticstest/models/backpack/" + "tip/files/model.sdf"}; EXPECT_TRUE(client.ParseModelFileUrl(modelUrl, id, filePath)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "openrobotics"); - EXPECT_EQ(id.Name(), "pine tree"); + EXPECT_EQ(id.Owner(), "openroboticstest"); + EXPECT_EQ(id.Name(), "backpack"); EXPECT_EQ(filePath, "model.sdf"); } @@ -345,16 +348,16 @@ TEST_F(FuelClientTest, ParseModelFileURL) ModelIdentifier id; std::string filePath; const common::URI modelUrl{ - "https://fuel.ignitionrobotics.org/OpenRobotics/models/pine tree/tip/" - "files/materials/scripts/pine_tree.material"}; + "https://fuel.gazebosim.org/openroboticstest/models/backpack/tip/" + "files/model.sdf"}; EXPECT_TRUE(client.ParseModelFileUrl(modelUrl, id, filePath)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_FALSE(id.Server().Version().empty()); EXPECT_EQ("1.0", id.Server().Version()); - EXPECT_EQ(id.Owner(), "openrobotics"); - EXPECT_EQ(id.Name(), "pine tree"); - EXPECT_EQ(filePath, "materials/scripts/pine_tree.material"); + EXPECT_EQ(id.Owner(), "openroboticstest"); + EXPECT_EQ(id.Name(), "backpack"); + EXPECT_EQ(filePath, "model.sdf"); } // Unique name - with client config @@ -365,15 +368,15 @@ TEST_F(FuelClientTest, ParseModelFileURL) ModelIdentifier id; std::string filePath; const common::URI modelUrl{ - "https://fuel.ignitionrobotics.org/openrobotics/models/Pine Tree/tip/" - "files/materials/scripts/pine_tree.material"}; + "https://fuel.gazebosim.org/openroboticstest/models/backpack/tip/" + "files/model.sdf"}; EXPECT_TRUE(client.ParseModelFileUrl(modelUrl, id, filePath)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "openrobotics"); - EXPECT_EQ(id.Name(), "pine tree"); - EXPECT_EQ(filePath, "materials/scripts/pine_tree.material"); + EXPECT_EQ(id.Owner(), "openroboticstest"); + EXPECT_EQ(id.Name(), "backpack"); + EXPECT_EQ(filePath, "model.sdf"); } // Bad URL @@ -397,7 +400,7 @@ TEST_F(FuelClientTest, ParseModelFileURL) ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_F(FuelClientTest, DownloadModel) { // Configure to use binary path as cache @@ -415,7 +418,7 @@ TEST_F(FuelClientTest, DownloadModel) { // Unversioned URL should get the latest available version common::URI url{ - "https://fuel.ignitionrobotics.org/1.0/chapulina/models/Test box"}; + "https://fuel.gazebosim.org/1.0/openroboticstest/models/test box"}; // Check it is not cached std::string cachedPath; @@ -431,12 +434,12 @@ TEST_F(FuelClientTest, DownloadModel) // Check it was downloaded to `2` auto modelPath = common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "chapulina", "models", "test box"); + "fuel.gazebosim.org", "openroboticstest", "models", "test box"); - EXPECT_EQ(path, common::joinPaths(modelPath, "2")); - EXPECT_TRUE(common::exists(common::joinPaths(modelPath, "2"))); - EXPECT_TRUE(common::exists(common::joinPaths(modelPath, "2", "model.sdf"))); - EXPECT_TRUE(common::exists(common::joinPaths(modelPath, "2", + EXPECT_EQ(path, common::joinPaths(modelPath, "1")); + EXPECT_TRUE(common::exists(common::joinPaths(modelPath, "1"))); + EXPECT_TRUE(common::exists(common::joinPaths(modelPath, "1", "model.sdf"))); + EXPECT_TRUE(common::exists(common::joinPaths(modelPath, "1", "model.config"))); // Check it wasn't downloaded to model root directory @@ -446,14 +449,14 @@ TEST_F(FuelClientTest, DownloadModel) Result res3 = client.CachedModel(url, cachedPath); EXPECT_TRUE(res3); EXPECT_EQ(ResultType::FETCH_ALREADY_EXISTS, res3.Type()); - EXPECT_EQ(common::joinPaths(modelPath, "2"), cachedPath); + EXPECT_EQ(common::joinPaths(modelPath, "1"), cachedPath); } // Download model with pbr paths from URL and check that paths are fixed { // Unversioned URL should get the latest available version common::URI url{ - "https://fuel.ignitionrobotics.org/1.0/iche033/models/Rescue Randy"}; + "https://fuel.gazebosim.org/1.0/openroboticstest/models/Rescue Randy"}; // Check it is not cached std::string cachedPath; @@ -469,7 +472,7 @@ TEST_F(FuelClientTest, DownloadModel) // Check it was downloaded to `2` auto modelPath = common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "iche033", "models", "rescue randy"); + "fuel.gazebosim.org", "openroboticstest", "models", "rescue randy"); EXPECT_EQ(path, common::joinPaths(modelPath, "2")); EXPECT_TRUE(common::exists(common::joinPaths(modelPath, "2"))); @@ -506,9 +509,10 @@ TEST_F(FuelClientTest, DownloadModel) // Download model with a dependency specified within its `metadata.pbtxt` { common::URI url{ - "https://fuel.ignitionrobotics.org/1.0/JShep1/models/hatchback_red_1"}; + "https://fuel.gazebosim.org/1.0/openroboticstest/models/hatchback_red_1" + }; common::URI depUrl{ - "https://fuel.ignitionrobotics.org/1.0/JShep1/models/hatchback_1"}; + "https://fuel.gazebosim.org/1.0/openroboticstest/models/hatchback_1"}; // Check it is not cached std::string cachedPath; @@ -542,7 +546,7 @@ TEST_F(FuelClientTest, DownloadModel) // The dependency points to fuel.gazebosim.org. { common::URI url{ - "https://fuel.ignitionrobotics.org/1.0/openrobotics/models/hatchback red" + "https://fuel.gazebosim.org/1.0/openrobotics/models/hatchback red" }; common::URI depUrl{ "https://fuel.gazebosim.org/1.0/openrobotics/models/hatchback"}; @@ -578,7 +582,7 @@ TEST_F(FuelClientTest, DownloadModel) // Try using nonexistent URL { std::string url{ - "https://fuel.ignitionrobotics.org/1.0/chapulina/models/" + "https://fuel.gazebosim.org/1.0/openroboticstest/models/" "Inexistent model"}; std::string path; Result result = client.DownloadModel(common::URI(url), path); @@ -598,7 +602,7 @@ TEST_F(FuelClientTest, DownloadModel) ///////////////////////////////////////////////// // Windows doesn't support colons in filenames -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/106 +// https://github.com/gazebosim/gz-fuel-tools/issues/106 TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(ModelDependencies)) { // Configure to use binary path as cache @@ -615,9 +619,10 @@ TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(ModelDependencies)) // Download model with a dependency specified within its `metadata.pbtxt` { common::URI url{ - "https://fuel.ignitionrobotics.org/1.0/JShep1/models/hatchback_red_1"}; + "https://fuel.gazebosim.org/1.0/openroboticstest/models/hatchback_red_1" + }; common::URI depUrl{ - "https://fuel.ignitionrobotics.org/1.0/JShep1/models/hatchback_1"}; + "https://fuel.gazebosim.org/1.0/openroboticstest/models/hatchback_1"}; ModelIdentifier id; ModelIdentifier depId; @@ -672,7 +677,7 @@ TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(ModelDependencies)) ///////////////////////////////////////////////// // Windows doesn't support colons in filenames -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/106 +// https://github.com/gazebosim/gz-fuel-tools/issues/106 TEST_F(FuelClientTest, CachedModel) { // Configure to use binary path as cache and populate it @@ -812,12 +817,12 @@ TEST_F(FuelClientTest, ParseWorldUrl) FuelClient client; WorldIdentifier id; const common::URI url{ - "https://fuel.ignitionrobotics.org/1.0/german/worlds/Cardboard Box"}; + "https://fuel.gazebosim.org/1.0/openroboticstest/worlds/Cardboard Box"}; EXPECT_TRUE(client.ParseWorldUrl(url, id)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "german"); + EXPECT_EQ(id.Owner(), "openroboticstest"); EXPECT_EQ(id.Name(), "cardboard box"); EXPECT_EQ(id.Version(), 0u); } @@ -831,12 +836,12 @@ TEST_F(FuelClientTest, ParseWorldUrl) FuelClient client(config); WorldIdentifier id; const common::URI url{ - "https://fuel.ignitionrobotics.org/1.0/german/worlds/Cardboard Box/4"}; + "https://fuel.gazebosim.org/1.0/openroboticstest/worlds/Cardboard Box/4"}; EXPECT_TRUE(client.ParseWorldUrl(url, id)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "german"); + EXPECT_EQ(id.Owner(), "openroboticstest"); EXPECT_EQ(id.Name(), "cardboard box"); EXPECT_EQ(id.Version(), 4u); } @@ -850,12 +855,12 @@ TEST_F(FuelClientTest, ParseWorldUrl) FuelClient client(config); WorldIdentifier id; const common::URI url{ - "https://fuel.ignitionrobotics.org/5.0/german/worlds/Cardboard Box/6"}; + "https://fuel.gazebosim.org/5.0/openroboticstest/worlds/Cardboard Box/6"}; EXPECT_TRUE(client.ParseWorldUrl(url, id)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "german"); + EXPECT_EQ(id.Owner(), "openroboticstest"); EXPECT_EQ(id.Name(), "cardboard box"); EXPECT_EQ(id.Version(), 6u); } @@ -867,13 +872,13 @@ TEST_F(FuelClientTest, ParseWorldUrl) FuelClient client; WorldIdentifier id; const common::URI url{ - "https://fuel.ignitionrobotics.org/german/worlds/Cardboard Box"}; + "https://fuel.gazebosim.org/openroboticstest/worlds/Cardboard Box"}; EXPECT_TRUE(client.ParseWorldUrl(url, id)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_FALSE(id.Server().Version().empty()); EXPECT_EQ("1.0", id.Server().Version()); - EXPECT_EQ(id.Owner(), "german"); + EXPECT_EQ(id.Owner(), "openroboticstest"); EXPECT_EQ(id.Name(), "cardboard box"); EXPECT_EQ(id.Version(), 0u); } @@ -888,12 +893,12 @@ TEST_F(FuelClientTest, ParseWorldUrl) FuelClient client(config); WorldIdentifier id; const common::URI url{ - "https://fuel.ignitionrobotics.org/german/worlds/Cardboard Box/tip/"}; + "https://fuel.gazebosim.org/openroboticstest/worlds/Cardboard Box/tip/"}; EXPECT_TRUE(client.ParseWorldUrl(url, id)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); - EXPECT_EQ(id.Owner(), "german"); + EXPECT_EQ(id.Owner(), "openroboticstest"); EXPECT_EQ(id.Name(), "cardboard box"); EXPECT_EQ(id.Version(), 0u); } @@ -920,28 +925,29 @@ TEST_F(FuelClientTest, ParseWorldUrl) FuelClient client; WorldIdentifier id; const common::URI url{ - "https://fuel.ignitionrobotics.org/german/worlds/Cardboard Box/banana"}; + "https://fuel.gazebosim.org/openroboticstest/worlds/Cardboard Box/here"}; EXPECT_FALSE(client.ParseWorldUrl(url, id)); } { FuelClient client; WorldIdentifier id; const common::URI url{ - "https://fuel.ignitionrobotics.org/banana/german/worlds/Cardboard Box"}; + "https://fuel.gazebosim.org/banana/openroboticstest/worlds/Cardboard Box" + }; EXPECT_FALSE(client.ParseWorldUrl(url, id)); } { FuelClient client; WorldIdentifier id; const common::URI url{ - "https://fuel.ignitionrobotics.org/99/german/worlds/Cardboard Box"}; + "https://fuel.gazebosim.org/99/openroboticstest/worlds/Cardboard Box"}; EXPECT_FALSE(client.ParseWorldUrl(url, id)); } { FuelClient client; WorldIdentifier id; const common::URI url{ - "https://fuel.ignitionrobotics.org/2/2/german/worlds/Cardboard Box" + "https://fuel.gazebosim.org/2/2/openroboticstest/worlds/Cardboard Box" "/banana"}; EXPECT_FALSE(client.ParseWorldUrl(url, id)); } @@ -956,11 +962,11 @@ TEST_F(FuelClientTest, ParseWorldFileUrl) WorldIdentifier id; std::string filePath; const common::URI worldUrl{ - "https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty/tip/" + "https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty/tip/" "files/test.world"}; EXPECT_TRUE(client.ParseWorldFileUrl(worldUrl, id, filePath)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); EXPECT_EQ(id.Owner(), "openrobotics"); EXPECT_EQ(id.Name(), "empty"); @@ -975,11 +981,11 @@ TEST_F(FuelClientTest, ParseWorldFileUrl) WorldIdentifier id; std::string filePath; const common::URI worldUrl{ - "https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty sky/tip/" + "https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty sky/tip/" "files/empty_sky.world"}; EXPECT_TRUE(client.ParseWorldFileUrl(worldUrl, id, filePath)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); EXPECT_EQ(id.Owner(), "openrobotics"); EXPECT_EQ(id.Name(), "empty sky"); @@ -994,11 +1000,11 @@ TEST_F(FuelClientTest, ParseWorldFileUrl) WorldIdentifier id; std::string filePath; const common::URI worldUrl{ - "https://fuel.ignitionrobotics.org/5.0/OpenRobotics/worlds/Empty/tip/" + "https://fuel.gazebosim.org/5.0/OpenRobotics/worlds/Empty/tip/" "files/test.world"}; EXPECT_TRUE(client.ParseWorldFileUrl(worldUrl, id, filePath)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); EXPECT_EQ(id.Owner(), "openrobotics"); EXPECT_EQ(id.Name(), "empty"); @@ -1011,11 +1017,11 @@ TEST_F(FuelClientTest, ParseWorldFileUrl) WorldIdentifier id; std::string filePath; const common::URI worldUrl{ - "https://fuel.ignitionrobotics.org/OpenRobotics/worlds/Empty sky/tip/" + "https://fuel.gazebosim.org/OpenRobotics/worlds/Empty sky/tip/" "files/empty_sky.world"}; EXPECT_TRUE(client.ParseWorldFileUrl(worldUrl, id, filePath)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_FALSE(id.Server().Version().empty()); EXPECT_EQ("1.0", id.Server().Version()); EXPECT_EQ(id.Owner(), "openrobotics"); @@ -1031,11 +1037,11 @@ TEST_F(FuelClientTest, ParseWorldFileUrl) WorldIdentifier id; std::string filePath; const common::URI worldUrl{ - "https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty/tip/" + "https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty/tip/" "files/test.world"}; EXPECT_TRUE(client.ParseWorldFileUrl(worldUrl, id, filePath)); - EXPECT_EQ(id.Server().Url().Str(), "https://fuel.ignitionrobotics.org"); + EXPECT_EQ(id.Server().Url().Str(), "https://fuel.gazebosim.org"); EXPECT_EQ(id.Server().Version(), "1.0"); EXPECT_EQ(id.Owner(), "openrobotics"); EXPECT_EQ(id.Name(), "empty"); @@ -1063,7 +1069,7 @@ TEST_F(FuelClientTest, ParseWorldFileUrl) ////////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_F(FuelClientTest, DownloadWorld) { // Configure to use binary path as cache @@ -1073,7 +1079,7 @@ TEST_F(FuelClientTest, DownloadWorld) ServerConfig server; server.SetUrl(common::URI( - "https://fuel.ignitionrobotics.org")); + "https://fuel.gazebosim.org")); ClientConfig config; config.AddServer(server); @@ -1086,7 +1092,7 @@ TEST_F(FuelClientTest, DownloadWorld) // Download world from URL { // Unversioned URL should get the latest available version - common::URI url{"https://fuel.ignitionrobotics.org/1.0/OpenRobotics/" + common::URI url{"https://fuel.gazebosim.org/1.0/OpenRobotics/" "worlds/Test world"}; // Check it is not cached @@ -1103,7 +1109,7 @@ TEST_F(FuelClientTest, DownloadWorld) // Check it was downloaded to `1` auto worldPath = common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "openrobotics", "worlds", "test world"); + "fuel.gazebosim.org", "openrobotics", "worlds", "test world"); EXPECT_EQ(path, common::joinPaths(worldPath, "2")); EXPECT_TRUE(common::exists(common::joinPaths(worldPath, "2"))); @@ -1122,7 +1128,7 @@ TEST_F(FuelClientTest, DownloadWorld) // Try using nonexistent URL { common::URI url{ - "https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Bad world"}; + "https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Bad world"}; std::string path; auto result = client.DownloadWorld(url, path); EXPECT_FALSE(result); @@ -1141,7 +1147,7 @@ TEST_F(FuelClientTest, DownloadWorld) ///////////////////////////////////////////////// // Windows doesn't support colons in filenames -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/106 +// https://github.com/gazebosim/gz-fuel-tools/issues/106 TEST_F(FuelClientTest, CachedWorld) { // Configure to use binary path as cache and populate it @@ -1331,7 +1337,7 @@ TEST_F(FuelClientTest, WorldDetails) ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_F(FuelClientTest, Models) { ClientConfig config; @@ -1351,7 +1357,7 @@ TEST_F(FuelClientTest, Models) } { - // Uses fuel.ignitionrobotics.org by default + // Uses fuel.gazebosim.org by default ModelIter iter = client.Models(serverConfig); EXPECT_TRUE(iter); } @@ -1365,7 +1371,7 @@ TEST_F(FuelClientTest, Models) ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_F(FuelClientTest, Worlds) { ClientConfig config; @@ -1385,7 +1391,7 @@ TEST_F(FuelClientTest, Worlds) } { - // Uses fuel.ignitionrobotics.org by default + // Uses fuel.gazebosim.org by default WorldIter iter = client.Worlds(serverConfig); EXPECT_TRUE(iter); } From 413f60bd7b78545610887f2b51c8409172a841e5 Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Mon, 5 Dec 2022 14:17:37 -0800 Subject: [PATCH 4/8] Update tutorials to use gazebo (#303) * Adds a deprecation warning about fuel.ignitionrobotics.org Signed-off-by: Nate Koenig * Added deprecation notice Signed-off-by: Nate Koenig * spelling Signed-off-by: Nate Koenig * Update tutorials to use gazebo Signed-off-by: Nate Koenig * fix version numbers Signed-off-by: Nate Koenig * Fix some tests Signed-off-by: Nate Koenig * fix codecheck Signed-off-by: Nate Koenig * Retargeting to main Signed-off-by: Nate Koenig * spaces Signed-off-by: Nate Koenig Signed-off-by: Nate Koenig Co-authored-by: Nate Koenig --- tutorials/01_installation.md | 64 +++++++++++++++++------------------ tutorials/02_configuration.md | 26 +++++++------- tutorials/03_command_line.md | 48 +++++++++++++------------- tutorials/04_cpp_api.md | 16 ++++----- tutorials/index.md | 12 +++---- 5 files changed, 82 insertions(+), 84 deletions(-) diff --git a/tutorials/01_installation.md b/tutorials/01_installation.md index 33661c9c..1fdd06a2 100644 --- a/tutorials/01_installation.md +++ b/tutorials/01_installation.md @@ -4,7 +4,7 @@ Next Tutorial: \ref configuration ## Overview -Instructions to install Ignition Fuel Tools on all the platforms supported. +Instructions to install Gazebo Fuel Tools on all the platforms supported. ## Binary Install @@ -21,17 +21,17 @@ Setup keys: wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - ``` -Install Ignition Fuel Tools: +Install Gazebo Fuel Tools: ``` sudo apt-get update -sudo apt-get install libignition-fuel-tools4-dev +sudo apt-get install libgz-fuel-tools4-dev ``` ### Mac OS X -Ignition Fuel Tools and several of its dependencies can be compiled on OS +Gazebo Fuel Tools and several of its dependencies can be compiled on OS X with [Homebrew](http://brew.sh/) using the [osrf/simulation -tap](https://github.com/osrf/homebrew-simulation). Ignition Fuel Tools can +tap](https://github.com/osrf/homebrew-simulation). Gazebo Fuel Tools can be installed on Mac OS X 10.11 (El Capitan) or higher. Installation on older versions requires changing the default standard library and rebuilding dependencies due to the use of c++11. For @@ -47,7 +47,7 @@ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/ Run the following commands: ``` brew tap osrf/simulation -brew install ignition-fuel-tools4 +brew install gz-fuel-tools4 ``` ### Windows @@ -57,44 +57,44 @@ Miniconda suffices. Create if necessary, and activate a Conda environment: ``` -conda create -n ign-ws -conda activate ign-ws +conda create -n gz-ws +conda activate gz-ws ``` Install: ``` -conda install libignition-fuel-tools<#> --channel conda-forge +conda install libgz-fuel-tools<#> --channel conda-forge ``` -Be sure to replace `<#>` with a number value, such as 1 or 2, depending on +Be sure to replace `<#>` with a number value, such as 4 or 5, depending on which version you need. ## Source Install ### Ubuntu Linux -For compiling the latest version of Ignition Fuel Tools you will need an +For compiling the latest version of Gazebo Fuel Tools you will need an Ubuntu distribution equal to 16.04 (Xenial) or newer. Make sure you have removed the Ubuntu pre-compiled binaries before installing from source: ``` -sudo apt-get remove libignition-fuel-tools4-dev +sudo apt-get remove libgz-fuel-tools4-dev ``` Install prerequisites. A clean Ubuntu system will need: ``` -sudo apt-get install git cmake pkg-config python ruby-ronn libignition-cmake2-dev libignition-common3-dev libignition-msgs5-dev libignition-tools-dev libzip-dev libjsoncpp-dev libcurl4-openssl-dev libyaml-dev +sudo apt-get install git cmake pkg-config python ruby-ronn libgz-cmake2-dev libgz-common3-dev libgz-msgs5-dev libgz-tools-dev libzip-dev libjsoncpp-dev libcurl4-openssl-dev libyaml-dev ``` Clone the repository into a directory and go into it: ``` -git clone https://github.com/ignitionrobotics/ign-fuel-tools /tmp/ign-fuel-tools -cd /tmp/ign-fuel-tools +git clone https://github.com/gazbosim/gz-fuel-tools /tmp/gz-fuel-tools +cd /tmp/gz-fuel-tools ``` Create a build directory and go there: @@ -104,7 +104,7 @@ mkdir build cd build ``` -Configure Ignition Fuel Tools (choose either method a or b below): +Configure Gazebo Fuel Tools (choose either method a or b below): * A. Release mode: This will generate optimized code, but will not have debug symbols. Use this mode if you don't need to use GDB. ``` @@ -117,7 +117,7 @@ Configure Ignition Fuel Tools (choose either method a or b below): cmake -DCMAKE_INSTALL_PREFIX=/home/$USER/local ../ ``` -* B. Debug mode: This will generate code with debug symbols. Ignition Fuel Tools will run slower, but you'll be able to use GDB. +* B. Debug mode: This will generate code with debug symbols. Gazebo Fuel Tools will run slower, but you'll be able to use GDB. ``` cmake -DCMAKE_BUILD_TYPE=Debug ../ ``` @@ -134,12 +134,12 @@ look something like: -- Install prefix: /home/$USER/local ``` -Build Ignition Fuel Tools: +Build Gazebo Fuel Tools: ``` make -j4 ``` -Install Ignition Fuel Tools: +Install Gazebo Fuel Tools: ``` sudo make install ``` @@ -152,12 +152,12 @@ echo "export LD_LIBRARY_PATH=/local/lib:$LD_LIBRARY_PATH" >> ~/.ba #### Uninstalling Source Install -If you need to uninstall Ignition Fuel Tools or switch back to a +If you need to uninstall Gazebo Fuel Tools or switch back to a debian-based install when you currently have installed the library from source, navigate to your source code directory's build folders and run `make uninstall`: ``` -cd /tmp/ign-fuel-tools/build +cd /tmp/gz-fuel-tools/build sudo make uninstall ``` @@ -165,14 +165,14 @@ sudo make uninstall #### Prerequisites -First, follow the [ign-cmake](https://github.com/ignitionrobotics/ign-cmake) tutorial for installing Conda, Visual Studio, CMake, etc., prerequisites, and creating a Conda environment. +First, follow the [gz-cmake](https://github.com/gazebosim/gz-cmake) tutorial for installing Conda, Visual Studio, CMake, etc., prerequisites, and creating a Conda environment. Navigate to ``condabin`` if necessary to use the ``conda`` command (i.e., if Conda is not in your `PATH` environment variable. You can find the location of ``condabin`` in Anaconda Prompt, ``where conda``). Create if necessary, and activate a Conda environment: ``` -conda create -n ign-ws -conda activate ign-ws +conda create -n gz-ws +conda activate gz-ws ``` Install dependencies: @@ -180,34 +180,34 @@ Install dependencies: conda install jsoncpp libzip --channel conda-forge ``` -Install Ignition dependencies: +Install Gazebo dependencies: You can view available versions and their dependencies: ``` -conda search libignition-fuel-tools* --channel conda-forge --info +conda search libgz-fuel-tools* --channel conda-forge --info ``` -Install Ignition dependencies, replacing `<#>` with the desired versions: +Install Gazebo dependencies, replacing `<#>` with the desired versions: ``` -conda install libignition-cmake<#> libignition-common<#> libignition-msgs<#> libignition-tools<#> --channel conda-forge +conda install libgz-cmake<#> libgz-common<#> libgz-msgs<#> libgz-tools<#> --channel conda-forge ``` #### Building from source 1. Activate the Conda environment created in the prerequisites: ``` - conda activate ign-ws + conda activate gz-ws ``` 2. Navigate to where you would like to build the library, and clone the repository. ``` - # Optionally, append `-b ign-fuel-tools#` (replace # with a number) to check out a specific version - git clone https://github.com/ignitionrobotics/ign-fuel-tools.git + # Optionally, append `-b gz-fuel-tools#` (replace # with a number) to check out a specific version + git clone https://github.com/gazebosim/gz-fuel-tools.git ``` 3. Configure and build ``` - cd ign-fuel-tools + cd gz-fuel-tools mkdir build cd build cmake .. -DBUILD_TESTING=OFF # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install diff --git a/tutorials/02_configuration.md b/tutorials/02_configuration.md index 29141578..c5604d2c 100644 --- a/tutorials/02_configuration.md +++ b/tutorials/02_configuration.md @@ -4,18 +4,18 @@ Next Tutorial: \ref cmdline ## Overview -Some aspects of Ignition Fuel Tools can be configured according to the needs of +Some aspects of Gazebo Fuel Tools can be configured according to the needs of the library users. This configuration can be done via a YAML configuration file or programatically. -Ignition Fuel Tools accepts a YAML file with the following syntax: +Gazebo Fuel Tools accepts a YAML file with the following syntax: ``` --- # The list of servers. servers: - - url: https://fuel.ignitionrobotics.org + url: https://fuel.gazbosim.org private-token: # - @@ -23,7 +23,7 @@ servers: # Where are the assets stored in disk. # cache: -# path: /tmp/ignition/fuel +# path: /tmp/gz/fuel ``` The `servers` section specifies all Fuel servers to interact with. @@ -32,12 +32,12 @@ If the server requires auth you can specify the token filling the optional field The `cache` section captures options related with the local storage of the assets. `path` specifies the local directory where all assets will be -downloaded. If not used, all assets are stored under `$HOME/.ignition/fuel`. +downloaded. If not used, all assets are stored under `$HOME/.gz/fuel`. ## Custom configuration file path -Ignition Fuel's default configuration file is stored under -`$HOME/.ignition/fuel/config.yaml`, but it is possible to load a configuration +Gazebo Fuel's default configuration file is stored under +`$HOME/.gz/fuel/config.yaml`, but it is possible to load a configuration file from a custom path programmatically. Let's see how. Create a file `/tmp/my_config.yaml` with the following content: @@ -47,11 +47,11 @@ Create a file `/tmp/my_config.yaml` with the following content: # The list of servers. servers: - - url: https://fuel.ignitionrobotics.org + url: https://fuel.gazebosim.org # Where are the assets stored in disk. cache: - path: /tmp/ignition/fuel + path: /tmp/gz/fuel ``` Now, let's use a program that downloads a resource from a server in the custom @@ -64,13 +64,13 @@ mkdir /tmp/conf_tutorial && cd /tmp/conf_tutorial Download the file `download.cc` and save it under `/tmp/conf_tutorial`: ``` -wget https://github.com/ignitionrobotics/ign-fuel-tools/raw/ign-fuel-tools4/example/download.cc +wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools4/example/download.cc ``` Also, download `CMakeLists.txt` for compiling the example: ``` -wget https://github.com/ignitionrobotics/ign-fuel-tools/raw/ign-fuel-tools4/example/CMakeLists.txt +wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools4/example/CMakeLists.txt ``` Install a dependency: @@ -93,7 +93,7 @@ And now the fun part, execute it: ``` Verify that you have the model in -`/tmp/ignition/fuel/fuel.ignitionrobotics.org/caguero/models/Beer`, +`/tmp/gz/fuel/fuel.gazebosim.org/caguero/models/Beer`, as you configured in your YAML file. ## Walkthrough @@ -148,7 +148,7 @@ purpose we use `SetConfigPath()`. As we're interested in using a configuration file, we need to call `LoadConfig()`. It's important to note that if we call `LoadConfig()` without calling `SetConfigPath()` beforehand, a default configuration file will be loaded (and created if it doesn't already exist under -`$HOME/.ignition/fuel/config.yaml`). If the user doesn't call `LoadConfig()`, no +`$HOME/.gz/fuel/config.yaml`). If the user doesn't call `LoadConfig()`, no configuration file will be used at all. Once we have all our configuration ready and captured in the `conf` object, diff --git a/tutorials/03_command_line.md b/tutorials/03_command_line.md index 4e938d73..fbb768c9 100644 --- a/tutorials/03_command_line.md +++ b/tutorials/03_command_line.md @@ -4,23 +4,23 @@ Next Tutorial: \ref cppapi ## Overview -The `ign fuel` command line tool provides a convenient way to handle Ignition +The `gz fuel` command line tool provides a convenient way to handle Gazebo Fuel resources from a terminal. ## List resources Let's use the command line to list resources available in a web server. -We can do that by running the `ign fuel list` command and pass it the resource +We can do that by running the `gz fuel list` command and pass it the resource type, such as `model` or `world` as follows: -`ign fuel list -t world` +`gz fuel list -t world` You should see a list such as: ``` -Fetching world list from https://fuel.ignitionrobotics.org... +Fetching world list from https://fuel.gazebosim.org... Received world list (took 350ms). -https://fuel.ignitionrobotics.org +https://fuel.gazebosm.org ├── OpenRobotics │ ├── Empty │ └── Shapes @@ -29,30 +29,28 @@ https://fuel.ignitionrobotics.org ``` By default, Fuel will list resources from all the servers listed in your -`config.yaml` file. See the -[configuration tutorial](https://ignitionrobotics.org/tutorials/fuel_tools/1.0/md__data_ignition_ign-fuel-tools_tutorials_02_configuration.html) -for more details. +`config.yaml` file. See the \ref configuration for more details. > **Tip**: If you want to see resources from a different Fuel server, add it to `config.yaml` to and re-run the list command to see resources from both servers! There are a few other options on the command, run the help to see all of them: -`ign fuel list --help` +`gz fuel list --help` ### Raw output One of them is the `--raw` option, which tells the command to print the output in a way that's easier for scripts to parse. For example, try: -`ign fuel list -t world -r` +`gz fuel list -t world -r` And you'll get a list of the world URLs similar to the one below: ``` -https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty -https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Shapes -https://fuel.ignitionrobotics.org/1.0/chapulina/worlds/Shapes%20copy +https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty +https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Shapes +https://fuel.gazebosim.org/1.0/chapulina/worlds/Shapes%20copy ``` ### By owner @@ -60,17 +58,17 @@ https://fuel.ignitionrobotics.org/1.0/chapulina/worlds/Shapes%20copy It's also possible to only list resources belonging to a given user, using the `--owner` flag. Try for example: -`ign fuel list -t model -o OpenRobotics` +`gz fuel list -t model -o OpenRobotics` ## Download resources The command line tool also allows downloading resources from a web server to your -computer. We use the `ign fuel download` tool for this. +computer. We use the `gz fuel download` tool for this. We learned above how to get resource URLs. Now we can use these URLs to download them. For example, try: -`ign fuel download -v 4 -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty` +`gz fuel download -v 4 -u https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty` Note that we passed the `-v 4` option so we get a verbose output. You should see something like: @@ -79,12 +77,12 @@ Downloading world: Name: Empty Owner: OpenRobotics Server: - URL: https://fuel.ignitionrobotics.org + URL: https://fuel.gazebosm.org Version: 1.0 -[Msg] Downloading world [fuel.ignitionrobotics.org/OpenRobotics/worlds/Empty] +[Msg] Downloading world [fuel.gazebosim.org/OpenRobotics/worlds/Empty] [Msg] Saved world at: - /home/louise/.ignition/fuel/fuel.ignitionrobotics.org/OpenRobotics/worlds/Empty/1 + /home/louise/.gz/fuel/fuel.gazebosim.org/OpenRobotics/worlds/Empty/1 Download succeeded. ``` @@ -96,14 +94,14 @@ If the model is privated you can create a config file with your token. For examp # The list of servers. servers: - - url: https://fuel.ignitionrobotics.org + url: https://fuel.gazebosim.org private-token: ``` Then try to download the model: ```bash -ign fuel download -v 4 -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty -c /tmp/my_config.yaml +gz fuel download -v 4 -u https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty -c /tmp/my_config.yaml ``` Worlds downloaded with the tool get conveniently organized into the same @@ -113,7 +111,7 @@ directory, which we call the "local cache". The path is broken down as follows: > **Tip**: You can change the local cache path in `config.yaml`. -> **Tip**: You can also use other tools such as `wget` to download a zipped file of a world, just add `.zip` to the end of the URL, for example: `wget https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty.zip`. +> **Tip**: You can also use other tools such as `wget` to download a zipped file of a world, just add `.zip` to the end of the URL, for example: `wget https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty.zip`. ## Edit resources @@ -122,7 +120,7 @@ uploaded to Fuel. Edit functionality is available through the `edit` sub-command. You can access the list of edit options using: ``` -ign fuel edit -h +gz fuel edit -h ``` You must be the resource owner, or an authorized member of the organization that owns the resource, in order to edit the resource. This in turn means you must use the `--header 'Private-token: YOUR_TOKEN'` option with the `edit` sub-command. @@ -138,11 +136,11 @@ access. Use the `-p` option to make a resources private. For example: ``` -ign fuel edit -p -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty --header 'Private-token: YOUR_TOKEN' +gz fuel edit -p -u https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty --header 'Private-token: YOUR_TOKEN' ``` Use the `-b` option to make a resource public. For example: ``` -ign fuel edit -b -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty --header 'Private-token: YOUR_TOKEN' +gz fuel edit -b -u https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty --header 'Private-token: YOUR_TOKEN' ``` diff --git a/tutorials/04_cpp_api.md b/tutorials/04_cpp_api.md index 6cd4149d..c5273300 100644 --- a/tutorials/04_cpp_api.md +++ b/tutorials/04_cpp_api.md @@ -2,8 +2,8 @@ ## Overview -Ignition Fuel Tools lets you perform a set of operations over the resources -hosted in any Ignition Fuel server. These operations allow you to list all +Gazebo Fuel Tools lets you perform a set of operations over the resources +hosted in any Gazebo Fuel server. These operations allow you to list all resources of a particular server, get the details of a resource or download it. We're going to run a few examples, so let's start by creating a directory for @@ -17,10 +17,10 @@ Download the files `list.cc`, `details.cc`, `download.cc`, `CMakeLists.txt`, and save them under `/tmp/fuel_tutorial`: ``` -wget https://github.com/ignitionrobotics/ign-fuel-tools/raw/ign-fuel-tools4/example/list.cc -wget https://github.com/ignitionrobotics/ign-fuel-tools/raw/ign-fuel-tools4/example/details.cc -wget https://github.com/ignitionrobotics/ign-fuel-tools/raw/ign-fuel-tools4/example/download.cc -wget https://github.com/ignitionrobotics/ign-fuel-tools/raw/ign-fuel-tools4/example/CMakeLists.txt +wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools4/example/list.cc +wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools4/example/details.cc +wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools4/example/download.cc +wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools4/example/CMakeLists.txt ``` Let's start by compiling the examples: @@ -44,7 +44,7 @@ You should see the name of the server followed by its list of models. Here's an example: ``` -[https://fuel.ignitionrobotics.org] +[https://fuel.gazebosim.org] Beer Wastebasket @@ -117,7 +117,7 @@ License name: Creative Commons - Attribution License URL: http://creativecommons.org/licenses/by/4.0 License image URL: https://i.creativecommons.org/l/by/4.0/88x31.png Server: - URL: https://fuel.ignitionrobotics.org + URL: https://fuel.gazebosim.org Version: 1.0 ``` diff --git a/tutorials/index.md b/tutorials/index.md index b4f8d2bc..c320b7a7 100644 --- a/tutorials/index.md +++ b/tutorials/index.md @@ -1,18 +1,18 @@ # Introduction -Ignition Fuel Tools provides both a command line tool and a C++ API which allow -interacting with Ignition Fuel web servers such as -[https://app.ignitionrobotics.org](https://app.ignitionrobotics.org) and their hosted +Gazebo Fuel Tools provides both a command line tool and a C++ API which allow +interacting with Gazebo Fuel web servers such as +[https://app.gazebosm.org](https://app.gazebosim.org) and their hosted simulation resources. ## Simulation resources -The Ignition Fuel web server hosts several resource types relevant to robotics +The Gazebo Fuel web server hosts several resource types relevant to robotics simulation, such as models and worlds. ### Models -A common asset stored in an Ignition Fuel server is a model. A model represents +A common asset stored in an Gazebo Fuel server is a model. A model represents an object in simulation. A model has a name and a description of its visual and physical properties. Models can be as simple as a sphere or complicated as a highly articulated humanoid robot. See the full model specification @@ -20,7 +20,7 @@ highly articulated humanoid robot. See the full model specification ### Worlds -Among the resouces hosted at Ignition Fuel there are "worlds", which describe a +Among the resouces hosted at Gazebo Fuel there are "worlds", which describe a everything inside a simulation, from the robots to the scene properties, lights, physics properties, etc. You can see the full world description here. From 96486365efa0145109b9bca2b5ab835995f11ecf Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Tue, 6 Dec 2022 13:10:21 -0800 Subject: [PATCH 5/8] Change ignitionrobotics.org to gazebosim.org (#304) * Adds a deprecation warning about fuel.ignitionrobotics.org Signed-off-by: Nate Koenig * Added deprecation notice Signed-off-by: Nate Koenig * spelling Signed-off-by: Nate Koenig * Update tutorials to use gazebo Signed-off-by: Nate Koenig * fix version numbers Signed-off-by: Nate Koenig * Change ignitionrobotics.org to gazebosim.org Signed-off-by: Nate Koenig * Fix some tests Signed-off-by: Nate Koenig * fix codecheck Signed-off-by: Nate Koenig * Fixed tests Signed-off-by: Nate Koenig * Update comments with ignitionrobotics Signed-off-by: Nate Koenig * revert change Signed-off-by: Nate Koenig * A few stragglers Signed-off-by: Nate Koenig Signed-off-by: Nate Koenig Co-authored-by: Nate Koenig --- CONTRIBUTING.md | 2 +- Changelog.md | 74 ++++++------- Migration.md | 6 ++ NEWS | 2 +- README.md | 22 ++-- conf/config.yaml | 2 +- example/download.cc | 2 +- include/gz/fuel_tools/FuelClient.hh | 14 +-- src/ClientConfig.cc | 2 +- src/ClientConfig_TEST.cc | 12 +-- src/CollectionIdentifier_TEST.cc | 10 +- src/FuelClient.cc | 34 +++++- src/Interface_TEST.cc | 62 +++++------ src/JSONParser_TEST.cc | 2 +- src/ModelIdentifier_TEST.cc | 10 +- src/ModelIter_TEST.cc | 4 +- src/WorldIdentifier_TEST.cc | 10 +- src/WorldIter_TEST.cc | 2 +- src/Zip_TEST.cc | 2 +- src/cmd/cmdfuel.rb.in | 18 ++-- src/gz.hh | 4 +- src/gz_TEST.cc | 34 +++--- src/gz_src_TEST.cc | 158 ++++++++++++++-------------- 23 files changed, 261 insertions(+), 227 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 147239ce..7f697fd2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1 @@ -See the [Ignition Robotics contributing guide](https://ignitionrobotics.org/docs/all/contributing). +See the [Ignition Robotics contributing guide](https://gazebosim.org/docs/all/contributing). diff --git a/Changelog.md b/Changelog.md index 327a8930..e1c0fedb 100644 --- a/Changelog.md +++ b/Changelog.md @@ -22,88 +22,88 @@ 1. Remove unused files (bitbucket-pipelines, docs) * [Pull request #273](https://github.com/gazebosim/gz-fuel-tools/pull/273) -1. Disable `staging-fuel.ignitionrobotics.org` test +1. Disable `staging-fuel.gazebosim.org` test * [Pull request #257](https://github.com/gazebosim/gz-fuel-tools/pull/257) ### Ignition Fuel Tools 4.5.0 (2022-06-01) 1. APIs for retrieving models in parallel - * [Pull request #199](https://github.com/ignitionrobotics/ign-fuel-tools/pull/199) + * [Pull request #199](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/199) 1. Add missing header guard for Interface.hh - * [Pull request #249](https://github.com/ignitionrobotics/ign-fuel-tools/pull/249) + * [Pull request #249](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/249) 1. Print error when unzipping fails to save a file - * [Pull request #235](https://github.com/ignitionrobotics/ign-fuel-tools/pull/235) + * [Pull request #235](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/235) 1. More checks when manipulating file system in tests - * [Pull request #227](https://github.com/ignitionrobotics/ign-fuel-tools/pull/227) + * [Pull request #227](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/227) 1. Move test cache to build folder - * [Pull request #222](https://github.com/ignitionrobotics/ign-fuel-tools/pull/222) + * [Pull request #222](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/222) 1. Improve and fix `ResultType` tests - * [Pull request #225](https://github.com/ignitionrobotics/ign-fuel-tools/pull/225) + * [Pull request #225](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/225) 1. FuelClient.cc: include - * [Pull request #213](https://github.com/ignitionrobotics/ign-fuel-tools/pull/213) + * [Pull request #213](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/213) ### Ignition Fuel Tools 4.4.0 (2021-06-17) 1. Remove `tools/code_check` and update codecov - * [Pull request #187](https://github.com/ignitionrobotics/ign-fuel-tools/pull/187) + * [Pull request #187](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/187) 1. Fixed windows download - * [Pull request #178](https://github.com/ignitionrobotics/ign-fuel-tools/pull/178) + * [Pull request #178](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/178) 1. Master branch updates - * [Pull request #170](https://github.com/ignitionrobotics/ign-fuel-tools/pull/170) + * [Pull request #170](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/170) 1. Support private-token in `config.yaml` - * [Pull request #156](https://github.com/ignitionrobotics/ign-fuel-tools/pull/156) + * [Pull request #156](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/156) 1. Add Windows Installation - * [Pull request #162](https://github.com/ignitionrobotics/ign-fuel-tools/pull/162) + * [Pull request #162](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/162) 1. Use semantic version and prevent crash if version is missing - * [Pull request #151](https://github.com/ignitionrobotics/ign-fuel-tools/pull/151) + * [Pull request #151](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/151) 1. Document `IGN_FUEL_CACHE_PATH` on command line - * [Pull request #149](https://github.com/ignitionrobotics/ign-fuel-tools/pull/149) + * [Pull request #149](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/149) 1. Support editing/patching model files - * [Pull request #140](https://github.com/ignitionrobotics/ign-fuel-tools/pull/140) + * [Pull request #140](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/140) 1. Set keep alive on - * [Pull request #141](https://github.com/ignitionrobotics/ign-fuel-tools/pull/141) + * [Pull request #141](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/141) ### Ignition Fuel Tools 4.3.0 (2020-12-01) 1. Improve fork experience. - * [Pull request 126](https://github.com/ignitionrobotics/ign-fuel-tools/pull/126) + * [Pull request 126](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/126) 1. Download dependencies. - * [Pull request 123](https://github.com/ignitionrobotics/ign-fuel-tools/pull/123) + * [Pull request 123](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/123) 1. Includes all changes up to version 3.5.0. ### Ignition Fuel Tools 4.2.1 (2020-08-26) 1. Fix `ign fuel download`, which was missing the `-j` option. - * [Pull request 116](https://github.com/ignitionrobotics/ign-fuel-tools/pull/116) + * [Pull request 116](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/116) ### Ignition Fuel Tools 4.2.0 (2020-08-26) 1. Set license information based on licenses available from a Fuel server and `legal` information in a `metadata.pbtxt` file. - * [Pull request 69](https://github.com/ignitionrobotics/ign-fuel-tools/pull/69) + * [Pull request 69](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/69) 1. Added `edit` subcommand to the `ign fuel`. The edit command currently supports editing a model's privacy. - * [Pull request 67](https://github.com/ignitionrobotics/ign-fuel-tools/pull/67) + * [Pull request 67](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/67) 1. Alphabetical listing of subcommands. - * [Pull request 65](https://github.com/ignitionrobotics/ign-fuel-tools/pull/65) + * [Pull request 65](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/65) 1. All changes up to and including Ignition Fuel Tools 3.3.0 are included. @@ -132,52 +132,52 @@ ### Ignition Fuel Tools 3.5.0 (2020-11-30) 1. Fix windows build. - * [Pull request 107](https://github.com/ignitionrobotics/ign-fuel-tools/pull/107) + * [Pull request 107](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/107) 1. Resolve updated codecheck issues. - * [Pull request 129](https://github.com/ignitionrobotics/ign-fuel-tools/pull/129) + * [Pull request 129](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/129) 1. Update Backpack model to fix tests. - * [Pull request 132](https://github.com/ignitionrobotics/ign-fuel-tools/pull/132) + * [Pull request 132](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/132) 1. Use lowercase resource and owner names when storing assets on disk. - * [Pull request 130](https://github.com/ignitionrobotics/ign-fuel-tools/pull/130) + * [Pull request 130](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/130) ### Ignition Fuel Tools 3.4.0 (2020-08-19) 1. Modernize github actions by updating to the new style. - * [Pull request 94](https://github.com/ignitionrobotics/ign-fuel-tools/pull/94) + * [Pull request 94](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/94) 1. Fix test worlds. - * [Pull request 100](https://github.com/ignitionrobotics/ign-fuel-tools/pull/100) + * [Pull request 100](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/100) 1. Add capability for downloading collections. - * [Pull request 98](https://github.com/ignitionrobotics/ign-fuel-tools/pull/98) + * [Pull request 98](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/98) 1. Fix windows build.t - * [Pull request 103](https://github.com/ignitionrobotics/ign-fuel-tools/pull/013) + * [Pull request 103](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/013) ### Ignition Fuel Tools 3.3.0 (2020-07-29) 1. openrobotics to OpenRobotics - * [Pull request 75](https://github.com/ignitionrobotics/ign-fuel-tools/pull/75) + * [Pull request 75](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/75) 1. Fix world tests - * [Pull request 76](https://github.com/ignitionrobotics/ign-fuel-tools/pull/76) + * [Pull request 76](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/76) 1. Add missing dependency in Actions CI - * [Pull request 86](https://github.com/ignitionrobotics/ign-fuel-tools/pull/86) + * [Pull request 86](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/86) 1. Backport file fetching - * [Pull request 84](https://github.com/ignitionrobotics/ign-fuel-tools/pull/84) + * [Pull request 84](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/84) 1. Convert model:// to Fuel URLs instead of absolute paths - * [Pull request 85](https://github.com/ignitionrobotics/ign-fuel-tools/pull/85) + * [Pull request 85](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/85) ### Ignition Fuel Tools 3.2.2 (2020-05-18) 1. Fix URL encodings in RestClient. - * [Pull request 70](https://github.com/ignitionrobotics/ign-fuel-tools/pull/70) + * [Pull request 70](https://gazebosim.org/gazebosim/gz-fuel-tools/pull/70) 1. Print message when downloading a resource. * [BitBucket pull request 102](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-fuel-tools/pull-requests/102) diff --git a/Migration.md b/Migration.md index 622d9dc6..9453ed14 100644 --- a/Migration.md +++ b/Migration.md @@ -1,5 +1,11 @@ ## Ignition Fuel Tools 3.X to 4.X +### Depercations + +1. The `fuel.gazebosim.org` Fuel server has been deprecated, and + redirects to `fuel.gazebosim.org`. Use `fuel.gazebosim.org` in all Fuel + URLs. + ### Modifications 1. `FuelClient::UploadModel` takes 2 more arguments now. diff --git a/NEWS b/NEWS index d4615e07..4c6923c5 100644 --- a/NEWS +++ b/NEWS @@ -1 +1 @@ -http://bitbucket.org/ignitionrobotics/ign-rndf \ No newline at end of file +https://gazebosim.org diff --git a/README.md b/README.md index 26d56adb..b731bafa 100644 --- a/README.md +++ b/README.md @@ -33,16 +33,16 @@ For a complete list of commands run `ign fuel -h` on the command line. ** List all models ** ``` $ ign fuel list -t model -r | head -https://fuel.ignitionrobotics.org/anonymous/test_model_595389531 -https://fuel.ignitionrobotics.org/anonymous/test_model_122023392 -https://fuel.ignitionrobotics.org/anonymous/test_model_429486665 -https://fuel.ignitionrobotics.org/anonymous/test_model_887243621 -https://fuel.ignitionrobotics.org/anonymous/test_model_084900530 -https://fuel.ignitionrobotics.org/anonymous/test_model_240061059 -https://fuel.ignitionrobotics.org/anonymous/test_model_464734097 -https://fuel.ignitionrobotics.org/anonymous/test_model_658598990 -https://fuel.ignitionrobotics.org/anonymous/test_model_834617935 -https://fuel.ignitionrobotics.org/anonymous/test_model_380348669 +https://fuel.gazebosim.org/anonymous/test_model_595389531 +https://fuel.gazebosim.org/anonymous/test_model_122023392 +https://fuel.gazebosim.org/anonymous/test_model_429486665 +https://fuel.gazebosim.org/anonymous/test_model_887243621 +https://fuel.gazebosim.org/anonymous/test_model_084900530 +https://fuel.gazebosim.org/anonymous/test_model_240061059 +https://fuel.gazebosim.org/anonymous/test_model_464734097 +https://fuel.gazebosim.org/anonymous/test_model_658598990 +https://fuel.gazebosim.org/anonymous/test_model_834617935 +https://fuel.gazebosim.org/anonymous/test_model_380348669 ``` ** Download a model ** @@ -107,7 +107,7 @@ See issues beginning with [Fuel backend] in the title. Here are two examples. ** TODO: Find a model on disk ** ``` $ ign fuel locate --name am1 -/home/developer/.ignition/fuel/fuel.ignitionrobotics.org/alice/am1 +/home/developer/.ignition/fuel/fuel.gazebosim.org/alice/am1 ``` ## Dependencies diff --git a/conf/config.yaml b/conf/config.yaml index aed27fc4..75cfa7bf 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -3,7 +3,7 @@ servers: - name: osrf - url: https://fuel.ignitionrobotics.org + url: https://fuel.gazebosim.org # - # name: another_server diff --git a/example/download.cc b/example/download.cc index 2cc75c04..c03074af 100644 --- a/example/download.cc +++ b/example/download.cc @@ -38,7 +38,7 @@ int main(int argc, char **argv) usage += " Usage:\n ./download \n\n"; usage += " Examples:\n" "\t ./download -t model -o OpenRobotics -n Beer\n" - "\t ./download -s https://fuel.ignitionrobotics.org -t world " + "\t ./download -s https://fuel.gazebosim.org -t world " "-o OpenRobotics" " -n Empty\n" "\t ./download -c /tmp/my_config.yaml -t model -o caguero -n Beer\n"; diff --git a/include/gz/fuel_tools/FuelClient.hh b/include/gz/fuel_tools/FuelClient.hh index 07d7bd07..7a7dec15 100644 --- a/include/gz/fuel_tools/FuelClient.hh +++ b/include/gz/fuel_tools/FuelClient.hh @@ -184,7 +184,7 @@ namespace ignition /// \brief Remove a resource, such as a model or world, from Ignition Fuel /// \param[in] _uri The full URI of the resource, e.g: - /// https://fuel.ignitionrobotics.org/1.0/openrobotcs/model/my_model + /// https://fuel.gazebosim.org/1.0/openrobotcs/model/my_model /// \param[in] _headers Headers to set on the HTTP request. /// \return Result of the delete operation public: Result DeleteUrl(const gz::common::URI &_uri, @@ -238,7 +238,7 @@ namespace ignition /// \brief Download a model from ignition fuel. This will override an /// existing local copy of the model. /// \param[in] _modelUrl The unique URL of the model to download. - /// E.g.: https://fuel.ignitionrobotics.org/1.0/caguero/models/Beer + /// E.g.: https://fuel.gazebosim.org/1.0/caguero/models/Beer /// \param[out] _path Path where the model was downloaded. /// \return Result of the download operation. public: Result DownloadModel(const common::URI &_modelUrl, @@ -247,7 +247,7 @@ namespace ignition /// \brief Download a world from ignition fuel. This will override an /// existing local copy of the world. /// \param[in] _worldUrl The unique URL of the world to download. - /// E.g.: https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty + /// E.g.: https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty /// \param[out] _path Path where the world was downloaded. /// \return Result of the download operation. public: Result DownloadWorld(const common::URI &_worldUrl, @@ -277,7 +277,7 @@ namespace ignition /// \brief Check if a model is already present in the local cache. /// \param[in] _modelUrl The unique URL of the model on a Fuel server. - /// E.g.: https://fuel.ignitionrobotics.org/1.0/caguero/models/Beer + /// E.g.: https://fuel.gazebosim.org/1.0/caguero/models/Beer /// \param[out] _path Local path where the model can be found. /// \return FETCH_ERROR if not cached, FETCH_ALREADY_EXISTS if cached. public: Result CachedModel(const common::URI &_modelUrl, @@ -285,13 +285,13 @@ namespace ignition /// \brief Check if a model exists in the cache. /// \param[in] _modelUrl The unique URL of the world on a Fuel server. - /// E.g.: https://fuel.ignitionrobotics.org/1.0/caguero/models/Beer + /// E.g.: https://fuel.gazebosim.org/1.0/caguero/models/Beer /// \return True if the model exists in the cache, false otherwise. public: bool CachedModel(const common::URI &_modelUrl); /// \brief Check if a world is already present in the local cache. /// \param[in] _worldUrl The unique URL of the world on a Fuel server. - /// E.g.: https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty + /// E.g.: https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty /// \param[out] _path Local path where the world can be found. /// \return FETCH_ERROR if not cached, FETCH_ALREADY_EXISTS if cached. public: Result CachedWorld(const common::URI &_worldUrl, @@ -299,7 +299,7 @@ namespace ignition /// \brief Check if a world exists in the cache. /// \param[in] _worldUrl The unique URL of the world on a Fuel server. - /// E.g.: https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty + /// E.g.: https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty /// \return True if the world exists in the cache, false otherwise. public: bool CachedWorld(const common::URI &_worldUrl); diff --git a/src/ClientConfig.cc b/src/ClientConfig.cc index a13eb8ed..081e6fd9 100644 --- a/src/ClientConfig.cc +++ b/src/ClientConfig.cc @@ -89,7 +89,7 @@ class gz::fuel_tools::ServerConfigPrivate } /// \brief URL to reach server - public: common::URI url{"https://fuel.ignitionrobotics.org"}; + public: common::URI url{"https://fuel.gazebosim.org"}; /// \brief A key to auth with the server public: std::string key = ""; diff --git a/src/ClientConfig_TEST.cc b/src/ClientConfig_TEST.cc index bd420764..f649c3c3 100644 --- a/src/ClientConfig_TEST.cc +++ b/src/ClientConfig_TEST.cc @@ -30,7 +30,7 @@ using namespace fuel_tools; ///////////////////////////////////////////////// /// \brief Helper to remove file according to OS, while Windows /// has this issue: -/// https://github.com/ignitionrobotics/ign-common/issues/51 +/// https://github.com/gazebosim/gz-common/issues/51 /// \todo(anyone) Remove this once Windows issue is solved. /// \param[in] _path Path to file to be removed. void removeFileTemp(const std::string &_path) @@ -98,7 +98,7 @@ TEST(ClientConfig, CustomDefaultConfiguration) { ClientConfig config; ASSERT_EQ(2u, config.Servers().size()); - EXPECT_EQ("https://fuel.ignitionrobotics.org", + EXPECT_EQ("https://fuel.gazebosim.org", config.Servers().front().Url().Str()); EXPECT_EQ("https://fuel.gazebosim.org", config.Servers()[1].Url().Str()); @@ -137,7 +137,7 @@ TEST(ClientConfig, CustomConfiguration) EXPECT_TRUE(config.LoadConfig(testPath)); ASSERT_EQ(4u, config.Servers().size()); - EXPECT_EQ("https://fuel.ignitionrobotics.org", + EXPECT_EQ("https://fuel.gazebosim.org", config.Servers().front().Url().Str()); EXPECT_EQ("https://fuel.gazebosim.org", config.Servers()[1].Url().Str()); @@ -166,10 +166,10 @@ TEST(ClientConfig, RepeatedServerConfiguration) << "# The list of servers." << std::endl << "servers:" << std::endl << " -" << std::endl - << " url: https://fuel.ignitionrobotics.org" << std::endl + << " url: https://fuel.gazebosim.org" << std::endl << "" << std::endl << " -" << std::endl - << " url: https://fuel.ignitionrobotics.org" << std::endl + << " url: https://fuel.gazebosim.org" << std::endl << "" << std::endl << "# Where are the assets stored in disk." << std::endl << "cache:" << std::endl @@ -317,7 +317,7 @@ TEST(ClientConfig, AsString) #else EXPECT_NE(str.find(".ignition\\fuel"), std::string::npos); #endif - EXPECT_NE(str.find("https://fuel.ignitionrobotics.org"), std::string::npos); + EXPECT_NE(str.find("https://fuel.gazebosim.org"), std::string::npos); } { diff --git a/src/CollectionIdentifier_TEST.cc b/src/CollectionIdentifier_TEST.cc index a8daa2f5..a4e3e39c 100644 --- a/src/CollectionIdentifier_TEST.cc +++ b/src/CollectionIdentifier_TEST.cc @@ -123,18 +123,18 @@ TEST(CollectionIdentifier, AsString) std::string str = "Name: \n"\ "Owner: \n"\ - "Unique name: https://fuel.ignitionrobotics.org/collections/\n" + "Unique name: https://fuel.gazebosim.org/collections/\n" "Server:\n" - " URL: https://fuel.ignitionrobotics.org\n" + " URL: https://fuel.gazebosim.org\n" " Version: 1.0\n" " API key: \n"; #else std::string str = "Name: \n"\ "Owner: \n"\ - "Unique name: https://fuel.ignitionrobotics.org/collections\n" + "Unique name: https://fuel.gazebosim.org/collections\n" "Server:\n" - " URL: https://fuel.ignitionrobotics.org\n" + " URL: https://fuel.gazebosim.org\n" " Version: 1.0\n" " API key: \n"; #endif @@ -161,7 +161,7 @@ TEST(CollectionIdentifier, AsPrettyString) CollectionIdentifier id; std::string str = "\x1B[96m\x1B[1mServer:\x1B[0m\n " - "\x1B[96m\x1B[1mURL: \x1B[0m\x1B[37mhttps://fuel.ignitionrobotics.org" + "\x1B[96m\x1B[1mURL: \x1B[0m\x1B[37mhttps://fuel.gazebosim.org" "\x1B[0m\n \x1B[96m\x1B[1mVersion: \x1B[0m\x1B[37m1.0\x1B[0m\n"; EXPECT_EQ(str, id.AsPrettyString()); } diff --git a/src/FuelClient.cc b/src/FuelClient.cc index 391a0250..fe8150a6 100644 --- a/src/FuelClient.cc +++ b/src/FuelClient.cc @@ -56,7 +56,7 @@ using namespace fuel_tools; class gz::fuel_tools::FuelClientPrivate { /// \brief A model URL, - /// E.g.: https://fuel.ignitionrobotics.org/1.0/caguero/models/Beer/2 + /// E.g.: https://fuel.gazebosim.org/1.0/caguero/models/Beer/2 /// Where the API version and the model version are optional. public: const std::string kModelUrlRegexStr{ // Method @@ -75,7 +75,7 @@ class gz::fuel_tools::FuelClientPrivate "([0-9]*|tip)"}; /// \brief A world URL, - /// E.g.: https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty/1 + /// E.g.: https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty/1 /// Where the API version and the world version are optional. public: const std::string kWorldUrlRegexStr{ // Method @@ -141,7 +141,7 @@ class gz::fuel_tools::FuelClientPrivate /// \brief A collection URL, /// E.g.: - /// https://fuel.ignitionrobotics.org/1.0/OpenRobotics/collections/TestColl + /// https://fuel.gazebosim.org/1.0/OpenRobotics/collections/TestColl /// Where the API version is optional public: const std::string kCollectionUrlRegexStr{ // Method @@ -186,6 +186,12 @@ class gz::fuel_tools::FuelClientPrivate /// license information. public: void PopulateLicenses(const ServerConfig &_server); + /// \brief Checks the provided URI for fuel.gazebosim.org, and + /// prints a deprecation warning message if found. + /// \param[in] _uri URI to check + /// DEPRECATED/DEPRECATION: remove this function in Gazebo H. + public: void CheckForDeprecatedUri(const common::URI &_uri); + /// \brief Client configuration public: ClientConfig config; @@ -497,6 +503,8 @@ void FuelClient::AddServerConfigParametersToHeaders( Result FuelClient::DeleteUrl(const gz::common::URI &_uri, const std::vector &_headers) { + this->dataPtr->CheckForDeprecatedUri(_uri); + Rest rest; RestResponse resp; @@ -599,6 +607,7 @@ Result FuelClient::DownloadModel(const ModelIdentifier &_id, << std::endl << _id.Server().AsString() << std::endl; return Result(ResultType::FETCH_ERROR); } + this->dataPtr->CheckForDeprecatedUri(_id.Server().Url()); // Route common::URIPath route; @@ -766,6 +775,8 @@ Result FuelClient::DownloadWorld(WorldIdentifier &_id) return Result(ResultType::FETCH_ERROR); } + this->dataPtr->CheckForDeprecatedUri(_id.Server().Url()); + // Route common::URIPath route; route = route / _id.Owner() / "worlds" / _id.Name() / _id.VersionStr() / @@ -1135,6 +1146,8 @@ bool FuelClient::ParseModelFileUrl(const common::URI &_fileUrl, if (!_fileUrl.Valid()) return false; + this->dataPtr->CheckForDeprecatedUri(_fileUrl); + auto urlStr = _fileUrl.Str(); std::smatch match; @@ -1776,3 +1789,18 @@ void FuelClientPrivate::PopulateLicenses(const ServerConfig &_server) ignerr << "Failed to parse license information[" << resp.data << "]\n"; } } + +////////////////////////////////////////////////// +void FuelClientPrivate::CheckForDeprecatedUri(const common::URI &_uri) +{ + static std::string oldServer = "fuel.ignitionrobotics.org"; + auto ignFuelPos = _uri.Str().find(oldServer); + if (ignFuelPos != std::string::npos) + { + std::string newUrl = _uri.Str(); + newUrl.replace(ignFuelPos, oldServer.size(), "fuel.gazebosim.org"); + ignwarn << "The " << oldServer << " URL is deprecrated. Please change " + << _uri.Str() << " to " << newUrl << std::endl; + } +} + diff --git a/src/Interface_TEST.cc b/src/Interface_TEST.cc index fd0e81c6..db8e5d3b 100644 --- a/src/Interface_TEST.cc +++ b/src/Interface_TEST.cc @@ -38,7 +38,7 @@ using namespace ignition::fuel_tools; ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST(Interface, FetchResources) { common::Console::SetVerbosity(4); @@ -60,7 +60,7 @@ TEST(Interface, FetchResources) { // Check it's not cached common::URI modelUrl{ - "https://fuel.ignitionrobotics.org/1.0/chapulina/models/Test box"}; + "https://fuel.gazebosim.org/1.0/chapulina/models/Test box"}; { Result res = client.CachedModel(modelUrl, cachedPath); EXPECT_FALSE(res) << "Cached Path: " << cachedPath; @@ -72,20 +72,20 @@ TEST(Interface, FetchResources) // Check it was downloaded to `2` EXPECT_EQ(path, common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "chapulina", "models", "test box", "2")); + "fuel.gazebosim.org", "chapulina", "models", "test box", "2")); EXPECT_TRUE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "chapulina", "models", "test box", "2"))); EXPECT_TRUE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "chapulina", "models", "test box", "2", "model.sdf"))); EXPECT_TRUE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "chapulina", "models", "test box", "2", "model.config"))); // Check it wasn't downloaded to model root directory EXPECT_FALSE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "chapulina", "models", "Test box", "model.config"))); // Check it is cached @@ -94,7 +94,7 @@ TEST(Interface, FetchResources) EXPECT_TRUE(res); EXPECT_EQ(ResultType::FETCH_ALREADY_EXISTS, res.Type()); EXPECT_EQ(common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "chapulina", "models", "test box", "2"), + "fuel.gazebosim.org", "chapulina", "models", "test box", "2"), cachedPath); } } @@ -103,9 +103,9 @@ TEST(Interface, FetchResources) { // Check neither file nor its model are cached common::URI modelUrl{ - "https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Bus/1/"}; + "https://fuel.gazebosim.org/1.0/openrobotics/models/Bus/1/"}; common::URI modelFileUrl{ - "https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Bus/1/files" + "https://fuel.gazebosim.org/1.0/openrobotics/models/Bus/1/files" "/meshes/bus.obj"}; { @@ -124,25 +124,25 @@ TEST(Interface, FetchResources) // Check entire model was downloaded to `1` EXPECT_TRUE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "openrobotics", "models", "bus", "1"))); EXPECT_EQ(path, common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "openrobotics", "models", "bus", + "fuel.gazebosim.org", "openrobotics", "models", "bus", "1", "meshes", "bus.obj")); EXPECT_TRUE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "openrobotics", "models", "bus", "1", "model.sdf"))); EXPECT_TRUE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "openrobotics", "models", "bus", "1", "model.config"))); EXPECT_TRUE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "openrobotics", "models", "bus", "1", "meshes/bus.obj"))); EXPECT_TRUE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "openrobotics", "models", "bus", "1", "meshes/bus.mtl"))); EXPECT_TRUE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "openrobotics", "models", "bus", "1", "materials", "textures", "bus.png"))); @@ -152,7 +152,7 @@ TEST(Interface, FetchResources) EXPECT_TRUE(res); EXPECT_EQ(ResultType::FETCH_ALREADY_EXISTS, res.Type()); EXPECT_EQ(common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "openrobotics", "models", "bus", "1"), + "fuel.gazebosim.org", "openrobotics", "models", "bus", "1"), cachedPath); } @@ -162,7 +162,7 @@ TEST(Interface, FetchResources) EXPECT_TRUE(res); EXPECT_EQ(ResultType::FETCH_ALREADY_EXISTS, res.Type()); EXPECT_EQ(common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "openrobotics", "models", "bus", "1", + "fuel.gazebosim.org", "openrobotics", "models", "bus", "1", "meshes", "bus.obj"), cachedPath); } } @@ -171,7 +171,7 @@ TEST(Interface, FetchResources) { // Check it's not cached common::URI worldUrl{ - "https://fuel.ignitionrobotics.org/1.0/openrobotics/worlds/Test world"}; + "https://fuel.gazebosim.org/1.0/openrobotics/worlds/Test world"}; { Result res = client.CachedWorld(worldUrl, cachedPath); EXPECT_FALSE(res) << "Cached Path: " << cachedPath; @@ -183,13 +183,13 @@ TEST(Interface, FetchResources) // Check it was downloaded to `1` EXPECT_EQ(path, common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "openrobotics", "worlds", + "fuel.gazebosim.org", "openrobotics", "worlds", "test world", "2")); EXPECT_TRUE(common::exists(common::joinPaths("test_cache", - "fuel.ignitionrobotics.org", "openrobotics", "worlds", "test world", + "fuel.gazebosim.org", "openrobotics", "worlds", "test world", "2"))); EXPECT_TRUE(common::exists(common::joinPaths("test_cache", - "fuel.ignitionrobotics.org", "openrobotics", "worlds", "test world", "2", + "fuel.gazebosim.org", "openrobotics", "worlds", "test world", "2", "test.world"))); // Check it is cached @@ -198,7 +198,7 @@ TEST(Interface, FetchResources) EXPECT_TRUE(res); EXPECT_EQ(ResultType::FETCH_ALREADY_EXISTS, res.Type()); EXPECT_EQ(common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "openrobotics", "worlds", "test world", + "fuel.gazebosim.org", "openrobotics", "worlds", "test world", "2"), cachedPath); } } @@ -207,9 +207,9 @@ TEST(Interface, FetchResources) { // Check neither file nor its world are cached common::URI worldUrl{ - "https://fuel.ignitionrobotics.org/1.0/chapulina/worlds/Test world/2/"}; + "https://fuel.gazebosim.org/1.0/chapulina/worlds/Test world/2/"}; common::URI worldFileUrl{ - "https://fuel.ignitionrobotics.org/1.0/chapulina/worlds/Test world/2/" + "https://fuel.gazebosim.org/1.0/chapulina/worlds/Test world/2/" "files/thumbnails/1.png"}; { @@ -228,13 +228,13 @@ TEST(Interface, FetchResources) // Check entire world was downloaded to `1` EXPECT_TRUE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "chapulina", "worlds", "test world", "2"))); EXPECT_EQ(path, common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "chapulina", "worlds", "test world", "2", + "fuel.gazebosim.org", "chapulina", "worlds", "test world", "2", "thumbnails", "1.png")); EXPECT_TRUE(common::exists( - common::joinPaths("test_cache", "fuel.ignitionrobotics.org", + common::joinPaths("test_cache", "fuel.gazebosim.org", "chapulina", "worlds", "test world", "2", "test.world"))); // Check world is cached @@ -243,7 +243,7 @@ TEST(Interface, FetchResources) EXPECT_TRUE(res); EXPECT_EQ(ResultType::FETCH_ALREADY_EXISTS, res.Type()); EXPECT_EQ(common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "chapulina", "worlds", "test world", "2"), + "fuel.gazebosim.org", "chapulina", "worlds", "test world", "2"), cachedPath); } @@ -253,7 +253,7 @@ TEST(Interface, FetchResources) EXPECT_TRUE(res); EXPECT_EQ(ResultType::FETCH_ALREADY_EXISTS, res.Type()); EXPECT_EQ(common::joinPaths(common::cwd(), "test_cache", - "fuel.ignitionrobotics.org", "chapulina", "worlds", "test world", "2", + "fuel.gazebosim.org", "chapulina", "worlds", "test world", "2", "thumbnails", "1.png"), cachedPath); } } diff --git a/src/JSONParser_TEST.cc b/src/JSONParser_TEST.cc index bf0a404e..6b8e8186 100644 --- a/src/JSONParser_TEST.cc +++ b/src/JSONParser_TEST.cc @@ -176,7 +176,7 @@ TEST(JSONParser, ParseLicenses) std::stringstream tmpJsonStr; // This is the exact return value from - // https://fuel.ignitionrobotics.org/1.0/licenses as of April 29th, 2020. + // https://fuel.gazebosim.org/1.0/licenses as of April 29th, 2020. tmpJsonStr << R"tmpJsonStr([{ "ID": 1, "CreatedAt": "2017-12-19T20:32:48Z", diff --git a/src/ModelIdentifier_TEST.cc b/src/ModelIdentifier_TEST.cc index d5356120..ec55dd08 100644 --- a/src/ModelIdentifier_TEST.cc +++ b/src/ModelIdentifier_TEST.cc @@ -155,7 +155,7 @@ TEST(ModelIdentifier, AsString) "Name: \n"\ "Owner: \n"\ "Version: tip\n"\ - "Unique name: https://fuel.ignitionrobotics.org/models/\n" + "Unique name: https://fuel.gazebosim.org/models/\n" "Description: \n" "File size: 0\n" "Upload date: 0\n" @@ -166,7 +166,7 @@ TEST(ModelIdentifier, AsString) "License image URL: \n" "Tags: \n" "Server:\n" - " URL: https://fuel.ignitionrobotics.org\n" + " URL: https://fuel.gazebosim.org\n" " Version: 1.0\n" " API key: \n"; #else @@ -174,7 +174,7 @@ TEST(ModelIdentifier, AsString) "Name: \n"\ "Owner: \n"\ "Version: tip\n"\ - "Unique name: https://fuel.ignitionrobotics.org/models\n" + "Unique name: https://fuel.gazebosim.org/models\n" "Description: \n" "File size: 0\n" "Upload date: 0\n" @@ -185,7 +185,7 @@ TEST(ModelIdentifier, AsString) "License image URL: \n" "Tags: \n" "Server:\n" - " URL: https://fuel.ignitionrobotics.org\n" + " URL: https://fuel.gazebosim.org\n" " Version: 1.0\n" " API key: \n"; #endif @@ -223,7 +223,7 @@ TEST(ModelIdentifier, AsPrettyString) ModelIdentifier id; std::string str = "\x1B[96m\x1B[1mServer:\x1B[0m\n " - "\x1B[96m\x1B[1mURL: \x1B[0m\x1B[37mhttps://fuel.ignitionrobotics.org" + "\x1B[96m\x1B[1mURL: \x1B[0m\x1B[37mhttps://fuel.gazebosim.org" "\x1B[0m\n \x1B[96m\x1B[1mVersion: \x1B[0m\x1B[37m1.0\x1B[0m\n"; EXPECT_EQ(str, id.AsPrettyString()); } diff --git a/src/ModelIter_TEST.cc b/src/ModelIter_TEST.cc index 4eb26552..6455bb8a 100644 --- a/src/ModelIter_TEST.cc +++ b/src/ModelIter_TEST.cc @@ -45,7 +45,7 @@ namespace ignition public: static ModelIter ModelIterThreeModelIds() { ServerConfig srv; - srv.SetUrl(common::URI("https://ignitionrobotics.org")); + srv.SetUrl(common::URI("https://gazebosim.org")); std::vector ids; for (int i = 0; i < 3; i++) @@ -67,7 +67,7 @@ namespace ignition public: static ModelIter ModelIterThreeModels() { ServerConfig srv; - srv.SetUrl(common::URI("https://ignitionrobotics.org")); + srv.SetUrl(common::URI("https://gazebosim.org")); std::vector models; for (int i = 0; i < 3; i++) diff --git a/src/WorldIdentifier_TEST.cc b/src/WorldIdentifier_TEST.cc index 8d978ae4..81007fba 100644 --- a/src/WorldIdentifier_TEST.cc +++ b/src/WorldIdentifier_TEST.cc @@ -120,10 +120,10 @@ TEST(WorldIdentifier, AsString) "Name: \n"\ "Owner: \n"\ "Version: tip\n"\ - "Unique name: fuel.ignitionrobotics.org/worlds/\n" + "Unique name: fuel.gazebosim.org/worlds/\n" "Local path: \n" "Server:\n" - " URL: https://fuel.ignitionrobotics.org\n" + " URL: https://fuel.gazebosim.org\n" " Version: 1.0\n" " API key: \n"; #else @@ -131,10 +131,10 @@ TEST(WorldIdentifier, AsString) "Name: \n"\ "Owner: \n"\ "Version: tip\n"\ - "Unique name: fuel.ignitionrobotics.org\\worlds\n" + "Unique name: fuel.gazebosim.org\\worlds\n" "Local path: \n" "Server:\n" - " URL: https://fuel.ignitionrobotics.org\n" + " URL: https://fuel.gazebosim.org\n" " Version: 1.0\n" " API key: \n"; #endif @@ -164,7 +164,7 @@ TEST(WorldIdentifier, AsPrettyString) WorldIdentifier id; std::string str = "\x1B[96m\x1B[1mServer:\x1B[0m\n " - "\x1B[96m\x1B[1mURL: \x1B[0m\x1B[37mhttps://fuel.ignitionrobotics.org" + "\x1B[96m\x1B[1mURL: \x1B[0m\x1B[37mhttps://fuel.gazebosim.org" "\x1B[0m\n \x1B[96m\x1B[1mVersion: \x1B[0m\x1B[37m1.0\x1B[0m\n"; EXPECT_EQ(str, id.AsPrettyString()); } diff --git a/src/WorldIter_TEST.cc b/src/WorldIter_TEST.cc index dd2c267a..ff8c651b 100644 --- a/src/WorldIter_TEST.cc +++ b/src/WorldIter_TEST.cc @@ -44,7 +44,7 @@ namespace ignition public: static WorldIter WorldIterThreeWorldIds() { ServerConfig srv; - srv.SetUrl(common::URI("https://ignitionrobotics.org")); + srv.SetUrl(common::URI("https://gazebosim.org")); std::vector ids; for (int i = 0; i < 3; i++) diff --git a/src/Zip_TEST.cc b/src/Zip_TEST.cc index 44685a4a..a15c3ed5 100644 --- a/src/Zip_TEST.cc +++ b/src/Zip_TEST.cc @@ -16,7 +16,7 @@ */ // All these helper functions have been copied from -// https://github.com/ignitionrobotics/ign-common/raw/ign-common3/src/Filesystem_TEST.cc +// https://github.com/gazebosim/gz-common/raw/ign-common3/src/Filesystem_TEST.cc #ifndef _WIN32 #include diff --git a/src/cmd/cmdfuel.rb.in b/src/cmd/cmdfuel.rb.in index 2e636006..71288740 100755 --- a/src/cmd/cmdfuel.rb.in +++ b/src/cmd/cmdfuel.rb.in @@ -72,7 +72,7 @@ SUBCOMMANDS = { "Available Options: \n"\ " -u [--url] arg URL of the server that should receive \n"\ " the model. If unspecified, the server will be\n"\ - " https://fuel.ignitionrobotics.org. \n"\ + " https://fuel.gazebosim.org. \n"\ " --header arg Set an HTTP header, such as \n"\ " --header 'authorization: Bearer JWT'. \n" + COMMON_OPTIONS, @@ -84,7 +84,7 @@ SUBCOMMANDS = { " \n"\ "Available Options: \n"\ " -u [--url] arg Full resource URL, such as: \n"\ - " https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Ambulance\n"\ + " https://fuel.gazebosim.org/1.0/openrobotics/models/Ambulance\n"\ " --header arg Set an HTTP header, such as \n"\ " --header 'authorization: Bearer JWT'. \n"\ " -j [--jobs] arg Number of parallel downloads (default: 1, \n"\ @@ -104,7 +104,7 @@ SUBCOMMANDS = { " -m [--model] arg Path to directory containing the model. \n"\ " -u [--url] arg URL of the server that should receive \n"\ " the model. If unspecified, the server will be\n"\ - " https://fuel.ignitionrobotics.org. \n"\ + " https://fuel.gazebosim.org. \n"\ " -p [--private] Use this argument to make the model private. \n"\ " -b [--public] Use this argument to make the model public. \n"\ " --header arg Set an HTTP header, such as \n"\ @@ -121,7 +121,7 @@ SUBCOMMANDS = { " -o [--owner] arg Return only resources for given owner. \n"\ " -u [--url] arg URL of a server the resource comes from, \n"\ " if unspecified, it will be \n"\ - " https://fuel.ignitionrobotics.org. \n"\ + " https://fuel.gazebosim.org. \n"\ " -r [--raw] Machine-friendly output. \n" + COMMON_OPTIONS, @@ -148,7 +148,7 @@ SUBCOMMANDS = { " multiple models each in a subdirectory. \n"\ " -u [--url] arg URL of the server that should receive \n"\ " the model. If unspecified, the server will be\n"\ - " https://fuel.ignitionrobotics.org. \n"\ + " https://fuel.gazebosim.org. \n"\ " -p [--private] Use this argument to make the model private. \n"\ " Otherwise, the model will be public. \n"\ " --header arg Set an HTTP header, such as \n"\ @@ -248,12 +248,12 @@ class Cmd case options['subcommand'] when 'delete' if options['url'] == '' - puts "Missing resource URL (e.g. --url https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Ambulance)." + puts "Missing resource URL (e.g. --url https://fuel.gazebosim.org/1.0/OpenRobotics/models/Ambulance)." exit(-1) end when 'download' if options['url'] == '' - puts "Missing resource URL (e.g. --url https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Ambulance)." + puts "Missing resource URL (e.g. --url https://fuel.gazebosim.org/1.0/OpenRobotics/models/Ambulance)." exit(-1) end @@ -294,12 +294,12 @@ class Cmd exit(-1) end if options['url'] == '' - puts "Missing URL (e.g. --url https://fuel.ignitionrobotics.org)." + puts "Missing URL (e.g. --url https://fuel.gazebosim.org)." exit(-1) end when 'edit' if options['url'] == '' - puts "Missing resource URL (e.g. --url https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Ambulance)." + puts "Missing resource URL (e.g. --url https://fuel.gazebosim.org/1.0/OpenRobotics/models/Ambulance)." exit(-1) end end diff --git a/src/gz.hh b/src/gz.hh index 0769d5d1..2f752898 100644 --- a/src/gz.hh +++ b/src/gz.hh @@ -85,7 +85,7 @@ extern "C" IGNITION_FUEL_TOOLS_VISIBLE int upload(const char *_path, /// /// Example usage, including a private access token which is required: /// -/// `ign fuel delete -u https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Ambulance --header "Private-Token: "` // NOLINT +/// `ign fuel delete -u https://fuel.gazebosim.org/1.0/openrobotics/models/Ambulance --header "Private-Token: "` // NOLINT /// /// \param[in] _url Resource URL. /// \param[in] _header An HTTP header. @@ -112,7 +112,7 @@ extern "C" IGNITION_FUEL_TOOLS_VISIBLE int pbtxt2Config(const char *_path); /// /// Example usage, including a private access token which is required: /// -/// `ign fuel edit -u https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Ambulance --header "Private-Token: "` --public // NOLINT +/// `ign fuel edit -u https://fuel.gazebosim.org/1.0/openrobotics/models/Ambulance --header "Private-Token: "` --public // NOLINT /// /// \param[in] _url Resource URL. /// \param[in] _header An HTTP header. diff --git a/src/gz_TEST.cc b/src/gz_TEST.cc index 30cdf24f..f60219ba 100644 --- a/src/gz_TEST.cc +++ b/src/gz_TEST.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Open Source Robotics Foundation + * Copyright (C/ 2018 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,7 +52,7 @@ auto g_version = std::string(strdup(IGNITION_FUEL_TOOLS_VERSION_FULL)); auto g_listCmd = "ign fuel list -v 4 --force-version " + g_version; ///////////////////////////////////////////////// -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/113 +// https://github.com/gazebosim/gz-fuel-tools/issues/113 TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Versions)) { auto output = custom_exec_str("ign fuel --versions"); @@ -60,7 +60,7 @@ TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Versions)) } ///////////////////////////////////////////////// -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/113 +// https://github.com/gazebosim/gz-fuel-tools/issues/113 TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Help)) { auto output = custom_exec_str("ign fuel --force-version " + g_version + @@ -75,7 +75,7 @@ TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Help)) } ///////////////////////////////////////////////// -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/113 +// https://github.com/gazebosim/gz-fuel-tools/issues/113 TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ListFail)) { auto output = custom_exec_str(g_listCmd); @@ -94,57 +94,57 @@ TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ListFail)) } ///////////////////////////////////////////////// -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/113 +// https://github.com/gazebosim/gz-fuel-tools/issues/113 TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ModelListConfigServerUgly)) { auto output = custom_exec_str(g_listCmd + " -t model --raw"); - EXPECT_NE(output.find("https://fuel.ignitionrobotics.org/1.0/"), + EXPECT_NE(output.find("https://fuel.gazebosim.org/1.0/"), std::string::npos) << output; EXPECT_EQ(output.find("owners"), std::string::npos) << output; } ///////////////////////////////////////////////// -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/113 +// https://github.com/gazebosim/gz-fuel-tools/issues/113 // https://github.com/gazebosim/gz-fuel-tools/issues/254 TEST(CmdLine, DETAIL_IGN_UTILS_ADD_DISABLED_PREFIX(ModelListCustomServerPretty)) { auto output = custom_exec_str( - g_listCmd + " -t model -u https://staging-fuel.ignitionrobotics.org"); + g_listCmd + " -t model -u https://staging-fuel.gazebosim.org"); - EXPECT_NE(output.find("https://staging-fuel.ignitionrobotics.org"), + EXPECT_NE(output.find("https://staging-fuel.gazebosim.org"), std::string::npos) << output; EXPECT_NE(output.find("owners"), std::string::npos) << output; EXPECT_NE(output.find("models"), std::string::npos) << output; - EXPECT_EQ(output.find("https://fuel.ignitionrobotics.org"), std::string::npos) + EXPECT_EQ(output.find("https://fuel.gazebosim.org"), std::string::npos) << output; - EXPECT_EQ(output.find("https://staging-fuel.ignitionrobotics.org/1.0/"), + EXPECT_EQ(output.find("https://staging-fuel.gazebosim.org/1.0/"), std::string::npos) << output; } ///////////////////////////////////////////////// -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/113 +// https://github.com/gazebosim/gz-fuel-tools/issues/113 TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(WorldListConfigServerUgly)) { auto output = custom_exec_str(g_listCmd + - " -t world --raw -u https://staging-fuel.ignitionrobotics.org"); - EXPECT_NE(output.find("https://staging-fuel.ignitionrobotics.org"), + " -t world --raw -u https://staging-fuel.gazebosim.org"); + EXPECT_NE(output.find("https://staging-fuel.gazebosim.org"), std::string::npos) << output; EXPECT_EQ(output.find("owners"), std::string::npos) << output; } ///////////////////////////////////////////////// -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/113 +// https://github.com/gazebosim/gz-fuel-tools/issues/113 // https://github.com/gazebosim/gz-fuel-tools/issues/254 TEST(CmdLine, DETAIL_IGN_UTILS_ADD_DISABLED_PREFIX(WorldListCustomServerPretty)) { auto output = custom_exec_str( - g_listCmd + " -t world -u https://staging-fuel.ignitionrobotics.org"); + g_listCmd + " -t world -u https://staging-fuel.gazebosim.org"); - EXPECT_NE(output.find("https://staging-fuel.ignitionrobotics.org"), + EXPECT_NE(output.find("https://staging-fuel.gazebosim.org"), std::string::npos) << output; EXPECT_NE(output.find("owners"), std::string::npos) << output; EXPECT_NE(output.find("worlds"), std::string::npos) << output; diff --git a/src/gz_src_TEST.cc b/src/gz_src_TEST.cc index 10d6ff91..1ca4e8f9 100644 --- a/src/gz_src_TEST.cc +++ b/src/gz_src_TEST.cc @@ -90,12 +90,12 @@ TEST_F(CmdLine, ModelListFail) ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_F(CmdLine, ModelListConfigServerUgly) { - EXPECT_TRUE(listModels("", "", "true")); + EXPECT_TRUE(listModels("", "openroboticstest", "true")); - EXPECT_NE(this->stdOutBuffer.str().find("https://fuel.ignitionrobotics.org"), + EXPECT_NE(this->stdOutBuffer.str().find("https://fuel.gazebosim.org"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_EQ(this->stdOutBuffer.str().find("owners"), std::string::npos) << this->stdOutBuffer.str(); @@ -103,40 +103,40 @@ TEST_F(CmdLine, ModelListConfigServerUgly) ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 // https://github.com/gazebosim/gz-fuel-tools/issues/254 TEST_F(CmdLine, DETAIL_IGN_UTILS_ADD_DISABLED_PREFIX(ModelListConfigServerPretty)) { - EXPECT_TRUE(listModels("https://staging-fuel.ignitionrobotics.org")); + EXPECT_TRUE(listModels("https://staging-fuel.gazebosim.org")); EXPECT_NE(this->stdOutBuffer.str().find( - "https://staging-fuel.ignitionrobotics.org"), + "https://staging-fuel.gazebosim.org"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_NE(this->stdOutBuffer.str().find("owners"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_NE(this->stdOutBuffer.str().find("models"), std::string::npos) << this->stdOutBuffer.str(); - EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.ignitionrobotics.org"), + EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.gazebosim.org"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_EQ(this->stdOutBuffer.str().find( - "https://staging-fuel.ignitionrobotics.org/1.0/"), std::string::npos) + "https://staging-fuel.gazebosim.org/1.0/"), std::string::npos) << this->stdOutBuffer.str(); } ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 // https://github.com/gazebosim/gz-fuel-tools/issues/254 TEST_F(CmdLine, DETAIL_IGN_UTILS_ADD_DISABLED_PREFIX(ModelListConfigServerPrettyOwner)) { - EXPECT_TRUE(listModels("https://staging-fuel.ignitionrobotics.org", + EXPECT_TRUE(listModels("https://staging-fuel.gazebosim.org", "openrobotics")); EXPECT_NE(this->stdOutBuffer.str().find( - "https://staging-fuel.ignitionrobotics.org"), + "https://staging-fuel.gazebosim.org"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_NE(this->stdOutBuffer.str().find("1 owners"), std::string::npos) << this->stdOutBuffer.str(); @@ -147,10 +147,10 @@ TEST_F(CmdLine, EXPECT_EQ(this->stdOutBuffer.str().find("20 models"), std::string::npos) << this->stdOutBuffer.str(); - EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.ignitionrobotics.org"), + EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.gazebosim.org"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_EQ(this->stdOutBuffer.str().find( - "https://staging-fuel.ignitionrobotics.org/1.0/"), std::string::npos) + "https://staging-fuel.gazebosim.org/1.0/"), std::string::npos) << this->stdOutBuffer.str(); } @@ -177,12 +177,12 @@ TEST_F(CmdLine, ModelDownloadWrongUrl) ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_F(CmdLine, ModelDownloadUnversioned) { // Download EXPECT_TRUE(downloadUrl( - "https://fuel.ignitionrobotics.org/1.0/chapulina/models/Test box")); + "https://fuel.gazebosim.org/1.0/openroboticstest/models/Test box")); // Check output EXPECT_NE(this->stdOutBuffer.str().find("Download succeeded"), @@ -191,19 +191,19 @@ TEST_F(CmdLine, ModelDownloadUnversioned) // Check files EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", - "chapulina", "models", "test box"))); + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", + "openroboticstest", "models", "test box"))); EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", - "chapulina", "models", "test box", "2"))); + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", + "openroboticstest", "models", "test box", "1"))); EXPECT_TRUE(common::isFile( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", - "chapulina", "models", "test box", "2", "model.sdf"))); + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", + "openroboticstest", "models", "test box", "1", "model.sdf"))); } ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_F(CmdLine, DownloadConfigCache) { unsetenv("IGN_FUEL_CACHE_PATH"); @@ -216,7 +216,7 @@ TEST_F(CmdLine, DownloadConfigCache) ofs << "---" << std::endl << "servers:" << std::endl << " -" << std::endl - << " url: https://fuel.ignitionrobotics.org" << std::endl + << " url: https://fuel.gazebosim.org" << std::endl << "" << std::endl << "cache:" << std::endl << " path: " << this->testCachePath << std::endl @@ -226,7 +226,7 @@ TEST_F(CmdLine, DownloadConfigCache) // Download EXPECT_TRUE(downloadUrl( - "https://fuel.ignitionrobotics.org/1.0/chapulina/models/Test box", + "https://fuel.gazebosim.org/1.0/openroboticstest/models/Test box", testPath.c_str())); // Check output @@ -236,10 +236,10 @@ TEST_F(CmdLine, DownloadConfigCache) // Check files auto modelPath = common::joinPaths(this->testCachePath, - "fuel.ignitionrobotics.org", "chapulina", "models", "test box"); + "fuel.gazebosim.org", "openroboticstest", "models", "test box"); EXPECT_TRUE(common::isDirectory(modelPath)); - EXPECT_TRUE(common::isDirectory(common::joinPaths(modelPath, "2"))); - EXPECT_TRUE(common::isFile(common::joinPaths(modelPath, "2", + EXPECT_TRUE(common::isDirectory(common::joinPaths(modelPath, "1"))); + EXPECT_TRUE(common::isFile(common::joinPaths(modelPath, "1", "model.sdf"))); } @@ -255,16 +255,16 @@ TEST_F(CmdLine, WorldListFail) ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 // https://github.com/gazebosim/gz-fuel-tools/issues/254 TEST_F(CmdLine, DETAIL_IGN_UTILS_ADD_DISABLED_PREFIX(WorldListConfigServerUgly)) { EXPECT_TRUE(listWorlds( - "https://staging-fuel.ignitionrobotics.org", "", "true")); + "https://staging-fuel.gazebosim.org", "", "true")); EXPECT_NE(this->stdOutBuffer.str().find( - "https://staging-fuel.ignitionrobotics.org"), + "https://staging-fuel.gazebosim.org"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_EQ(this->stdOutBuffer.str().find("owners"), std::string::npos) << this->stdOutBuffer.str(); @@ -272,36 +272,36 @@ TEST_F(CmdLine, ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 // https://github.com/gazebosim/gz-fuel-tools/issues/254 TEST_F(CmdLine, DETAIL_IGN_UTILS_ADD_DISABLED_PREFIX(WorldListConfigServerPretty)) { - EXPECT_TRUE(listWorlds("https://staging-fuel.ignitionrobotics.org")); + EXPECT_TRUE(listWorlds("https://staging-fuel.gazebosim.org")); EXPECT_NE(this->stdOutBuffer.str().find( - "https://staging-fuel.ignitionrobotics.org"), std::string::npos) + "https://staging-fuel.gazebosim.org"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_NE(this->stdOutBuffer.str().find("owners"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_NE(this->stdOutBuffer.str().find("worlds"), std::string::npos) << this->stdOutBuffer.str(); - EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.ignitionrobotics.org"), + EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.gazebosim.org"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_EQ(this->stdOutBuffer.str().find( - "https://staging-fuel.ignitionrobotics.org/1.0/"), std::string::npos) + "https://staging-fuel.gazebosim.org/1.0/"), std::string::npos) << this->stdOutBuffer.str(); } ///////////////////////////////////////////////// TEST_F(CmdLine, WorldListCustomServerPrettyOwner) { - EXPECT_TRUE(listWorlds("https://staging-fuel.ignitionrobotics.org", + EXPECT_TRUE(listWorlds("https://staging-fuel.gazebosim.org", "openrobotics")); EXPECT_NE(this->stdOutBuffer.str().find( - "https://staging-fuel.ignitionrobotics.org"), std::string::npos) + "https://staging-fuel.gazebosim.org"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_NE(this->stdOutBuffer.str().find("worlds"), std::string::npos) << this->stdOutBuffer.str(); @@ -310,16 +310,16 @@ TEST_F(CmdLine, WorldListCustomServerPrettyOwner) EXPECT_EQ(this->stdOutBuffer.str().find("20 worlds"), std::string::npos) << this->stdOutBuffer.str(); - EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.ignitionrobotics.org"), + EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.gazebosim.org"), std::string::npos) << this->stdOutBuffer.str(); EXPECT_EQ(this->stdOutBuffer.str().find( - "https://staging-fuel.ignitionrobotics.org/1.0/"), std::string::npos) + "https://staging-fuel.gazebosim.org/1.0/"), std::string::npos) << this->stdOutBuffer.str(); } ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_F(CmdLine, WorldDownloadBadUrl) { EXPECT_FALSE(downloadUrl("fake_url")); @@ -342,12 +342,12 @@ TEST_F(CmdLine, WorldDownloadWrongUrl) ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_F(CmdLine, WorldDownloadUnversioned) { // Download EXPECT_TRUE(downloadUrl( - "https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Test world")); + "https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Test world")); // Check output EXPECT_NE(this->stdOutBuffer.str().find("Download succeeded"), @@ -356,13 +356,13 @@ TEST_F(CmdLine, WorldDownloadUnversioned) // Check files EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world"))); EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world", "2"))); EXPECT_TRUE(common::isFile( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world", "2", "test.world"))); } @@ -376,12 +376,12 @@ INSTANTIATE_TEST_CASE_P(CollectionTest, DownloadCollectionTest, ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_P(DownloadCollectionTest, AllItems) { // Download EXPECT_TRUE( - downloadUrl("https://fuel.ignitionrobotics.org/1.0/OpenRobotics/" + downloadUrl("https://fuel.gazebosim.org/1.0/OpenRobotics/" "collections/TestCollection", nullptr, nullptr, nullptr, GetParam())); @@ -393,58 +393,58 @@ TEST_P(DownloadCollectionTest, AllItems) // Check files // Model: Backpack EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "backpack"))); EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "backpack", "2"))); EXPECT_TRUE(common::isFile( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "backpack", "2", "model.sdf"))); // Model: TEAMBASE EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "teambase"))); EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "teambase", "2"))); EXPECT_TRUE(common::isFile( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "teambase", "2", "model.sdf"))); // World: Test World EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world"))); EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world", "2"))); EXPECT_TRUE(common::isFile( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world", "2", "test.world"))); // World: Test World 2 EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world 2"))); EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world 2", "2"))); EXPECT_TRUE(common::isFile( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world 2", "2", "test.world"))); } ///////////////////////////////////////////////// /// Download only models // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_P(DownloadCollectionTest, Models) { // Download EXPECT_TRUE( - downloadUrl("https://fuel.ignitionrobotics.org/1.0/OpenRobotics/" + downloadUrl("https://fuel.gazebosim.org/1.0/OpenRobotics/" "collections/TestCollection", nullptr, nullptr, "model", GetParam())); @@ -456,46 +456,46 @@ TEST_P(DownloadCollectionTest, Models) // Check files // Model: Backpack EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "backpack"))); EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "backpack", "2"))); EXPECT_TRUE(common::isFile( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "backpack", "2", "model.sdf"))); // Model: TEAMBASE EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "teambase"))); EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "teambase", "2"))); EXPECT_TRUE(common::isFile( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "teambase", "2", "model.sdf"))); // World: Test World EXPECT_FALSE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world"))); // World: Test World 2 EXPECT_FALSE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world2"))); } ///////////////////////////////////////////////// /// Download only worlds // Protocol "https" not supported or disabled in libcurl for Windows -// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105 +// https://github.com/gazebosim/gz-fuel-tools/issues/105 TEST_P(DownloadCollectionTest, Worlds) { // Download EXPECT_TRUE( - downloadUrl("https://fuel.ignitionrobotics.org/1.0/OpenRobotics/" + downloadUrl("https://fuel.gazebosim.org/1.0/OpenRobotics/" "collections/TestCollection", nullptr, nullptr, "world", GetParam())); @@ -507,33 +507,33 @@ TEST_P(DownloadCollectionTest, Worlds) // Check files // Model: Backpack EXPECT_FALSE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "backpack"))); // Model: TEAMBASE EXPECT_FALSE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "models", "teambase"))); // World: Test World EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world"))); EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world", "2"))); EXPECT_TRUE(common::isFile( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world", "2", "test.world"))); // World: Test World 2 EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world 2"))); EXPECT_TRUE(common::isDirectory( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world 2", "2"))); EXPECT_TRUE(common::isFile( - common::joinPaths(this->testCachePath, "fuel.ignitionrobotics.org", + common::joinPaths(this->testCachePath, "fuel.gazebosim.org", "openrobotics", "worlds", "test world 2", "2", "test.world"))); } From 4f7787312d5a97242db4f736d4321b614b436081 Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Wed, 7 Dec 2022 09:18:52 -0800 Subject: [PATCH 6/8] 4.8.0 release (#317) Signed-off-by: Nate Koenig Signed-off-by: Nate Koenig Co-authored-by: Nate Koenig --- CMakeLists.txt | 2 +- Changelog.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b4c087c5..c44120fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR) #============================================================================ # Initialize the project #============================================================================ -project(ignition-fuel_tools4 VERSION 4.7.0) +project(ignition-fuel_tools4 VERSION 4.8.0) #============================================================================ # Find ignition-cmake diff --git a/Changelog.md b/Changelog.md index e1c0fedb..f54763f9 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,16 @@ ## Gazebo Fuel Tools 4.x +### Gazebo Fuel Tools 4.8.0 (2022-12-07) + +1. Reduce asset download sizes. + * [Pull request #316](https://github.com/gazebosim/gz-fuel-tools/pull/316) + +1. Update tutorials to use Gazebo. + * [Pull request #303](https://github.com/gazebosim/gz-fuel-tools/pull/303) + +1. Change ignitionrobotics.org to gazebosim.org. + * [Pull request #304](https://github.com/gazebosim/gz-fuel-tools/pull/304) + ### Gazebo Fuel Tools 4.7.0 (2022-11-17) 1. ign -> gz Migrate Ignition Headers : gz-fuel-tools. From 448ff4f6974c2cec551d6654428bca46a97c57de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Crist=C3=B3bal=20Arroyo?= <69475004+Crola1702@users.noreply.github.com> Date: Wed, 25 Jan 2023 09:48:57 -0500 Subject: [PATCH 7/8] Change backpack model version 2->3 (#319) Signed-off-by: Crola1702 --- src/gz_src_TEST.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gz_src_TEST.cc b/src/gz_src_TEST.cc index f38f811f..18f827e1 100644 --- a/src/gz_src_TEST.cc +++ b/src/gz_src_TEST.cc @@ -398,10 +398,10 @@ TEST_P(DownloadCollectionTest, AllItems) "openroboticstest", "models", "backpack"))); EXPECT_TRUE(common::isDirectory( common::joinPaths(this->testCachePath, "fuel.gazebosim.org", - "openroboticstest", "models", "backpack", "2"))); + "openroboticstest", "models", "backpack", "3"))); EXPECT_TRUE(common::isFile( common::joinPaths(this->testCachePath, "fuel.gazebosim.org", - "openroboticstest", "models", "backpack", "2", "model.sdf"))); + "openroboticstest", "models", "backpack", "3", "model.sdf"))); // Model: TEAMBASE EXPECT_TRUE(common::isDirectory( @@ -461,10 +461,10 @@ TEST_P(DownloadCollectionTest, Models) "openroboticstest", "models", "backpack"))); EXPECT_TRUE(common::isDirectory( common::joinPaths(this->testCachePath, "fuel.gazebosim.org", - "openroboticstest", "models", "backpack", "2"))); + "openroboticstest", "models", "backpack", "3"))); EXPECT_TRUE(common::isFile( common::joinPaths(this->testCachePath, "fuel.gazebosim.org", - "openroboticstest", "models", "backpack", "2", "model.sdf"))); + "openroboticstest", "models", "backpack", "3", "model.sdf"))); // Model: TEAMBASE EXPECT_TRUE(common::isDirectory( From 1a7a3b687aee90734325fcad8c8ed096cd7e603c Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Mon, 30 Jan 2023 23:37:29 -0600 Subject: [PATCH 8/8] Fix model downloads for ignitionrobotics.org URIs (#318) The FuelClient library was only looking for models in ~/.ignition/fuel/fuel.gazebosim.org regardless of which server models were downloaded from when checking if a model is cached. This caused models that used the deprecated ignitionrobotics.org URI to be redownloaded every time. This PR fixes it by adding ignitionrobotics.org as an additional server to check. Signed-off-by: Addisu Z. Taddese --- Migration.md | 2 +- src/CMakeLists.txt | 5 +++++ src/ClientConfig.cc | 12 +++++++----- src/ClientConfig_TEST.cc | 4 ++-- src/FuelClient_TEST.cc | 37 ++++++++++++++++++++++++++----------- 5 files changed, 41 insertions(+), 19 deletions(-) diff --git a/Migration.md b/Migration.md index 9453ed14..57db7156 100644 --- a/Migration.md +++ b/Migration.md @@ -2,7 +2,7 @@ ### Depercations -1. The `fuel.gazebosim.org` Fuel server has been deprecated, and +1. The `fuel.ignitionrobotics.org` Fuel server has been deprecated, and redirects to `fuel.gazebosim.org`. Use `fuel.gazebosim.org` in all Fuel URLs. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 55285d8f..9bb98a8d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,5 +71,10 @@ ign_build_tests(TYPE UNIT TINYXML2::TINYXML2 ) +if (TARGET UNIT_FuelClient_TEST) + # The default timeout (240s) doesn't seem to be enough for this test. + set_tests_properties(UNIT_FuelClient_TEST PROPERTIES TIMEOUT 360) +endif() + # Command line support. add_subdirectory(cmd) diff --git a/src/ClientConfig.cc b/src/ClientConfig.cc index 081e6fd9..a6e0801c 100644 --- a/src/ClientConfig.cc +++ b/src/ClientConfig.cc @@ -45,11 +45,13 @@ class gz::fuel_tools::ClientConfigPrivate this->servers.push_back(ServerConfig()); - // Add in fuel.gazebosim.org as another default server config. - ServerConfig gzServerConfig; - gzServerConfig.SetUrl(common::URI("https://fuel.gazebosim.org")); - gzServerConfig.SetVersion("1.0"); - this->servers.push_back(gzServerConfig); + // Add in fuel.ignitionrobotics.org as another default server + // config. + ServerConfig ignServerConfig; + ignServerConfig.SetUrl( + common::URI("https://fuel.ignitionrobotics.org")); + ignServerConfig.SetVersion("1.0"); + this->servers.push_back(ignServerConfig); } /// \brief Clear values. diff --git a/src/ClientConfig_TEST.cc b/src/ClientConfig_TEST.cc index f649c3c3..1e3d45a5 100644 --- a/src/ClientConfig_TEST.cc +++ b/src/ClientConfig_TEST.cc @@ -100,7 +100,7 @@ TEST(ClientConfig, CustomDefaultConfiguration) ASSERT_EQ(2u, config.Servers().size()); EXPECT_EQ("https://fuel.gazebosim.org", config.Servers().front().Url().Str()); - EXPECT_EQ("https://fuel.gazebosim.org", + EXPECT_EQ("https://fuel.ignitionrobotics.org", config.Servers()[1].Url().Str()); std::string defaultCacheLocation = common::joinPaths( @@ -139,7 +139,7 @@ TEST(ClientConfig, CustomConfiguration) ASSERT_EQ(4u, config.Servers().size()); EXPECT_EQ("https://fuel.gazebosim.org", config.Servers().front().Url().Str()); - EXPECT_EQ("https://fuel.gazebosim.org", + EXPECT_EQ("https://fuel.ignitionrobotics.org", config.Servers()[1].Url().Str()); EXPECT_EQ("https://api.ignitionfuel.org", config.Servers()[2].Url().Str()); diff --git a/src/FuelClient_TEST.cc b/src/FuelClient_TEST.cc index 78eee9bb..6dde9259 100644 --- a/src/FuelClient_TEST.cc +++ b/src/FuelClient_TEST.cc @@ -398,10 +398,20 @@ TEST_F(FuelClientTest, ParseModelFileURL) } } +class FuelClientDownloadTest + : public FuelClientTest, + public ::testing::WithParamInterface +{}; + +INSTANTIATE_TEST_CASE_P( + FuelClientTest, FuelClientDownloadTest, + ::testing::Values("fuel.gazebosim.org", + "fuel.ignitionrobotics.org"), ); // NOLINT + ///////////////////////////////////////////////// // Protocol "https" not supported or disabled in libcurl for Windows // https://github.com/gazebosim/gz-fuel-tools/issues/105 -TEST_F(FuelClientTest, DownloadModel) +TEST_P(FuelClientDownloadTest, DownloadModel) { // Configure to use binary path as cache ASSERT_EQ(0, ChangeDirectory(PROJECT_BINARY_PATH)); @@ -414,11 +424,12 @@ TEST_F(FuelClientTest, DownloadModel) FuelClient client(config); EXPECT_EQ(config.CacheLocation(), client.Config().CacheLocation()); + std::string fuelServerHost = GetParam(); // Download model from URL { // Unversioned URL should get the latest available version common::URI url{ - "https://fuel.gazebosim.org/1.0/openroboticstest/models/test box"}; + "https://" + fuelServerHost + "/1.0/openroboticstest/models/test box"}; // Check it is not cached std::string cachedPath; @@ -434,7 +445,7 @@ TEST_F(FuelClientTest, DownloadModel) // Check it was downloaded to `2` auto modelPath = common::joinPaths(common::cwd(), "test_cache", - "fuel.gazebosim.org", "openroboticstest", "models", "test box"); + fuelServerHost, "openroboticstest", "models", "test box"); EXPECT_EQ(path, common::joinPaths(modelPath, "1")); EXPECT_TRUE(common::exists(common::joinPaths(modelPath, "1"))); @@ -455,8 +466,8 @@ TEST_F(FuelClientTest, DownloadModel) // Download model with pbr paths from URL and check that paths are fixed { // Unversioned URL should get the latest available version - common::URI url{ - "https://fuel.gazebosim.org/1.0/openroboticstest/models/Rescue Randy"}; + common::URI url{"https://" + fuelServerHost + + "/1.0/openroboticstest/models/Rescue Randy"}; // Check it is not cached std::string cachedPath; @@ -472,7 +483,7 @@ TEST_F(FuelClientTest, DownloadModel) // Check it was downloaded to `2` auto modelPath = common::joinPaths(common::cwd(), "test_cache", - "fuel.gazebosim.org", "openroboticstest", "models", "rescue randy"); + fuelServerHost, "openroboticstest", "models", "rescue randy"); EXPECT_EQ(path, common::joinPaths(modelPath, "2")); EXPECT_TRUE(common::exists(common::joinPaths(modelPath, "2"))); @@ -508,9 +519,11 @@ TEST_F(FuelClientTest, DownloadModel) // Download model with a dependency specified within its `metadata.pbtxt` { - common::URI url{ - "https://fuel.gazebosim.org/1.0/openroboticstest/models/hatchback_red_1" - }; + common::URI url{"https://" + fuelServerHost + + "/1.0/openroboticstest/models/hatchback_red_1"}; + + // The dependency will use the fuel.gazebosim.org URI regardless of what + // fuelServerHost is because it's set in the hatchback_red_1 model common::URI depUrl{ "https://fuel.gazebosim.org/1.0/openroboticstest/models/hatchback_1"}; @@ -546,8 +559,10 @@ TEST_F(FuelClientTest, DownloadModel) // The dependency points to fuel.gazebosim.org. { common::URI url{ - "https://fuel.gazebosim.org/1.0/openrobotics/models/hatchback red" + "https://" + fuelServerHost + "/1.0/openrobotics/models/hatchback red" }; + // The dependency will use the fuel.gazebosim.org URI regardless of what + // fuelServerHost is because it's set in the "hatchback red" model common::URI depUrl{ "https://fuel.gazebosim.org/1.0/openrobotics/models/hatchback"}; @@ -582,7 +597,7 @@ TEST_F(FuelClientTest, DownloadModel) // Try using nonexistent URL { std::string url{ - "https://fuel.gazebosim.org/1.0/openroboticstest/models/" + "https://" + fuelServerHost + "/1.0/openroboticstest/models/" "Inexistent model"}; std::string path; Result result = client.DownloadModel(common::URI(url), path);