Decoder for raw Velodyne packet data
Project description
velodyne_decoder
Python package and C++ library for Velodyne packet decoding. Point cloud extraction from PCAP and ROS bag files is supported out of the box.
The decoded point clouds are provided either as a structured NumPy array:
array([(2.6912806, 1.1651788 , -0.47706223, 9., -0.10085896, 0, 16, 1),
(2.3603256, 1.021404 , -1.428755 , 85., -0.10085782, 0, 1, 1),
(2.6994078, 1.1675802 , -0.4092741 , 3., -0.10085666, 0, 17, 1),
...,
(2.8952641, 0.80728334, 0.48905915, 2., 0.00054029, 923, 30, 1),
(2.8683424, 0.79923725, -0.5555609 , 2., 0.00054144, 923, 15, 1),
(2.908243 , 0.80980825, 0.56333727, 1., 0.00054259, 923, 31, 1)],
dtype={'names': ['x', 'y', 'z', 'intensity', 'time', 'column', 'ring', 'return_type'],
'formats': ['<f4', '<f4', '<f4', '<f4', '<f4', '<u2', 'u1', 'u1'],
'offsets': [0, 4, 8, 12, 16, 20, 22, 23], 'itemsize': 32})
or as a contiguous array of floats (default):
array([[2.691281, 1.165179, -0.477062, 9., -0.100859, 0., 16., 1.],
[2.360326, 1.021404, -1.428755, 85., -0.100858, 0., 1., 1.],
[2.699408, 1.16758 , -0.409274, 3., -0.100857, 0., 17., 1.],
...,
[2.895264, 0.807283, 0.489059, 2., 0.00054 , 923., 30., 1.],
[2.868342, 0.799237, -0.555561, 2., 0.000541, 923., 15., 1.],
[2.908243, 0.809808, 0.563337, 1., 0.000543, 923., 31., 1.]], dtype=float32)
Installation
Wheels are available from PyPI for Linux, MacOS and Windows. Python versions 3.7+ are supported.
pip install velodyne-decoder
Alternatively, you can build and install the development version from source.
sudo apt-get install cmake build-essential python3-dev
pip install git+https://github.com/valgur/velodyne_decoder.git
Usage
Decoding Velodyne data from a ROS bag
import velodyne_decoder as vd
bagfile = 'xyz.bag'
lidar_topics = ['/velodyne_packets']
cloud_arrays = []
for stamp, points, topic in vd.read_bag(bagfile, topics=lidar_topics):
cloud_arrays.append(points)
The rosbag
library must be installed. If needed, you can install it without setting up the entire ROS stack with
pip install rosbag --extra-index-url https://rospypi.github.io/simple/
To extract all VelodyneScan
messages in the bag you can leave the list of topics unspecified.
The header timestamp from the scan messages will be returned by default. To use the message arrival time instead
set use_header_time=False
.
To return arrays of structs instead of the default contiguous arrays, set as_pcl_structs=True
.
Decoding Velodyne data from a PCAP file
import velodyne_decoder as vd
pcap_file = 'vlp16.pcap'
cloud_arrays = []
for stamp, points in vd.read_pcap(pcap_file):
cloud_arrays.append(points)
To return arrays of structs instead of the default contiguous arrays, set as_pcl_structs=True
.
Configuration
You can pass a velodyne_decoder.Config
object to all decoder functions. The following options are available:
min_range
andmax_range
– only return points between these range values.min_angle
andmax_angle
– only return points between these azimuth angles.timestamp_first_packet
– whether the scan timestamps are set based on the first or last packet in the scan.cut_angle
– when working with a raw packet stream, if unset (by default), the stream is split into a "scan" every time at least 360 degrees have been covered. If set, the splitting always occurs at the specified azimuth angle instead. Note that the scan might cover less than 360 degrees in this case.
Only required for data from HDL-64E sensors:
model
– the sensor model ID. Seevelodyne_decoder.Model.__entries
for the possible values.calibration_file
– beam calibration parameters in a YAML format. You can either extract the calibration info from a PCAP file with packets usingextract-hdl64e-calibration <pcap_file>
or convert adb.xml
provided with the sensor using gen_calibration.py from the ROS driver.
Authors
- Martin Valgur (@valgur)
The core functionality has been adapted from the ROS velodyne driver.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for velodyne_decoder-3.0.0-cp312-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f4c3f6364227204b52fa6edb24251d235d7d0ddb718f7b50309356d178f1738 |
|
MD5 | f25e1c4d25a8dbeddcdeb063abe1988a |
|
BLAKE2b-256 | 4e7070b20bf03d4a31effa041363ab550cf389dce49d24917d8442c86a89f825 |
Hashes for velodyne_decoder-3.0.0-cp312-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e6a8d3fad6e8874beda7adf3a5cde321e0784ed9ee70236390f4a34e2f5a93a |
|
MD5 | e793f7a163db131cba7a182e469b455e |
|
BLAKE2b-256 | f450af3f36310cad2b681581b08aaf6847be2bc35c5a9809e99ccaf430bb754a |
Hashes for velodyne_decoder-3.0.0-cp312-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed6e1b4647718e50297a1a6e34ea3b9cafed9b0a0dc232be995ae22f49a3bef5 |
|
MD5 | 3bb1f509d893f9fdfa6823365a5f2b93 |
|
BLAKE2b-256 | 2caa1ff4dfeb8fe8ab4879223f22a7a25954b67b7662b21e0fb1571a1389f7e6 |
Hashes for velodyne_decoder-3.0.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6fd2af1ec9b9fd97ee9f5424b44714e0d3b8ede1611fa5d1a4f4d63eaf53074 |
|
MD5 | 62bac22cc470853f3ff26467d5ebde53 |
|
BLAKE2b-256 | 41d1d5300426e3d3d4ab27765f3967ff9885e7305b45d6b7300e126e0e893641 |
Hashes for velodyne_decoder-3.0.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bed35553b50d97b5648bfc3a9702c38e2777019d3d7d86ccc3982997b687b86 |
|
MD5 | b9e66ca69dea380477dca793de1638ce |
|
BLAKE2b-256 | 591d848477ec8741cfa003ca32fd35558880fe932fea46cdf1d45bd34bd6427f |
Hashes for velodyne_decoder-3.0.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f45e8b6c8a461ae3097c9f077a0a5bdb9635e05236d40598c8df00b4ca91616 |
|
MD5 | 8ea1e919537f9c4873101a04a64fa8e0 |
|
BLAKE2b-256 | ac281586e58aa01b38e32f91280d8c960fc74c339ddd827c9f98c7fd0cc86942 |
Hashes for velodyne_decoder-3.0.0-cp312-abi3-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11f8b5583942d0d038cd8e5ecb6ecc22e1abcd9bcc5319919e8a359c348d08ed |
|
MD5 | 1a707d6951305a394282b8949b9ee0d3 |
|
BLAKE2b-256 | 21e32160d009fd450d1de4b9fece8f466efeccf7fcf5f86c8f6bfca1a949970d |
Hashes for velodyne_decoder-3.0.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec4cd56af4d3f8e547cecb6ff56135b918aaccf8dc34b55e91d2cca7420f4020 |
|
MD5 | 8c67bf074d326c0a9d2147480a966810 |
|
BLAKE2b-256 | d3dc3863cc5b3b89f21166b595736da6ef5945620061765ffd505f32903796d5 |
Hashes for velodyne_decoder-3.0.0-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7b401f418287d4ede13be053d171a79aa3921cc79352fc75f64335b101592a6 |
|
MD5 | 6d8754911d806818c0b10c293fed5357 |
|
BLAKE2b-256 | 441d1265760ded5abd3f17ed8bbc94f3652428b4c1fc9a8d2e092cfbde197ea3 |
Hashes for velodyne_decoder-3.0.0-cp311-cp311-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcc8bf4744ab82226b5ee9253fbcbde60a4d9194b07555c21da45c8041b8f8e9 |
|
MD5 | 529005d1a2b24aef552bba4ab9d38d85 |
|
BLAKE2b-256 | f7c8bfe42ee4e15d7c43b368c9426e168cd677905cfd44c2206ee89be70a636b |
Hashes for velodyne_decoder-3.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90ea8904c2d33d35d41bd9b8937024bde73ac0b78678c87b132fac5340fb1db7 |
|
MD5 | 54415d757d3aafcff39fc94672ed1eb4 |
|
BLAKE2b-256 | 52013cf9f097c27811d1e9a3380465badb121dc35a724a10f7395ae8a2696efc |
Hashes for velodyne_decoder-3.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40166610d90c859576c1058700bfa477e9d3f88cea535a9aba895fcc24fdaea5 |
|
MD5 | ed5b25e62f7a7c6c26f77090e99fe53c |
|
BLAKE2b-256 | 91231512fd91f2b3487317383c657fcf2e1b78e979338878cb8f325b0a9f19a5 |
Hashes for velodyne_decoder-3.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71b40b98f1839d4ebc83d38401f28dd3f2a14c9a789609d31fb4edeba4ab2ed0 |
|
MD5 | 7b5a4097255ec2a14f4d206135d778a0 |
|
BLAKE2b-256 | c108a43455c64af476148c004dd474cab126d05d7d5f3049603ff6eb3437afb9 |
Hashes for velodyne_decoder-3.0.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f7a042f624aef97555d10cfa4e3eb4c08b99fd188e2ceb8755b09f9d591fb06 |
|
MD5 | 6e4c54cfcf5428e5349af84bdc48c4f7 |
|
BLAKE2b-256 | 1e4e15b0ae895cdede8d6a6fa8cf9088d59fe513975d6c8e859ecc201ff1b3d5 |
Hashes for velodyne_decoder-3.0.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97133c2e8e427ea53899d6f6650d630a7db7b3ef50f3e4771490ee9dd29ea9b9 |
|
MD5 | 11c61a6f47a2bceeed19ae5884f348b7 |
|
BLAKE2b-256 | 40d048a6c50f2eb16595d737ebbc8d5b139ff2765da4c0f5bcd3f923b147cd06 |
Hashes for velodyne_decoder-3.0.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaa6bb59d80381cc740f36bbbf3069adc7e9ca0452392e53f46a2b894891cb47 |
|
MD5 | b18e6334c40bc31a2c880a39c2328092 |
|
BLAKE2b-256 | 20ae937439a4fee288e2af723297709827b9b19e58933f4425711d5d13b69846 |
Hashes for velodyne_decoder-3.0.0-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ef406e3d5373b39f59449eb716782ed4b5074a17abaacf3af2b5f92a110b121 |
|
MD5 | a598829ea3f74d8cf3b6c292864fd9ea |
|
BLAKE2b-256 | 2e3b0bb641b5741a26ee63730e50747f5e974ec3b7c7d98680771fb6c54899a6 |
Hashes for velodyne_decoder-3.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ecbfcefa89f44aa908d0333571d3f694562675f7a9697f5ba46c4897f399fbe |
|
MD5 | 5c281e43ad983943d92766cebb0ffc9b |
|
BLAKE2b-256 | 2c1ec8eca54e5c68e61665444b22d0e13be382c0a6a1d666b4e75dd1dbc2ac6c |
Hashes for velodyne_decoder-3.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10e3010ca1b1a4401e543dde65c0b31e014551a60f4353ea1658d6cd5461f431 |
|
MD5 | 952b7cb9ef26f3650b722b271b7c51cf |
|
BLAKE2b-256 | 42ea7570b0c0460e872d956814c71391283479784426c3b04843f71a6c002b82 |
Hashes for velodyne_decoder-3.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 476cb89506914ba62e8bba311168c68d57042650951c987727954e00bb52599f |
|
MD5 | 1d28ec67fe98030634965d55ca2b8e44 |
|
BLAKE2b-256 | 3c156df6d865ca7452a96bdc8303018ae90a2a3f28db02d6d090dec019ffb142 |
Hashes for velodyne_decoder-3.0.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13d9fe6201c03c0b04002ff9ecd40a6ebcbf61b1efa438668f82fc597268bc3b |
|
MD5 | 35a6325fd71d1ea207a8218b92096e9f |
|
BLAKE2b-256 | da04311a6172766300277254690d274a780682223bb5d2892c7dbaa846740847 |
Hashes for velodyne_decoder-3.0.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27da24b99c94baa3b99235f7ecedd6c15f64419cd15129c06b1989a9f5c6503f |
|
MD5 | fac61b646edd74ed809bff0d767fd0df |
|
BLAKE2b-256 | b3674eb02d5f74a2b1e732822f9758acb00001cf2fa7b1fed1b83bd2637f625c |
Hashes for velodyne_decoder-3.0.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b953f98647728e5ad1fe4844641aaed84e388fe3641214a539b9a0210c39c9e2 |
|
MD5 | b0f707647602e2d1a70030e042592748 |
|
BLAKE2b-256 | 1ef9ce6cb0da25fada4f5bba15610bb202bfd584a345161f1eb74a84c53902ad |
Hashes for velodyne_decoder-3.0.0-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f179c3fcc7a72634d5ed4785370368fe0fa1857b86c37825e87a8887a1fd7982 |
|
MD5 | b212a180941b0db0d868bb7dd3bfd162 |
|
BLAKE2b-256 | 776e90505a39d7b71df60e9f39f1297a9dac6bae21472d91470d7fd64c9e4f1e |
Hashes for velodyne_decoder-3.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52de1cb9fe745ca9db0ecfd6d6ce1d92ca54977127d856a121e674d57adf9c7a |
|
MD5 | 7f698ca0052e250239df982680950fa2 |
|
BLAKE2b-256 | d18fc3420ec8269f74d356804cdd8b27210ce53e6802b30d5700f6d594ac0611 |
Hashes for velodyne_decoder-3.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3ebc27794bacbcaefaf45dfddae12be8e4ed163ce6ef8c5b2c5dbc6d9619c98 |
|
MD5 | 5a91a7c3a59f713839b74d72c7e63199 |
|
BLAKE2b-256 | af02aefc70e067456b7e5483be6bbcc71603f93aeac39eb9906681246bcaaa0c |
Hashes for velodyne_decoder-3.0.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c49c6e7347695ea88d57d9074958cc7dbf3297a9fe14f4b9c81fbbc6fd8845ce |
|
MD5 | 2f9409c19e0967624a5667f2db3272bc |
|
BLAKE2b-256 | 42b91fa1bd041584af8c33d308a81cfb1b571b894afd9d1cc84801efd141042f |
Hashes for velodyne_decoder-3.0.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1382e3123da1d18862284d2f98f18fe65e6bb32103ba64ee4a4e3a8df03772c4 |
|
MD5 | 0f1d7ca5614563c98bfa2e4fceb318f1 |
|
BLAKE2b-256 | 07d86ded5b98ebcdc6259ed2805c4224f26f427d26388a0638f97e48967a640f |
Hashes for velodyne_decoder-3.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | daed156403d97123d09c8b05b3d9ff3192ed4ec3131a6539704bf67f83728c9f |
|
MD5 | 2bf0044d3f37d22fe399ceebc127925f |
|
BLAKE2b-256 | 82b0b7671292e249cc6916bd77f78c882075835b47da41d7c3009c70a8cf6744 |
Hashes for velodyne_decoder-3.0.0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dff642989e71bc99333d57065a225021f48ce4718281095764d4f51ce1a64b0 |
|
MD5 | e3faacc50057f16342d734ef2760d468 |
|
BLAKE2b-256 | 0a2ef3b52e1d72a615daa416638408e07c50dc609d569d0cedf723b0e349f452 |
Hashes for velodyne_decoder-3.0.0-cp38-cp38-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ceb7ad0b11f71ed63aeffae8d842428a60e4096329d16ab6099e381c4330ccb |
|
MD5 | c29ca8b9f787953e42827a2d0fd21915 |
|
BLAKE2b-256 | 792b4b1da713925fe47010c890ec8f4ed7be42fa9d70c0abf6570cebd506c247 |
Hashes for velodyne_decoder-3.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3836965450605c537a78dfedb3ba899935bca8bfc4a134888771c51f335dacc4 |
|
MD5 | d1a834d53448349d9e4f542d06135233 |
|
BLAKE2b-256 | fb5cb85ec09cc4db8d9dc1765fff648ad83f527cb48d452212bd0ad89eaa0123 |
Hashes for velodyne_decoder-3.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aaafdec207137df37692c0810d7525bd363990d20012693262ab9ec9ff260a8 |
|
MD5 | 8e1989167cb8598954f9885f7914f448 |
|
BLAKE2b-256 | 8d3138b7b2627d31d173d283e3d4d2ff6d0b6072b3a6a6629815cfc158690682 |
Hashes for velodyne_decoder-3.0.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91a3e4b8e436569e4f590fac403994ab71e39fcb0a77d7b4c4b8b3ddb04eb321 |
|
MD5 | e830cf595532858ca9593e57ec170ecb |
|
BLAKE2b-256 | 7dfc2ec7a240d1a332bf20e082f80ac045fc22107a06ef8f22a61c65d0789130 |
Hashes for velodyne_decoder-3.0.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 273acbc2ba940c13ae1adc5d205f9bdb15d167a9edfd47f2dd56f0b2b04860f0 |
|
MD5 | b3f274c1319ad6492a2dc45cdd63802b |
|
BLAKE2b-256 | e33a4a7934174fc29f3c184122a5e54603bb6eb5f42c26a8249c2c8ee93b029e |