Code Monkey home page Code Monkey logo

Comments (7)

holger-motional avatar holger-motional commented on June 30, 2024 12

Hi,
that is actually a good question! The .pcd.bin extension is a bit confusing. Essentially we took a .pcd file, removed the headers and saved the data in binary format. You can see how we load it here. So the LIDAR data is simply a bunch of float32 = 4 Bytes and each point is described by 5 floats. The following code in Python would print out the numbers:

import numpy as np

file_path = '/data/nuscenes/samples/LIDAR_TOP/n015-2018-07-18-11-50-34+0800__LIDAR_TOP__1531886224949600.pcd.bin'

with open(file_path, "rb") as f:
    number = f.read(4)
    while number != b"":
        print(np.frombuffer(number, dtype=np.float32))
        number = f.read(4)

Now you just need to implement that in C++.

from nuscenes-devkit.

holger-motional avatar holger-motional commented on June 30, 2024 3

Hi @dada9375,
yes, we changed the folder structure a bit. It is now under: https://github.com/nutonomy/nuscenes-devkit/blob/master/python-sdk/nuscenes/utils/data_classes.py#L249

from nuscenes-devkit.

RogerAylagas avatar RogerAylagas commented on June 30, 2024

Thank you for the quick response, just one more question: what are the fields of the points? x ,y ,z and intensity I supose, but what is the 5th field?
Thank you again!

from nuscenes-devkit.

holger-motional avatar holger-motional commented on June 30, 2024

As described at https://github.com/nutonomy/nuscenes-devkit/blob/radar-visualization/python-sdk/nuscenes_utils/data_classes.py#L228 , that's the ring index (an integer between 0 and 31). We do not currently use it.

from nuscenes-devkit.

RogerAylagas avatar RogerAylagas commented on June 30, 2024

Oh okey thank you so much!!

from nuscenes-devkit.

dada9375 avatar dada9375 commented on June 30, 2024

Hi Holger,
unfortunately I cannot find the page https://github.com/nutonomy/nuscenes-devkit/blob/radar-visualization/python-sdk/nuscenes_utils/data_classes.py#L228
Was it removed?

from nuscenes-devkit.

dada9375 avatar dada9375 commented on June 30, 2024

Thanks Holger

from nuscenes-devkit.

Related Issues (20)

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.