Giter Club home page Giter Club logo

mesh_tools's Introduction

This is the active ROS2 branch of this repository, which targets ROS2 humble. Our CI runs on Ubuntu Jammy (22.04), but other distros might work as well.

If your are looking for the old ROS1 version, checkout the noetic branch.

Mesh Tools

We introduce a set of tools to make 3D environment mesh representations accessible and manageable in ROS. We provide RViz tools to visualize and annotate huge meshes in combination with generated textures and different cost layers, which are based on the geometric analyses of the environment, or which represent different sensor readings, e.g. RGB image or even hyper-spectral image textures.

Introduction

Over the last years, the Knowledge Based Systems Group has developed an extensive set of tools to automatically generate triangle meshes from 3D laser scans. These tools are implemented in the freely available Las Vegas Surface Reconstruction Toolkit (LVR) and have been successfully applied in different robotic contexts.

With terrestrial and mobile laser scanning it is possible to create 3D point clouds of large environments in short time. However, the amount of collected data is too large to be processed on a mobile robot. To make this data available on mobile robots, we suggest to compute 3D triangle meshes from point cloud data as corresponding map representations. Such maps have several advantages over raw point cloud data and voxel representations. They overcome the discretization of voxel maps and deliver topologically connected surface representations, which ease segmentation, annotation and enable intuitive visualization.

However, to make the maps accessible in ROS, corresponding message definitions and tools for storing, handling and editing such maps are required.

Message Definitions

We divided the mesh structure in its geometry, textures and cost layers. These different components are then associated using a UUID. This structure enables passing the geometry at first to RViz and other nodes. Theses nodes may analyze the geometry, e.g the roughness or height difference and compute corresponding mesh cost layers which are published as individual message with a corresponding mesh UUID. Thereby other nodes can associate these layers with a certain mesh object. In RViz a certain layer can then be selected by the user and visualized coloring the corresponding costs or displaying the textures. In the following gives an overview on most important mesh messages:

  • MeshGeometry(Stamped): Geometric structure of a triangle mesh using a buffer vertices, normals and faces
  • MeshVertexColors(Stamped): Vertex color information of a corresponding mesh
  • MeshVertexCosts(Stamped): Vertex cost information of a corresponding mesh coloring the mesh using a rainbow color scheme.
  • ClusterLabel: Grouping a set of triangles / faces of a corresponding mesh using the face indices, optional cluster label
  • Texture: Texture using an Image and an ID
  • Material: Color and optional texture ID
  • VertexTexCoords: Texture coordinate
  • MeshMaterials(Stamped): Combining the materials with texture coordinates and clusters of a corresponding mesh
  • Feature: A feature at a specific location and its feature descriptor
  • MeshFeatures: List of features for a corresponding mesh

RViz Plugins

We developed several RViz plugins to display 3D meshes together with different information layers (RGB textures, semantic labels, trafficability, etc.). It is possible to render the received meshes in different modes (lighting, materials and wireframe). The supported modes are selectable based on availability in the tree view. For path planning, we also implemented an interactive tool to set navigation goal poses on the mesh surface. To generate semantic maps, we implemented an interactive tool that can be used to select connected clusters of triangles and assign semantic labels to them. Some screenshots and videos demonstrate these plugins (see Supplementary Material).

RViz Mesh Plugin

The TexturedMesh displays a mesh with optional a fixed color, textures, vertex colors or vertex costs. Additionally, it can display the wire-frame as well as the vertex normals of the mesh. The MeshGoal Tool provides the possibility to select a geometry_msgs/PoseStamped on the surface of the mesh.

RViz Map Plugin

