-
Notifications
You must be signed in to change notification settings - Fork 222
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
Work in progress using the new resource retriever apis #1262
base: rolling
Are you sure you want to change the base?
Conversation
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
…esource_retreiver
… invalidate cache Signed-off-by: William Woodall <[email protected]>
Pushed an update that does some clean up and renames the message/service package into |
In the context of related discussion in ros/robot_state_publisher#144, I think it would make sense to define the service in a package that is not related to rviz, e.g., meshes can be queried by a node that performs collision checking. |
While the service is defined in this repository, it doesn't have any dependency on |
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
@asherikov, as @mjcarroll said you should be able to use this new package without any issue even if it's in the rviz repository and the name implies a connection to rviz. I spoke to @mjcarroll about it, and we agreed that we'd like to see it used in rviz as-is in this pull request before recommending it be used outside of this context and/or moving it to one of the standard message repositories (e.g. |
Ok, I think this is ready for review. It depends on ros/resource_retriever#103 which is under review now. |
rviz_default_plugins/src/rviz_default_plugins/ros_resource_retriever.cpp
Show resolved
Hide resolved
…riever.cpp Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Pulls: ros/resource_retriever#103, #1262 |
return nullptr; | ||
} | ||
Ogre::MeshSerializer ser; | ||
Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream(*res->data.data(), res->data.size())); |
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.
Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream(*res->data.data(), res->data.size())); | |
Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream( | |
const_cast<void*>(reinterpret_cast<void const *>(res->data.data())), res->data.size())); |
@@ -72,7 +73,7 @@ TEST_F(MeshLoaderTestFixture, throws_reasonable_exception_for_missing_files) { | |||
std::string mesh_path = "package://rviz_rendering/ogre_media/MISSING.mesh"; | |||
testing::internal::CaptureStderr(); | |||
|
|||
auto mesh = rviz_rendering::loadMeshFromResource(mesh_path); | |||
auto mesh = rviz_rendering::loadMeshFromResource(&this->retriever_, mesh_path); | |||
|
|||
std::string output = testing::internal::GetCapturedStderr(); | |||
ASSERT_THAT(output, HasSubstr("Error retrieving file")); |
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.
ASSERT_THAT(output, HasSubstr("Error retrieving file")); | |
ASSERT_THAT(mesh, nullptr); |
@@ -226,6 +228,13 @@ RobotLink::RobotLink( | |||
color_material_ = | |||
rviz_rendering::MaterialManager::createMaterialWithLighting(color_material_name); | |||
|
|||
resource_retriever::RetrieverVec plugins; | |||
plugins.push_back(std::make_shared<RosResourceRetriever>(context_->getRosNodeAbstraction())); |
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.
other issue is happening here:
C++ exception with description "ROS node abstraction interface not valid" thrown in the test body
No description provided.