ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think I found the problem

In the rviz code, at /rviz/default_plugin/markers/mesh_resource_marker.cpp

line 101,

there is something like this

void MeshResourceMarker::onNewMessage(const MarkerConstPtr& old_message, const MarkerConstPtr& new_message) { ROS_ASSERT(new_message->type == visualization_msgs::Marker::MESH_RESOURCE);

scene_node_->setVisible(false);

if (!entity_ || old_message->mesh_resource != new_message->mesh_resource)
{ //DO THE WHOLE PROCESSING HERE }

(...)

I think that for efficiency reasons the rviz author decided not to reload a dae file, and that if test checks just that.

I am able to solve the problem using two different files and alternating between both.

Thanks all, and sorry for posting a question and answering 10 min after :)

Miguel Oliveira

I think I found the problem

In the rviz code, at /rviz/default_plugin/markers/mesh_resource_marker.cpp

line 101,

there is something like this

void MeshResourceMarker::onNewMessage(const MarkerConstPtr& old_message, const MarkerConstPtr& new_message) { ROS_ASSERT(new_message->type == visualization_msgs::Marker::MESH_RESOURCE);

scene_node_->setVisible(false);

if (!entity_ || old_message->mesh_resource != new_message->mesh_resource)
{ //DO THE WHOLE PROCESSING HERE }

(...)

I think that for efficiency reasons the rviz author decided not to reload a dae file, and that if test checks just that.

I am able to solve the problem using two different files and alternating between both.

Thanks all, and sorry for posting The problem now is that the rviz also loads the mesh once. In rviz package

rviz/src/rviz/mesh_loader.cpp, line 532 the following code

if(Ogre::MeshManager::getSingleton().resourceExists(resource_path))
{ return Ogre::MeshManager::getSingleton().getByName(resource_path); } else { //LOAD THE MESH HERE NORMALY

Also prevents a question and answering 10 min after :)

previously loaded file to be reloaded. Is there any way I can force rviz to reload files?

Thank you Miguel Oliveira