The Mesh Display displays labeled faces. The ClusterLabel Display displays labeled clusters. The ClusterLabel Tool enables the labeling of certain faces using different selection and de-selection methods as shown in a video (see Supplementary Material. The ClusterLanel Panel allows to manage your clusters and label names as well as the corresponding colors.

Videos

Mesh Cost Layer

This Video shows different cost layers which are used for path planning in outdoor terrain. It shows one partly reconstructed scan in the botanical garden of Osnabrück

Mesh Cost Layer

Mesh Textures

This Video shows a textured dataset of the botanical garden of Osnabrück including footpaths

Mesh Textures

Label Tool

This video shows the labeling tool, which is used to cluster faces to an object or a union, (in the example a door) using a mesh inside a building

Label Tool

Build Status

ROS Distro GitHub CI Develop Documentation Source Deb Binary Deb
Humble Humble CI N/A N/A N/A N/A
Noetic Noetic CI Build Dev Status Build Doc Status Build Src Status Build Bin Status

mesh_tools's People

Contributors

aock avatar barryridge avatar cakem1x avatar krueter-uos avatar lrabius avatar mklpiening avatar pgorczak avatar spuetz avatar timple avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mesh_tools's Issues

Minimal example

It would be great if you could provide a data sample to quickly test your package.
Something similar to what you show in the videos

fatal error: mesh_msgs/TriangleIndices.h: No such file or directory

Hello, I highly appreciate your work. While replicating your work, I encountered the following issues:

Fatal error: mesh_msgs/GetUUID.h: No such file or directory
Fatal error: mesh_msgs/TriangleIndices.h: No such file or directory
Could you provide the corresponding GetUUID.srv and TriangleIndices.msg files?

Please address me in some small workflows

Hi, thanks by these great nodes, really I got impressed by the paper, I think your tools are the starting point to fix so many issues with robotics these days.

I get laser scans with colored pointclouds, and I would like ,apart can use them as you do in your repository (rover), can export the pointcloud+colour+normals, meshes+colour ,or both to external software as Cloud Compare, Meshlab, blender or Unreal Engine, to in example can make maps for Gazebo, Isaac Sim...

In your paper I read you use HDF5 files but I couldn't find any software that can import them, could be possible so it in .ASC format maybe?.

Really I think this should be the fact standard, it is so brilliant.

Thanks!

Git submodule HighFive

When building the package I did a simple git clone but I had the error that ext/HighFive/include is empty... I realized it was a submodule and build it manually by cloning HighFive in the desired location. It would be great to at least document how to install this package.
Also do you plan to offer it as an ros-melodic-mesh-tools package?

Missing includes CL and lvr2

  1. By cloning manually HighFive in ext/HightFive I might have introduced the following problem:
    When running catkin build, I have:
 #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_map_plugin.dir/src/ClusterLabelPanel.cpp.o] Error 1
In file included from ...

and also

fatal error: lvr2/io/PlutoMapIO.hpp: No such file or directory
 #include <lvr2/io/PlutoMapIO.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~

What dependencies am I missing? Thanks

How add color to vertex?

Hi, thanks your great work.
I am using mesh_tools for visualization.
According to the document:
MeshGeometry (Stamped) Defines the geometric structure of a triangle
mesh with 1.) an array of 3D vectors, which represents vertices in R3, 2.)
an array of indices, in which three indices each define a triangle by referring
220 to the array of vertices (vertex and index buffer), and 3.) an array of vertex
normal vectors.
MeshVertexColors (Stamped) Colors for the vertices are represented by an
array of std msgs/ColorRGBA and linked to a corresponding mesh by a string
representing a UUID.

I create a MeshGeometry ros_msg and a MeshVertexColors ros_msg, and push_back the same size items in them, give them the same UUIDs, however, the rviz says that Received vertex colors, but UUIDs dont match.

Resolve conflicts between lvr2 and the mesh tools

Selecting previously unselected package ros-melodic-hdf5-map-io.
Preparing to unpack .../35-ros-melodic-hdf5-map-io_1.0.0-2bionic.20200429.182051_amd64.deb ...
Unpacking ros-melodic-hdf5-map-io (1.0.0-2bionic.20200429.182051) ...
dpkg: error processing archive /tmp/apt-dpkg-install-D2PVZ2/35-ros-melodic-hdf5-map-io_1.0.0-2bionic.20200429.182051_amd64.deb (--unpack):
trying to overwrite '/opt/ros/melodic/include/highfive/H5Attribute.hpp', which is also in package ros-melodic-lvr2 19.12.1-1bionic.20200107.200812

...

Unpacking ros-melodic-mesh-tools (1.0.0-2bionic.20200506.151004) ...
Errors were encountered while processing:
/tmp/apt-dpkg-install-D2PVZ2/35-ros-melodic-hdf5-map-io_1.0.0-2bionic.20200429.182051_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Ros2 and Rviz2 port?

