Skip to content

ROS point cloud2 importer & renderer for Unity. Enable to convert right handed coordinate model to left handed model.

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

Piskoooh/Pcx-RosPointcloud2

 
 

Repository files navigation

Pcx-RosPointcloud2

Pcx-RosPointcloud2 is a fork of a Poinc Cloud library called Pcx by Keijiro Takahashi (https://github.com/keijiro/Pcx) for importing point cloud data which is constructed with right handed coordinate such as pointcloud2 in ROS. Use git submodule to include this repo to your Unity project. Only static importing is supported

System Requirements

Unity 2022.3.4f1

Usage with RTABMAP

  1. Create a pointcloud database using rtabmap.
  2. Run rtabmap-export in your terminal to convert database to ply file. See here for options.
rtabmap-export [options] <database_path>.db
  1. Add this repository to your unity Assets file.
git submodule add  -b master <url of this repositry>
  1. Import .ply file in to your Unity Assets folder.

  2. Select .ply file in Project window and change CoordinateTypeto RightHanded in Inspector window.

    After you apply the change, the rotation of .ply file will be fixed.

Select Coordinate

image

You can select the coordinate type in the inspector window.

Below from this line: The original README.md for Pcx

Pcx - Point Cloud Importer/Renderer for Unity

GIF GIF

Pcx is a custom importer and renderer that allows for handling point cloud data in Unity.

System Requirements

  • Unity 2019.4

Supported Formats

Currently Pcx only supports PLY binary little-endian format.

How To Install

The Pcx package uses the scoped registry feature to import dependent packages. Please add the following sections to the package manifest file (Packages/manifest.json).

To the scopedRegistries section:

{
  "name": "Keijiro",
  "url": "https://registry.npmjs.com",
  "scopes": [ "jp.keijiro" ]
}

To the dependencies section:

"jp.keijiro.pcx": "1.0.1"

After changes, the manifest file should look like below:

{
  "scopedRegistries": [
    {
      "name": "Keijiro",
      "url": "https://registry.npmjs.com",
      "scopes": [ "jp.keijiro" ]
    }
  ],
  "dependencies": {
    "jp.keijiro.pcx": "1.0.1",
    ...

Container Types

Inspector

There are three types of container for point clouds.

Mesh

Points are to be contained in a Mesh object. They can be rendered with the standard MeshRenderer component. It's recommended to use the custom shaders included in Pcx (Point Cloud/Point and Point Cloud/Disk).

ComputeBuffer

Points are to be contained in a PointCloudData object, which uses ComputeBuffer to store point data. It can be rendered with using the PointCloudRenderer component.

Texture

Points are baked into Texture2D objects that can be used as attribute maps in Visual Effect Graph.

Rendering Methods

There are two types of rendering methods in Pcx.

Point (point primitives)

Points are rendered as point primitives when using the Point Cloud/Point shader.

Points Points

The size of points can be adjusted by changing the material properties.

Inspector

These size properties are only supported on some platforms; It may work with OpenGLCore and Metal, but never work with D3D11/12.

This method is also used when the point size is set to zero in PointCloudRenderer.

Disk (geometry shader)

Points are rendered as small disks when using the Point Cloud/Disk shader or PointCloudRenderer.

Disks

This method requires geometry shader support.

Acknowledgements

The point cloud files used in the examples of Pcx are created by authors listed below. These files are licensed under the Creative Commons Attribution license (CC BY 4.0). Please see the following original pages for further details.

About

ROS point cloud2 importer & renderer for Unity. Enable to convert right handed coordinate model to left handed model.

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 79.8%
  • ShaderLab 10.6%
  • HLSL 9.6%