Giter Site home page Giter Site logo

saeedghsh / mesh-to-occupancy-map Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 1.0 417 KB

Conversion from mesh (.ply files) to bitmap Occupancy map (.png file)

License: GNU General Public License v3.0

Python 100.00%
mesh 3dmodels conversion python occupancy-grid-map

mesh-to-occupancy-map's Introduction

Mesh-To-Occupancy-Map

Conversion from mesh (.ply files) to bitmap Occupancy map (.png file)

Example

snap shot of the ply file (from tango dev kit):
mesh_snapshot

conversion result version .1 (pointset):
ogm_v.1

conversion result version .2 (interactive raycast):
ogm_v.2

Laundry List

  • add slider for offset and interval
  • draw lines from point to point during the interactive process
  • title each figure with description (short instruction?)
  • use skiz to pick raycasting points?

License

Distributed with a GNU GENERAL PUBLIC LICENSE; see LICENSE.

Copyright (C) Saeed Gholami Shahbandi

mesh-to-occupancy-map's People

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

szf2020

mesh-to-occupancy-map's Issues

.PLY content/fields. Error with no RGB in ply

Hi @saeedghsh

Thanks for sharing this package! Trying to give it a run.

I have both packages sitting under common directory:

ben@ben-Aspire:~/mesh-to-map$ ls
Mesh-To-Occupancy-Map Place-Categorization-2D

When running:

python mesh_to_ogm_v2.py -s -v --filename /home/ben/Documents/Wildcat/2022_08_31_00_07_24Z/output/global_wildcat_velodyne.ply

Result is:

Traceback (most recent call last):
File "mesh_to_ogm_v2.py", line 123, in
main (filename, slice_config, ogm_config, raycast_config)
File "mesh_to_ogm_v2.py", line 54, in main
ply_data, faces, [Vx, Vy, Vz, Vr, Vg, Vb, Va] = convert_mesh.load_ply_file ( file_name )
File "../lib/convert_mesh.py", line 78, in load_ply_file
Vr = ply_data['vertex'].data['red'] # u1 -> usigned int 8
File "/home/ben/.local/lib/python2.7/site-packages/numpy/core/memmap.py", line 331, in getitem
res = super(memmap, self).getitem(index)
ValueError: no field of name red

Is this because i have no data in the RGB fields in my ply? would you mind posting a demo .ply that i can test with?

Thanks heaps,
Ben

ask for tutorial

Thanks for your awesome code share!

Recently I do some research on pointcloud and png fusion, when I run you code

python2 mesh_to_ogm_v2.py --filename=test.klg.ply

and the output is blow:

 *** NO FILE IS SPECIFIED, Here is how to use this script ***

Copyright (C) 2017 Saeed Gholami Shahbandi. All rights reserved.

This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this program. If not, see
<http://www.gnu.org/licenses/>

can you give me a specific tutorial ,many thanks in advance !

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.