It seems weird that it is not easy to display a mesh in RViz without an external plugin or hacking a URDF file to do it for you.

Then I found this project that looks like everything I need and more. Great work here. Is there any effort in place to get it working in Ros2 with Rviz2? As I understand, RViz has not changed much in porting to Ros2.

rosdep cannot locate dependencies for [rviz_mesh_plugin]

Your rosdep keys appear to not work on noetic. unless I'm missing something. An attempt to install mesh-tools with the command:
sudo apt install ros-noetic-mesh-tools
also returned the result

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ros-noetic-mesh-tools : Depends: ros-noetic-rviz-mesh-plugin but it is not installable
E: Unable to correct problems, you have held broken packages.

Am I missing a repository? Are there any installation instructions for this source?

Memory leak in TexturedMeshVisual::addTexture()

imageData never gets deleted after this copy:

  uchar* imageData = new uchar[dataSize];
  std::memcpy(imageData, &data[0], dataSize);

This causes a memory leak when visualizing textures on MeshGeometryStamped topics.

How to use Texture

Hi, thanks for your great work.

I've already used MeshGeometry(Stamped) to show mesh in rviz. It's perrfect.
However, I encountered difficulties when using Texture. Can you provide some examples to help me?

Thank you very much.

How to install the project?

Hi. I'm interested in using this package as part of a project and wondering what the easiest method of installing is. Is there a binary I can download, or would I need to build the project from source?

Thanks!

Plugin Error in RVIZ

I am getting the following error by adding the plugin in RVIZ

[ERROR] [1659346788.464576399]: PluginlibFactory: The plugin for class 'rviz_map_plugin/Mesh' failed to load. Error: Failed to load library /home/rnd/catkin_ws/devel/lib//librviz_map_plugin.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/rnd/catkin_ws/devel/lib/libhdf5_map_io.so: undefined symbol: _ZN3MPI3Win4FreeEv)

Anyone has an idea??

document/add tool for converting meshes to hdf5 for mesh navigation

Currently, mesh navigation needs a HDF5 mesh to function.
There is a CLI tool in lvr2 with which one can convert different mesh formats to a .h5 mesh. The conversion only works for simple input formats, e.g. .ply.

The goal of this issue is to have an easy to use converter in the mesh_tools pkg, accessible via ros2 cli tools. It is sufficient if it only supports .ply files, but more would be nice. Though only if it works reliably.

When converting, check

  • the existing lvr2 script
  • where the mesh_map in mesh_navigation loads maps and precomputes values

and consider

  • normals (calculations seem off; use weighted face normals instead)
  • colors

rviz_map_plugin crash in rviz

The rviz crash after a period of running, give the following error messages

[ WARN] [1667566012.731866799]: OGRE EXCEPTION(4:ItemIdentityException): An object of type 'ManualObject' with name '0_TriangleMesh_0_7476' already exists. in SceneManager::createMovableObject at /build/ogre-1.9-kiU5_5/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreSceneManager.cpp (line 6829)
terminate called after throwing an instance of 'Ogre::ItemIdentityException'
  what():  OGRE EXCEPTION(4:ItemIdentityException): An object of type 'ManualObject' with name '0_TriangleMesh_0_7476' already exists. in SceneManager::createMovableObject at /build/ogre-1.9-kiU5_5/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreSceneManager.cpp (line 6829)

Any suggestion to solve this problem?
Thanks a lot!

Plugin Importing Error and different Panel

I am having the warnings from RVIZ:
[ WARN] [1659937631.907037001]: Can't load image into texture material, material does not exist!

Do you have an idea where the problem could be?

License?

It would be nice if this repo had a license file. Some of this code looks attractive in my work, but without a licence it is not easy to make decisions about whether it should be used or not. Thanks.

Only run Github Actions for relevant branches

The current Github workflows run for all branches. Since the workflows are for ROS1 melodic and noetic, they fail when running with the new humble branch.

I propose to change the existing workflows to only run on relevant branches (probably master).

When the ROS2 port on humble nears its completion, we should also look into adding a workflow for it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.