Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support pcl::PointXYZRGBA to pcl::VLPGrabber #1738

Closed
wants to merge 212 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
0dc4b89
Add support pcl::PointXYZRGBA to pcl::VLPGrabber
UnaNancyOwen Oct 20, 2016
3890526
Merge branch 'master' into fix_grabber
UnaNancyOwen Nov 22, 2017
01a0580
Add set colors to lasers
UnaNancyOwen Nov 22, 2017
9a1fd94
Fix Add set colors to lasers
UnaNancyOwen Nov 22, 2017
247b9a7
Fix Space
UnaNancyOwen Nov 22, 2017
b2c6171
Deprecated old typedefs
UnaNancyOwen Nov 23, 2017
6356cdd
Add get maximum number of lasers
UnaNancyOwen Nov 23, 2017
e1b1ffd
Change to static function
UnaNancyOwen Nov 23, 2017
7ee3a46
Fix bit width
UnaNancyOwen Nov 23, 2017
d1f83af
Fix build
UnaNancyOwen Nov 23, 2017
6f8d29b
fix in toPCLPointCloud2 if input cloud has no points
Sep 20, 2016
3cec989
fix ply header parsing
Nov 4, 2016
8781bf2
Add missing typedefs for stl container compatibility.
stefanbuettner Oct 22, 2016
a1812b8
Replace boost::math::isnan by pcl_isnan
jspricke Nov 29, 2016
9e30f2b
Option for no blocking with visualization on mesh2pcd
wkentaro Nov 30, 2016
c9fcf03
Option for no blocking with visualization on mesh_sampling
wkentaro Dec 2, 2016
a7ae658
Fix Android cross-compilation error
nachtgeist Dec 7, 2016
b92b889
Updated narf_keypoint_extraction.rst
rahulchhabra07 Dec 9, 2016
a7dc6c1
Consistent permissions when creating PCD files
SergioRAgostinho Dec 12, 2016
306d52e
Update lccp_segmentation.h
YB27 Nov 18, 2016
c6cb00a
Update Installer for MSVC15
UnaNancyOwen Nov 19, 2016
083d773
visualization: Return when camera file is not open
Dec 9, 2016
fab466a
Remove non commercial claim (Closes: #1775)
jspricke Dec 19, 2016
c0b57c4
Suppress sphinx warnings in the tutorials. Fixed pyparsing version to…
SergioRAgostinho Dec 21, 2016
25d7410
Update find Boost versions
UnaNancyOwen Dec 29, 2016
49846a8
Update CUDA Compute Capability
UnaNancyOwen Jan 2, 2017
9c3e885
added missing include boost shared_ptr
saarnold Jan 4, 2017
dee716b
compile-time support for VTK7.1
v4hn Dec 3, 2016
d96dadf
OrganizedConnectedComponentSegmentation fix
mtsep Jan 16, 2017
ec343f3
Update comment in supervoxel clustering
Jan 22, 2017
efd185a
fix off-by-one error in addText3D, fixes #1803
timjr Jan 24, 2017
604fed2
More clear error message in SampleConsensusModelPlane::optimizeModelC…
taketwo Jan 27, 2017
3d290f4
Move RGBValue to anonymous namespace
taketwo Feb 9, 2017
c73e3bc
added missing deletes and destructor for ISSKeypoint3D
ffurrer Jan 26, 2017
b21089e
Fixed bug incorrectly copying adjacent points in fromPCLPointCloud2()…
Feb 1, 2017
b10cbf7
Added number of CUDA cores per SM for Pascal GPUs
Robzz Feb 21, 2017
d1c5d61
Link to delayimp library for all MSVC versions
bouffa Feb 20, 2017
9cdb13c
Remove MSVCdd variables
UnaNancyOwen Feb 24, 2017
feb9aed
Update gp3.hpp
Pccolb Mar 31, 2017
e6dc203
Update find Boost version
UnaNancyOwen Apr 18, 2017
02ea42f
tools: Add option to write normals to mesh_sampling
Jan 12, 2017
fb81ea7
tools: Rename res to voxel_cloud
Jan 19, 2017
30f1d1e
Switch SEARCHENGINE State by GENERATE_HTMLHELP State
UnaNancyOwen Sep 11, 2016
1b99600
Update find Boost versions for PCLConfig
UnaNancyOwen Apr 22, 2017
f8e393c
Fix Link Path to Documents
UnaNancyOwen Apr 24, 2017
85aafed
Fix CPack for Documents
UnaNancyOwen Apr 24, 2017
d41eb78
typo in docs
May 3, 2017
b554eb1
Removed a line that caused compilation error.
ttoocstest May 23, 2017
d3ef467
fix badges markup in README
andyli May 29, 2017
37770bc
Modularized unit tests
SergioRAgostinho Dec 23, 2016
d7cace0
Travis: job refactoring
SergioRAgostinho Dec 24, 2016
ce16c96
fixed wrong quadrilinear interpolation value in SHOT descriptor (#1859)
fedassa May 30, 2017
b5ea7ab
Add Catch I/O Exception to OpenNI2 Viewer
UnaNancyOwen Apr 28, 2017
8ee6906
Add Catch I/O Exception to OpenNI Viewer
UnaNancyOwen Apr 28, 2017
58450b6
Fix crashes in LineMOD due to out of bound memory access and using re…
Mar 3, 2017
c48bc41
registration/bfgs.h: identical sub-expressions to the left and to the…
SviatoslavRazmyslov May 30, 2017
4a8289f
old version pcl save face with name vertex_index(still on Ubuntu 14.0…
Mar 27, 2017
f6a386c
Fix LineMOD compilation errors. Also removing PointRGB struct as it i…
Mar 6, 2017
3467a07
Fixes segfault in our-cvfh when h_index is > 12. This wraps h_index a…
Feb 21, 2017
fa61870
fix compile problems under vs2010 (#1822)
Tonsty May 30, 2017
bc0a1f9
Fixed the build of ndt_2d with Eigen 3.3
bouffa Feb 19, 2017
3c61343
Fix reflection in umeyama.
Feb 13, 2017
d087575
Change the code to match the variable name
taketwo Feb 8, 2017
3c49a12
Update esf.hpp (#1755)
lordofkey May 30, 2017
a4348ba
Fix bug: frame type is not correct in statistics
fengjim Oct 28, 2016
8421caa
Fixed missing reset of number of iterations in ndt2d.
carlosmccosta Sep 16, 2016
fddb045
Don't set VTK_LIBRARIES manually
jspricke Nov 17, 2016
8172e1b
Fix detection of the Ensenso SDK on Windows when the path contains sp…
Robzz May 30, 2017
3b6863c
fix typo
WillieMaddox May 31, 2017
bc88ccf
Fixes for gp3 algorithm
puzzlepaint Jun 1, 2017
cb71ee0
Update test_shot_estimation.cpp
chenxiao86 May 30, 2017
d0ba6b8
fix a bug to improve speed
weireweire Jun 4, 2017
b6c2a56
test_common_io fix
SergioRAgostinho Jun 5, 2017
d0ab51a
Revert "Fix reflection in umeyama."
taketwo Jun 8, 2017
60285f4
Adapting umeyama from Eigen-3.3-beta2 to pcl.
jolesinski Sep 5, 2016
dd1f578
Use Eigen::umeyama() if Eigen 3.3.0 or above is available
taketwo Jun 8, 2017
00ad593
Add cube.ply mesh and update matrix transform tutorial
VictorLamoine Jun 23, 2017
358e529
Fix the link markup (and wording) in matrix transform tutorial
taketwo Jun 24, 2017
757f7cf
Use Q_* instead of slots and signals in Qt apps
taketwo Jun 24, 2017
f3c4267
Enable ccache for speeding up build in CI
SergioRAgostinho Jun 22, 2017
6284a2f
Enable travis stages and disable building apps for now
SergioRAgostinho Jun 23, 2017
a1c711a
Fixes a compilation issues between recent versions of GCC and CUDA < 8.0
SergioRAgostinho Jun 26, 2017
00eba31
Replace C-style sqrtf with std::sqrt
taketwo Jun 26, 2017
1241584
Fixes incorrect return value of pcl converter
SergioRAgostinho Jun 26, 2017
6e5b869
fix octree bounds (#1532)
pkuhto Jun 27, 2017
a288b0f
Fix linking error when using Octree with custom leaf container
stefanbuettner Jun 20, 2016
1eda467
Cleanup octree includes
stefanbuettner Jun 20, 2016
5206199
Use PCL_NO_PRECOMPILE in modules which need custom octree leaf contai…
stefanbuettner Oct 19, 2016
52d4b33
Fix aligned_malloc for mingw platform
taketwo Jun 26, 2017
15e630f
Clean up Octree unit tests
taketwo Jun 27, 2017
559cb48
Fix find path for Eigen
UnaNancyOwen Jun 28, 2017
43a521f
Explicitly convert to Eigen index from double
taketwo Jun 29, 2017
ddaecd4
Remove invalid PCL_EXPORTS
SergioRAgostinho Jun 30, 2017
ac9bda3
Introduce a new CMake and C++ macro variable "PCL_DEV_VERSION"
taketwo Jun 26, 2017
fe9e2a6
Update PCL_VERSION_COMPARE macro function to account for development …
taketwo Jun 26, 2017
d272f34
Add a unit test for PCL_VERSION_COMPARE macro function
taketwo Jun 26, 2017
b3ca468
Add PCL_VERSION_PLAIN and use where appropriate
taketwo Jun 27, 2017
2b3cec8
Bump current version to "1.8.0-dev"
taketwo Jun 26, 2017
7122a95
Add option that build with FLANN dynamic linking on Windows
UnaNancyOwen Jun 30, 2017
7a7b2ab
export the SSE definitions used compiling the lib
SergioRAgostinho Jun 30, 2017
98d7616
Remove unecessary Eigen flags
SergioRAgostinho Jul 1, 2017
2cc0504
Update changes for 1.8.1
SergioRAgostinho Aug 19, 2016
9a214ff
Add new gtest path
jspricke Jul 2, 2017
4342798
Fix issue with finding pcl deployed out of path (#1923)
SergioRAgostinho Jul 4, 2017
08db9e7
instantiate: remove duplicate macro definition
PeterSchuebel Jul 4, 2017
3c85ce1
Fix issue #1674
anuppari Jul 5, 2017
7043ce9
Added CUDA compute capability 5.3
haueck Jul 7, 2017
10f050f
Added option to specify translation and rotation convergence deltas in
carlosmccosta Sep 23, 2016
ccffcf0
Update Ensenso tutorial for Ensenso X devices
VictorLamoine Jul 10, 2017
b86e8aa
need to include instantiate.hpp to use PCL_INSTANTIATE
eisoku9618 Jul 19, 2017
1f747ea
Fixed error in documentation.
IgniparousTempest Aug 3, 2017
41f769e
Fixed spelling and grammar errors
IgniparousTempest Aug 4, 2017
ec497fc
Add test for macro _USE_MATH_DEFINES.
ShiningPluto Aug 3, 2017
3c351d0
Final changelist update for 1.8.1
taketwo Aug 8, 2017
58da629
Bump version to 1.8.1-dev
taketwo Aug 8, 2017
2f5b46f
Add ability to cache mls results
Levi-Armstrong Jul 28, 2017
41f6478
Move struct MLSResult outside the MoveingLeastSquares class.
Levi-Armstrong Aug 1, 2017
47909ea
Add documentation for MLSResults and cache MLS results by default
Levi-Armstrong Aug 4, 2017
93cf404
Make MovingLeastSqures getter methods const
Levi-Armstrong Aug 4, 2017
20ffd71
Include pcl/point_cloud.h and pcl/point_types.h headers.
fabianbl Aug 10, 2017
d19a432
Typo
vfdev-5 Aug 22, 2017
5a1d189
Update organized.h (#1965)
vfdev-5 Aug 22, 2017
0f8de92
remove unreachable code (#1967)
jasjuang Aug 22, 2017
61bc4bb
Update Find Boost
UnaNancyOwen Aug 26, 2017
3379479
spatial restriction for marching cube hoppe to avoid phantom surfaces…
Aug 27, 2017
a62bfb5
Simulation: more access to camera paramters
damienjadeduff Jul 13, 2016
27597c0
Redo: Simulation: enable returning of organized point clouds
damienjadeduff Aug 22, 2016
ad7ee0d
Allow changing LUT properties of a shape actor
aecins Aug 1, 2016
a66279d
[OCTREE] Remove a useless field in octree_viewer.
Aug 31, 2017
8c6076a
Generate pkgconfig for 2d module
taketwo Aug 31, 2017
b087384
[OCTREE] Fix the unit 'test_octree'.
Aug 30, 2017
916a726
[OCTREE] To avoid the display of spurious point, check the detph of a…
Aug 28, 2017
4ea1492
[OCTREE] Be able to read PLY file. Use the 'load' function to read in…
Aug 30, 2017
da477c3
[OCTREE] Fix the display of the octree cube.
Aug 30, 2017
762da26
Organized Statistical Outlier Removal PCLPointCloud2 (#1663)
stefanbuettner Sep 2, 2017
1af9c8a
Add accessor for current rendering framerate in PCLVisualizer
taketwo Aug 27, 2017
c72ff75
Replace literal include of wrong CMakeLists file with correct script
taketwo Aug 25, 2017
ce648bb
Fixes remove_indices in UniformSampling
Jun 26, 2017
fdad51c
Fixed queryBBIncludes_subsample
raulmola Sep 5, 2017
5b6bdbf
Update pcl_visualizer.h (#1995)
CSBVision Sep 18, 2017
7680abc
Add alternate projection method
Levi-Armstrong Aug 3, 2017
1afb02c
Move MLS methods inside MLSResult struct
Levi-Armstrong Sep 12, 2017
5cc132e
create MLSResult::projectPoint and MLSResult::projectQueryPoint
Levi-Armstrong Sep 12, 2017
4849510
Add inline keyword to MLSResult and move computeMLSSurface in to MLSR…
Levi-Armstrong Sep 14, 2017
d57415c
Remove mls polynomial_fit_ variable
Levi-Armstrong Sep 18, 2017
48939b8
Fix style guide issues
Levi-Armstrong Sep 19, 2017
b984f8a
Remove use of depreciated function setPolynomialFit in mls
Levi-Armstrong Sep 19, 2017
188805a
Fix bug in PointCloudGeometryHandlerCustom
Sep 21, 2017
7569afe
[OCTREE] Compute accurately the centroid of octree in 'octree_viewer'.
Aug 31, 2017
7220bd1
[OCTREE] Save the point size setting between different depth.
Sep 7, 2017
6074c44
Changed PCDWriter::generateHeaderBinaryCompressed() to accept std::os…
mattgruenke Sep 4, 2017
0d7de23
de-duplicated PCDReader::readHeader () - an overload had been added a…
mattgruenke Sep 4, 2017
b576145
Added std::istream overload of PCDReader::readHeader().
mattgruenke Sep 4, 2017
1d5ef3d
Added PCDReader::readBody_Ascii() and PCDReader::readBody_Binary(), t…
mattgruenke Sep 4, 2017
15ccf4b
Improved TEST (PCL, LZF), by checking the return code of reader.read<…
mattgruenke Sep 4, 2017
d5b88e0
Removed assumptions that sizeof (unsigned int) == 4.
mattgruenke Sep 4, 2017
4356ff5
Disable tools build in CI.
SergioRAgostinho Sep 21, 2017
2c60389
[TRAVIS] Enable the build of tools.
Sep 26, 2017
c75d3cf
fix missing include file: from_meshes.h is using pcl::Vertices in it …
jasjuang Sep 27, 2017
c6cde56
[TRAVIS] Enable the build of apps.
frozar Sep 27, 2017
ebbd3a3
Silence compile warning by removing superfluous call to std::max()
caedmon Sep 28, 2017
4417b58
Replace float indices with Eigen Index
Sep 30, 2017
c2267a1
Fix several documentation typos
broder Oct 8, 2017
73fc141
Add new constructors to PCLVisualizer (#2004)
denix56 Oct 9, 2017
644cfe0
Fix MSVC compile issue related with ssize_t (#2027)
denix56 Oct 14, 2017
a4ade39
Transformation Fix for BoxClipper3D (#1961)
gnedster Oct 15, 2017
bb6f625
Fix the wrong installation rules.
ShiningPluto Oct 16, 2017
0c3a292
Add necessary boost headers to pcl/io to build in CUDA mode (#2025)
bowang Oct 18, 2017
2e5b5bb
fix /MP option not generated for Visual Studio.
Oct 17, 2017
c0c7375
Suppress log when PCL_FIND_QUIETLY is turned on. (#2032)
kaikai2 Oct 19, 2017
c70fcec
[gcc] fixes -Wmisleading-indentation: hog.cpp
moriarty Oct 21, 2017
ad74950
[gcc] fixes -Wmisleading-indentation: auxiliary.h
moriarty Oct 21, 2017
5b0ad59
Support both RGB and RGBA colors in mesh loading
taketwo Oct 23, 2017
f5d3ee5
[gcc] fixes -Wimplicit-fallthrough: common/io.h
moriarty Oct 29, 2017
90aba59
Modify STRICT_ALIGN because macro expansion w/defined is undefined
nereocystis Oct 28, 2017
8c784c7
Added cuda 9 arch bin flags
Nov 2, 2017
74d6745
Unifies Find scripts in PCLConfig
fran6co Nov 12, 2015
846d5a4
Removed normal related accessors and members from EuclideanClusterCom…
SergioRAgostinho Jul 10, 2017
4088d72
Euclidean Cluster Comparator can now cope with situations where label…
SergioRAgostinho Jul 12, 2017
9792a9e
Modified the exclude_label_ container to a map. Class cleanup.
SergioRAgostinho Jul 14, 2017
4c67d81
FLARELocalReferenceFrameEstimation class added (#1571)
aliosciapetrelli Nov 5, 2017
8c73bb7
Fix PACKAGE to include cmake/Modules directory
UnaNancyOwen Nov 6, 2017
d85e31c
Fix incorrect Ptr/ConstPtr typedefs in MovingLeastSquaresOMP
Nov 6, 2017
d2da0f3
Added 'Dist' template type to typedefs and other member functions
May 16, 2016
508f200
Consistent use of 'Dist' template type within KdTreeFLANN
May 16, 2016
a587697
[TUTO] Fix the tutorial qt_visualizer compilation issue: qt4 -> qt5. …
frozar Nov 8, 2017
e4cc743
Add a function 'addText3D' which allows to specify the orientation of…
frozar Nov 8, 2017
28345dd
Suppress control reaches end of non-void function in io.h
SergioRAgostinho Nov 6, 2017
8b027d9
Update finder scripts for Ensenso, OpenNI, and OpenNI2
taketwo Nov 8, 2017
3fe2dd5
VTK function change since version 7.1 (#2063)
yongduek Nov 9, 2017
fb39b13
Removed unused member from ply_parser
SergioRAgostinho Nov 9, 2017
664bd29
Suppress if unused parameter warnings
SergioRAgostinho Nov 9, 2017
57a26df
Suppress sign compare warnings
SergioRAgostinho Nov 9, 2017
de00778
Remove unused variable from octree_viewer
SergioRAgostinho Nov 9, 2017
2dc19fc
Removal of PCA deprecated constructor
SergioRAgostinho Nov 10, 2017
59fcebd
Remove deprecated functions and variables from SAC module
taketwo Nov 10, 2017
83b8dfe
Suppress (maybe) uninitialized warning
SergioRAgostinho Nov 10, 2017
04e26cb
Suppress unused parameter warning
SergioRAgostinho Nov 10, 2017
0dd1d06
Suppress strict alias warning (#2072)
SergioRAgostinho Nov 11, 2017
3739b90
Remove registration module deprecated methods
SergioRAgostinho Nov 12, 2017
b1be693
Remove deprecated ros headers
SergioRAgostinho Nov 11, 2017
51cadfe
Remove deprecated methods in surface module
SergioRAgostinho Nov 12, 2017
a836751
Remove deprecated methods in filters module
SergioRAgostinho Nov 12, 2017
956c468
Remove deprecated methods in io module
SergioRAgostinho Nov 12, 2017
b0c5e01
Remove deprecated methods in visualization module
SergioRAgostinho Nov 12, 2017
280259f
fix header names
dirkholz Nov 13, 2017
3fe588d
More warning suppresion in pcl apps
SergioRAgostinho Nov 13, 2017
9ab6359
Add search path suffixes for Vcpkg
UnaNancyOwen Nov 15, 2017
1a399eb
Suppress the final set of warnings in pcl apps
SergioRAgostinho Nov 14, 2017
4a700f3
[c++] replace auto_ptr with scoped_ptr (#2037)
moriarty Nov 15, 2017
870f6ed
Add support pcl::PointXYZRGBA to pcl::VLPGrabber
UnaNancyOwen Oct 20, 2016
2e0b9fb
Merge remote-tracking branch 'origin/fix_grabber' into fix_grabber
UnaNancyOwen Nov 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions io/include/pcl/io/hdl_grabber.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace pcl
* Represents 1 corrected packet from the HDL Velodyne. Each laser has a different RGB
*/
typedef void
(sig_cb_velodyne_hdl_scan_point_cloud_xyzrgb) (const boost::shared_ptr<const pcl::PointCloud<pcl::PointXYZRGBA> >&,
(sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba) (const boost::shared_ptr<const pcl::PointCloud<pcl::PointXYZRGBA> >&,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are public typedefs and need to be deprecated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that mean these typedef definitions should change to protected (or private) access specifier?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is not in scope. The idea is to not break the public API while warning the users to update their code to the new signature type. You'll need to change it to something like this

typedef void
(sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba) (const boost::shared_ptr<const pcl::PointCloud<pcl::PointXYZRGBA> >&,
                                                float,
                                                float);

typedef PCL_DEPRECATED ("Use 'sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba' instead")
sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba sig_cb_velodyne_hdl_scan_point_cloud_xyzrgb;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So apparently there's no portable solution because the deprecation attribute for typedefs is placed in different places depending on the compiler, so you'll need to safeguard against msvc and (gcc/clang). More info here https://stackoverflow.com/questions/4995868/deprecate-typedef

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add PCL_DEPRECATED

float,
float);
/** \brief Signal used for a single sector
Expand All @@ -98,7 +98,7 @@ namespace pcl
* This signal is sent when the Velodyne passes angle "0". Each laser has a different RGB
*/
typedef void
(sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgb) (const boost::shared_ptr<const pcl::PointCloud<pcl::PointXYZRGBA> >&);
(sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgba) (const boost::shared_ptr<const pcl::PointCloud<pcl::PointXYZRGBA> >&);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add PCL_DEPRECATED


/** \brief Constructor taking an optional path to an HDL corrections file. The Grabber will listen on the default IP/port for data packets [192.168.3.255/2368]
* \param[in] correctionsFile Path to a file which contains the correction parameters for the HDL. This parameter is mandatory for the HDL-64, optional for the HDL-32
Expand Down Expand Up @@ -152,12 +152,17 @@ namespace pcl
filterPackets (const boost::asio::ip::address& ipAddress,
const unsigned short port = 443);

/** \brief Allows one to customize the colors used for each of the lasers.
/** \brief Allows one to customize the colors used for each number of the lasers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Switch to Allows one to customize the colors used by each laser..
  • Add the documentation for the input parameter.

*/
void
setLaserColorRGB (const pcl::RGB& color,
unsigned int laserNumber);

/** \brief Allows one to customize the colors used for each of the lasers.
*/
void
pcl::HDLGrabber::setLaserColorRGB (const pcl::RGB (&colors)[HDL_MAX_NUM_LASERS]);

/** \brief Any returns from the HDL with a distance less than this are discarded.
* This value is in meters
* Default: 0.0
Expand Down Expand Up @@ -235,12 +240,12 @@ namespace pcl
unsigned int last_azimuth_;
boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> > current_scan_xyz_, current_sweep_xyz_;
boost::shared_ptr<pcl::PointCloud<pcl::PointXYZI> > current_scan_xyzi_, current_sweep_xyzi_;
boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA> > current_scan_xyzrgb_, current_sweep_xyzrgb_;
boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA> > current_scan_xyzrgba_, current_sweep_xyzrgba_;
boost::signals2::signal<sig_cb_velodyne_hdl_sweep_point_cloud_xyz>* sweep_xyz_signal_;
boost::signals2::signal<sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgb>* sweep_xyzrgb_signal_;
boost::signals2::signal<sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgba>* sweep_xyzrgba_signal_;
boost::signals2::signal<sig_cb_velodyne_hdl_sweep_point_cloud_xyzi>* sweep_xyzi_signal_;
boost::signals2::signal<sig_cb_velodyne_hdl_scan_point_cloud_xyz>* scan_xyz_signal_;
boost::signals2::signal<sig_cb_velodyne_hdl_scan_point_cloud_xyzrgb>* scan_xyzrgb_signal_;
boost::signals2::signal<sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba>* scan_xyzrgba_signal_;
boost::signals2::signal<sig_cb_velodyne_hdl_scan_point_cloud_xyzi>* scan_xyzi_signal_;

void
Expand Down
23 changes: 22 additions & 1 deletion io/include/pcl/io/vlp_grabber.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace pcl
* \param[in] port UDP Port that should be used to listen for VLP packets
*/
VLPGrabber (const boost::asio::ip::address& ipAddress,
const unsigned short port);
const uint16_t port);

/** \brief virtual Destructor inherited from the Grabber interface. It never throws. */
virtual
Expand All @@ -80,13 +80,34 @@ namespace pcl
virtual std::string
getName () const;

/** \brief Allows one to customize the colors used for each of the lasers. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method description similar to the one before. Add doc regarding input parameters.

void
setLaserColorRGB (const pcl::RGB& color,
uint8_t laserNumber);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You normally wouldn't need to redefine this method, but this inheritance scheme is completely broken.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This declaration is correct, because the definition is different from base class. (laser number check)

void
pcl::HDLGrabber::setLaserColorRGB (const pcl::RGB& color,
                                   uint8_t laserNumber)
{
  if (laserNumber >= HDL_MAX_NUM_LASERS)
    return;

  laser_rgb_mapping_[laserNumber] = color;
}
void
pcl::VLPGrabber::setLaserColorRGB (const pcl::RGB& color,
                                   uint8_t laserNumber)
{
  if (laserNumber >= VLP_MAX_NUM_LASERS)
    return;

  laser_rgb_mapping_[laserNumber] = color;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right 👍


protected:
static const uint8_t VLP_MAX_NUM_LASERS = 16;
static const uint8_t VLP_DUAL_MODE = 0x39;

private:
/** \brief Allows one to customize the colors used for each number of the lasers. */
void
setLaserColorRGB (const pcl::RGB& color,
unsigned int laserNumber);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Doc parameters
  • Why is this method defined in private scope?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, It is mistake.


/** \brief Allows one to customize the colors used for each of the lasers. */
void
setLaserColorRGB (const pcl::RGB (&colors)[VLP_MAX_NUM_LASERS]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here


virtual void
toPointClouds (HDLDataPacket *dataPacket);

boost::asio::ip::address
getDefaultNetworkAddress ();

void
initializeLaserMapping ();

void
loadVLP16Corrections ();

Expand Down
69 changes: 38 additions & 31 deletions io/src/hdl_grabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ pcl::HDLGrabber::HDLGrabber (const std::string& correctionsFile,
current_sweep_xyz_ (new pcl::PointCloud<pcl::PointXYZ> ()),
current_scan_xyzi_ (new pcl::PointCloud<pcl::PointXYZI> ()),
current_sweep_xyzi_ (new pcl::PointCloud<pcl::PointXYZI> ()),
current_scan_xyzrgb_ (new pcl::PointCloud<pcl::PointXYZRGBA> ()),
current_sweep_xyzrgb_ (new pcl::PointCloud<pcl::PointXYZRGBA> ()),
current_scan_xyzrgba_ (new pcl::PointCloud<pcl::PointXYZRGBA> ()),
current_sweep_xyzrgba_ (new pcl::PointCloud<pcl::PointXYZRGBA> ()),
sweep_xyz_signal_ (),
sweep_xyzrgb_signal_ (),
sweep_xyzrgba_signal_ (),
sweep_xyzi_signal_ (),
scan_xyz_signal_ (),
scan_xyzrgb_signal_ (),
scan_xyzrgba_signal_ (),
scan_xyzi_signal_ (),
hdl_data_ (),
udp_listener_endpoint_ (),
Expand All @@ -95,13 +95,13 @@ pcl::HDLGrabber::HDLGrabber (const boost::asio::ip::address& ipAddress,
current_sweep_xyz_ (new pcl::PointCloud<pcl::PointXYZ> ()),
current_scan_xyzi_ (new pcl::PointCloud<pcl::PointXYZI> ()),
current_sweep_xyzi_ (new pcl::PointCloud<pcl::PointXYZI> ()),
current_scan_xyzrgb_ (new pcl::PointCloud<pcl::PointXYZRGBA> ()),
current_sweep_xyzrgb_ (new pcl::PointCloud<pcl::PointXYZRGBA> ()),
current_scan_xyzrgba_ (new pcl::PointCloud<pcl::PointXYZRGBA> ()),
current_sweep_xyzrgba_ (new pcl::PointCloud<pcl::PointXYZRGBA> ()),
sweep_xyz_signal_ (),
sweep_xyzrgb_signal_ (),
sweep_xyzrgba_signal_ (),
sweep_xyzi_signal_ (),
scan_xyz_signal_ (),
scan_xyzrgb_signal_ (),
scan_xyzrgba_signal_ (),
scan_xyzi_signal_ (),
hdl_data_ (),
udp_listener_endpoint_ (ipAddress, port),
Expand All @@ -124,10 +124,10 @@ pcl::HDLGrabber::~HDLGrabber () throw ()
stop ();

disconnect_all_slots<sig_cb_velodyne_hdl_sweep_point_cloud_xyz> ();
disconnect_all_slots<sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgb> ();
disconnect_all_slots<sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgba> ();
disconnect_all_slots<sig_cb_velodyne_hdl_sweep_point_cloud_xyzi> ();
disconnect_all_slots<sig_cb_velodyne_hdl_scan_point_cloud_xyz> ();
disconnect_all_slots<sig_cb_velodyne_hdl_scan_point_cloud_xyzrgb> ();
disconnect_all_slots<sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba> ();
disconnect_all_slots<sig_cb_velodyne_hdl_scan_point_cloud_xyzi> ();
}

Expand Down Expand Up @@ -156,10 +156,10 @@ pcl::HDLGrabber::initialize (const std::string& correctionsFile)
laser_corrections_[i].cosVertOffsetCorrection = correction.verticalOffsetCorrection * correction.cosVertCorrection;
}
sweep_xyz_signal_ = createSignal<sig_cb_velodyne_hdl_sweep_point_cloud_xyz> ();
sweep_xyzrgb_signal_ = createSignal<sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgb> ();
sweep_xyzrgba_signal_ = createSignal<sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgba> ();
sweep_xyzi_signal_ = createSignal<sig_cb_velodyne_hdl_sweep_point_cloud_xyzi> ();
scan_xyz_signal_ = createSignal<sig_cb_velodyne_hdl_scan_point_cloud_xyz> ();
scan_xyzrgb_signal_ = createSignal<sig_cb_velodyne_hdl_scan_point_cloud_xyzrgb> ();
scan_xyzrgba_signal_ = createSignal<sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba> ();
scan_xyzi_signal_ = createSignal<sig_cb_velodyne_hdl_scan_point_cloud_xyzi> ();

current_scan_xyz_.reset (new pcl::PointCloud<pcl::PointXYZ>);
Expand Down Expand Up @@ -320,18 +320,18 @@ pcl::HDLGrabber::toPointClouds (HDLDataPacket *dataPacket)
return;

current_scan_xyz_.reset (new pcl::PointCloud<pcl::PointXYZ> ());
current_scan_xyzrgb_.reset (new pcl::PointCloud<pcl::PointXYZRGBA> ());
current_scan_xyzrgba_.reset (new pcl::PointCloud<pcl::PointXYZRGBA> ());
current_scan_xyzi_.reset (new pcl::PointCloud<pcl::PointXYZI> ());

time_t system_time;
time (&system_time);
time_t velodyne_time = (system_time & 0x00000000ffffffffl) << 32 | dataPacket->gpsTimestamp;

current_scan_xyz_->header.stamp = velodyne_time;
current_scan_xyzrgb_->header.stamp = velodyne_time;
current_scan_xyzrgba_->header.stamp = velodyne_time;
current_scan_xyzi_->header.stamp = velodyne_time;
current_scan_xyz_->header.seq = scan_counter;
current_scan_xyzrgb_->header.seq = scan_counter;
current_scan_xyzrgba_->header.seq = scan_counter;
current_scan_xyzi_->header.seq = scan_counter;
scan_counter++;

Expand All @@ -344,22 +344,22 @@ pcl::HDLGrabber::toPointClouds (HDLDataPacket *dataPacket)
{
if (firing_data.rotationalPosition < last_azimuth_)
{
if (current_sweep_xyzrgb_->size () > 0)
if (current_sweep_xyzrgba_->size () > 0)
{
current_sweep_xyz_->is_dense = current_sweep_xyzrgb_->is_dense = current_sweep_xyzi_->is_dense = false;
current_sweep_xyz_->is_dense = current_sweep_xyzrgba_->is_dense = current_sweep_xyzi_->is_dense = false;
current_sweep_xyz_->header.stamp = velodyne_time;
current_sweep_xyzrgb_->header.stamp = velodyne_time;
current_sweep_xyzrgba_->header.stamp = velodyne_time;
current_sweep_xyzi_->header.stamp = velodyne_time;
current_sweep_xyz_->header.seq = sweep_counter;
current_sweep_xyzrgb_->header.seq = sweep_counter;
current_sweep_xyzrgba_->header.seq = sweep_counter;
current_sweep_xyzi_->header.seq = sweep_counter;

sweep_counter++;

fireCurrentSweep ();
}
current_sweep_xyz_.reset (new pcl::PointCloud<pcl::PointXYZ> ());
current_sweep_xyzrgb_.reset (new pcl::PointCloud<pcl::PointXYZRGBA> ());
current_sweep_xyzrgba_.reset (new pcl::PointCloud<pcl::PointXYZRGBA> ());
current_sweep_xyzi_.reset (new pcl::PointCloud<pcl::PointXYZI> ());
}

Expand All @@ -369,29 +369,29 @@ pcl::HDLGrabber::toPointClouds (HDLDataPacket *dataPacket)

computeXYZI (xyzi, firing_data.rotationalPosition, firing_data.laserReturns[j], laser_corrections_[j + offset]);

xyz.x = xyzrgb.x = xyzi.x;
xyz.y = xyzrgb.y = xyzi.y;
xyz.z = xyzrgb.z = xyzi.z;
xyz.x = xyzrgba.x = xyzi.x;
xyz.y = xyzrgba.y = xyzi.y;
xyz.z = xyzrgba.z = xyzi.z;

xyzrgb.rgba = laser_rgb_mapping_[j + offset].rgba;
xyzrgba.rgba = laser_rgb_mapping_[j + offset].rgba;
if (pcl_isnan (xyz.x) || pcl_isnan (xyz.y) || pcl_isnan (xyz.z))
{
continue;
}

current_scan_xyz_->push_back (xyz);
current_scan_xyzi_->push_back (xyzi);
current_scan_xyzrgb_->push_back (xyzrgb);
current_scan_xyzrgba_->push_back (xyzrgba);

current_sweep_xyz_->push_back (xyz);
current_sweep_xyzi_->push_back (xyzi);
current_sweep_xyzrgb_->push_back (xyzrgb);
current_sweep_xyzrgba_->push_back (xyzrgba);

last_azimuth_ = firing_data.rotationalPosition;
}
}

current_scan_xyz_->is_dense = current_scan_xyzrgb_->is_dense = current_scan_xyzi_->is_dense = true;
current_scan_xyz_->is_dense = current_scan_xyzrgba_->is_dense = current_scan_xyzi_->is_dense = true;
fireCurrentScan (dataPacket->firingData[0].rotationalPosition, dataPacket->firingData[11].rotationalPosition);
}

Expand Down Expand Up @@ -445,8 +445,8 @@ pcl::HDLGrabber::fireCurrentSweep ()
if (sweep_xyz_signal_ != NULL && sweep_xyz_signal_->num_slots () > 0)
sweep_xyz_signal_->operator() (current_sweep_xyz_);

if (sweep_xyzrgb_signal_ != NULL && sweep_xyzrgb_signal_->num_slots () > 0)
sweep_xyzrgb_signal_->operator() (current_sweep_xyzrgb_);
if (sweep_xyzrgba_signal_ != NULL && sweep_xyzrgba_signal_->num_slots () > 0)
sweep_xyzrgba_signal_->operator() (current_sweep_xyzrgba_);

if (sweep_xyzi_signal_ != NULL && sweep_xyzi_signal_->num_slots () > 0)
sweep_xyzi_signal_->operator() (current_sweep_xyzi_);
Expand All @@ -463,8 +463,8 @@ pcl::HDLGrabber::fireCurrentScan (const unsigned short startAngle,
if (scan_xyz_signal_->num_slots () > 0)
scan_xyz_signal_->operator () (current_scan_xyz_, start, end);

if (scan_xyzrgb_signal_->num_slots () > 0)
scan_xyzrgb_signal_->operator () (current_scan_xyzrgb_, start, end);
if (scan_xyzrgba_signal_->num_slots () > 0)
scan_xyzrgba_signal_->operator () (current_scan_xyzrgba_, start, end);

if (scan_xyzi_signal_->num_slots () > 0)
scan_xyzi_signal_->operator() (current_scan_xyzi_, start, end);
Expand Down Expand Up @@ -602,6 +602,13 @@ pcl::HDLGrabber::setLaserColorRGB (const pcl::RGB& color,
laser_rgb_mapping_[laserNumber] = color;
}

/////////////////////////////////////////////////////////////////////////////
void
pcl::HDLGrabber::setLaserColorRGB (const pcl::RGB (&colors)[HDL_MAX_NUM_LASERS])
{
laser_rgb_mapping_ = colors;
}

/////////////////////////////////////////////////////////////////////////////
bool
pcl::HDLGrabber::isAddressUnspecified (const boost::asio::ip::address& ipAddress)
Expand Down
Loading