-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APIs for retrieving models in parallel #199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far, appears to be still be in progress. Can this be retarged to Citadel?
src/FuelClient.cc
Outdated
if (!this->CachedModel(dependencyURI, dependencyPath)) | ||
this->DownloadModel(dependencyURI, dependencyPath); | ||
ModelIdentifier dependencyID; | ||
this->ParseModelUrl(dependencyURI, dependencyID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check if parsing failed?
src/FuelClient.cc
Outdated
} | ||
} | ||
} | ||
|
||
return Result(ResultType::FETCH); | ||
} | ||
|
||
////////////////////////////////////////////////// | ||
Result FuelClient::DownloadModels( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this function not finished? It doesn't appear to be doing anything and isn't being used
const std::vector<std::string> &_headers, | ||
std::vector<ModelIdentifier> &_dependencies); | ||
|
||
public: Result DownloadModels( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing docs
const std::vector<ModelIdentifier> &_ids, | ||
size_t _jobs = 2); | ||
|
||
/// \brief Retrieve the list of dependencies for a model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codecheck error: remove line ending whitespace
/// \brief Retrieve the list of dependencies for a model. | |
/// \brief Retrieve the list of dependencies for a model. |
src/FuelClient.cc
Outdated
if(!res) | ||
return res; | ||
|
||
for (auto dep: dependencies) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codecheck error
for (auto dep: dependencies) | |
for (auto dep : dependencies) |
src/FuelClient.cc
Outdated
@@ -678,10 +700,19 @@ Result FuelClient::DownloadModel(const ModelIdentifier &_id, | |||
if (!this->dataPtr->cache->SaveModel(newId, resp.data, true)) | |||
return Result(ResultType::FETCH_ERROR); | |||
|
|||
return this->ModelDependencies(_id, _dependencies); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codecheck error
return this->ModelDependencies(_id, _dependencies); | |
return this->ModelDependencies(_id, _dependencies); |
Signed-off-by: Michael Carroll <michael@openrobotics.org>
27ceec8
to
1b3595c
Compare
Does this resolve #188 for you? I still see the errors when using a command like this:
|
Signed-off-by: Michael Carroll <michael@openrobotics.org>
I'm getting similar errors seen in osrf/subt#943 when running
such as
|
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Updated the implementation to use threads rather than async which seems to avoid the segfaults I was seeing before. |
I'm seeing compiler errors,
|
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
@mjcarroll , I think you were missing this line: d16d499? Can you confirm? |
Signed-off-by: Michael Carroll <michael@openrobotics.org>
…s/ign-fuel-tools into parallel_downloads
Codecov Report
@@ Coverage Diff @@
## ign-fuel-tools4 #199 +/- ##
===================================================
- Coverage 78.13% 77.92% -0.21%
===================================================
Files 19 19
Lines 2643 2718 +75
===================================================
+ Hits 2065 2118 +53
- Misses 578 600 +22
Continue to review full report at Codecov.
|
fix for windows build in #213 |
auto result = client.DownloadWorlds(worldIds, _jobs); | ||
ignerr << "Failed to download worlds for collection [" | ||
<< collection.Name() | ||
<< "]" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this error message always printed even if the worlds are downloaded successfully?
This was introduced in #199. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
* FuelClient.cc: include <deque> Fixes the Windows build. Signed-off-by: Steve Peters <scpeters@openrobotics.org> * ign_src_TEST: print error messages Signed-off-by: Steve Peters <scpeters@openrobotics.org> * print one more error message Signed-off-by: Steve Peters <scpeters@openrobotics.org> * ign.cc: remove console error message This was introduced in #199. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-01-10/1228/1 |
🎉 New feature
Closes #188
Summary
Adds APIs for downloading a set of models in parallel.
Test it
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge