-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add a plugin mechanism to resource_retriever #103
base: rolling
Are you sure you want to change the base?
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.
This makes sense to me, it's the best way to avoid resource retriever from being dependent on large things like ROS, while also keeping it somewhat easy to integrate into other non-ROS projects for relatively simple things like file:///
and package:///
urls.
resource_retriever/include/resource_retriever/plugins/curl_retriever.hpp
Outdated
Show resolved
Hide resolved
resource_retriever/include/resource_retriever/plugins/curl_retriever.hpp
Outdated
Show resolved
Hide resolved
resource_retriever/include/resource_retriever/plugins/filesystem_retriever.hpp
Outdated
Show resolved
Hide resolved
resource_retriever/include/resource_retriever/plugins/filesystem_retriever.hpp
Outdated
Show resolved
Hide resolved
resource_retriever/include/resource_retriever/plugins/curl_retriever.hpp
Show resolved
Hide resolved
resource_retriever/include/resource_retriever/memory_resource.hpp
Outdated
Show resolved
Hide resolved
4ffb1bc
to
8a30432
Compare
I fixed up the DCO and addressed review comments in 8a30432, @clalancette could you have another quick look? |
Signed-off-by: Michael Carroll <[email protected]> Signed-off-by: William Woodall <[email protected]>
Signed-off-by: Michael Carroll <[email protected]> Signed-off-by: William Woodall <[email protected]>
Signed-off-by: Voldivh <[email protected]> Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: Michael Carroll <[email protected]> Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
8a30432
to
8e0fae7
Compare
Signed-off-by: William Woodall <[email protected]>
@@ -33,30 +33,18 @@ | |||
#include <memory> | |||
#include <stdexcept> |
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.
#include <stdexcept> |
/** | ||
* \brief Get a file and store it in memory | ||
* \param url The url to retrieve. package://package/file will be turned into the correct file:// invocation | ||
* \return The file, loaded into memory | ||
* \throws resource_retriever::Exception if anything goes wrong. | ||
*/ | ||
MemoryResource get(const std::string & url); | ||
MemoryResourcePtr get(const std::string & url); |
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.
This is an important change to the API, going from returning a structure to returning a shared_ptr. Given that we usually tick-tock this stuff, can we add back the old API and mark it as deprecated?
The idea behind this is to make
resource_retriever
pluggable. That is that downstream users of the library can choose the mechanisms that they want to back the calls to "get".This will allow for things like retrieving over ROS services or parameters.