ros rviz 接收visualization_msgs::Marker crash
rviz 作为接收侧,在接收visualization_msgs::Marker topic时,由于rviz内部Marker没有删除机制,所以内存增长导致Out of memory,具体log如下:
terminate called after throwing an instance of 'Ogre::InternalErrorException'
what(): OGRE EXCEPTION(7:InternalErrorException): Index Buffer: Out of memory in GLHardwareIndexBuffer::lock at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/OgreGLHardwareIndexBuffer.cpp (line 122)
所以在发送侧需要定义delete action删除 rviz接收侧的Marker,具体如下:
markers.action = visualization_msgs::Marker::DELETE;