-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Changes from 3 commits
0dc4b89
3890526
01a0580
9a1fd94
247b9a7
b2c6171
6356cdd
e1b1ffd
7ee3a46
d1f83af
6f8d29b
3cec989
8781bf2
a1812b8
9e30f2b
c9fcf03
a7ae658
b92b889
a7dc6c1
306d52e
c6cb00a
083d773
fab466a
c0b57c4
25d7410
49846a8
9c3e885
dee716b
d96dadf
ec343f3
efd185a
604fed2
3d290f4
c73e3bc
b21089e
b10cbf7
d1c5d61
9cdb13c
feb9aed
e6dc203
02ea42f
fb81ea7
30f1d1e
1b99600
f8e393c
85aafed
d41eb78
b554eb1
d3ef467
37770bc
d7cace0
ce16c96
b5ea7ab
8ee6906
58450b6
c48bc41
4a8289f
f6a386c
3467a07
fa61870
bc0a1f9
3c61343
d087575
3c49a12
a4348ba
8421caa
fddb045
8172e1b
3b6863c
bc88ccf
cb71ee0
d0ba6b8
b6c2a56
d0ab51a
60285f4
dd1f578
00ad593
358e529
757f7cf
f3c4267
6284a2f
a1c711a
00eba31
1241584
6e5b869
a288b0f
1eda467
5206199
52d4b33
15e630f
559cb48
43a521f
ddaecd4
ac9bda3
fe9e2a6
d272f34
b3ca468
2b3cec8
7122a95
7a7b2ab
98d7616
2cc0504
9a214ff
4342798
08db9e7
3c85ce1
7043ce9
10f050f
ccffcf0
b86e8aa
1f747ea
41f769e
ec497fc
3c351d0
58da629
2f5b46f
41f6478
47909ea
93cf404
20ffd71
d19a432
5a1d189
0f8de92
61bc4bb
3379479
a62bfb5
27597c0
ad7ee0d
a66279d
8c6076a
b087384
916a726
4ea1492
da477c3
762da26
1af9c8a
c72ff75
ce648bb
fdad51c
5b6bdbf
7680abc
1afb02c
5cc132e
4849510
d57415c
48939b8
b984f8a
188805a
7569afe
7220bd1
6074c44
0d7de23
b576145
1d5ef3d
15ccf4b
d5b88e0
4356ff5
2c60389
c75d3cf
c6cde56
ebbd3a3
4417b58
c2267a1
73fc141
644cfe0
a4ade39
bb6f625
0c3a292
2e5b5bb
c0c7375
c70fcec
ad74950
5b0ad59
f5d3ee5
90aba59
8c784c7
74d6745
846d5a4
4088d72
9792a9e
4c67d81
8c73bb7
d85e31c
d2da0f3
508f200
a587697
e4cc743
28345dd
8b027d9
3fe2dd5
fb39b13
664bd29
57a26df
de00778
2dc19fc
59fcebd
83b8dfe
04e26cb
0dd1d06
3739b90
b1be693
51cadfe
a836751
956c468
b0c5e01
280259f
3fe588d
9ab6359
1a399eb
4a700f3
870f6ed
2e0b9fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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> >&, | ||
float, | ||
float); | ||
/** \brief Signal used for a single sector | ||
|
@@ -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> >&); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
*/ | ||
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 | ||
|
@@ -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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -80,13 +80,34 @@ namespace pcl | |
virtual std::string | ||
getName () const; | ||
|
||
/** \brief Allows one to customize the colors used for each of the lasers. */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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;
} There was a problem hiding this comment. Choose a reason for hiding this commentThe 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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 (); | ||
|
||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
(orprivate
) access specifier?There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add PCL_DEPRECATED