Skip to content

Commit abe867c

Browse files
committed
fix typos
1 parent ffdbcd6 commit abe867c

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

include/pointcloud_to_laserscan/ipa_pointcloud_to_laserscan_nodelet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace pointcloud_to_laserscan
6060
{
6161
typedef tf2_ros::MessageFilter<sensor_msgs::PointCloud2> MessageFilter;
6262
/**
63-
* Class to process incoming pointclouds into laserscans. Some initial code was pulled from the defunct turtlebot
63+
* Class to process incoming point clouds into laserscans. Some initial code was pulled from the defunct turtlebot
6464
* pointcloud_to_laserscan implementation.
6565
*/
6666
class IpaPointCloudToLaserScanNodelet : public nodelet::Nodelet

src/ipa_pointcloud_to_laserscan_nodelet.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void IpaPointCloudToLaserScanNodelet::onInit()
8484
nh_ = getMTNodeHandle();
8585
}
8686

87-
// Only queue one pointcloud per running thread
87+
// Only queue one point cloud per running thread
8888
if (concurrency_level > 0)
8989
{
9090
input_queue_size_ = concurrency_level;
@@ -94,28 +94,28 @@ void IpaPointCloudToLaserScanNodelet::onInit()
9494
input_queue_size_ = boost::thread::hardware_concurrency();
9595
}
9696

97-
// if pointcloud target frame specified, we need to filter by transform availability
97+
// if point cloud target frame specified, we need to filter by transform availability
9898
if (!target_frame_.empty())
9999
{
100100
tf2_.reset(new tf2_ros::Buffer());
101101
tf2_listener_.reset(new tf2_ros::TransformListener(*tf2_));
102102
}
103103

104+
// set publisher and subscriber callback
104105
pub_ = nh_.advertise<sensor_msgs::LaserScan>("scan", 10);
105-
// set subscriber and callback for input cloud
106106
sub_ = nh_.subscribe("cloud_in", input_queue_size_, &IpaPointCloudToLaserScanNodelet::cloudCb, this );
107107
}
108108

109109
void IpaPointCloudToLaserScanNodelet::configure_filter()
110110
{
111111
NODELET_DEBUG_STREAM("configuring filter");
112-
// Get filter related parameters
113-
114-
private_nh_.param<bool>("use_outlier_filter", use_outlier_filter_, false);
115112

113+
// Get filter related parameters
116114
double max_noise_cluster_distance;
117115
double cluster_break_distance;
118116
int max_noise_cluster_size;
117+
118+
private_nh_.param<bool>("use_outlier_filter", use_outlier_filter_, false);
119119
private_nh_.param<double>("max_noise_cluster_distance", max_noise_cluster_distance, 2.0);
120120
private_nh_.param<double>("cluster_break_distance", cluster_break_distance, 0.3);
121121
private_nh_.param<int>("max_noise_cluster_size", max_noise_cluster_size, 5);
@@ -126,7 +126,7 @@ void IpaPointCloudToLaserScanNodelet::configure_filter()
126126
void IpaPointCloudToLaserScanNodelet::cloudCb(const sensor_msgs::PointCloud2ConstPtr &cloud_msg)
127127
{
128128
ros::Time start_time = ros::Time::now();
129-
NODELET_DEBUG_STREAM("PC with timestamp from init " << cloud_msg->header.stamp.toSec() << " recevied with a delay of " << (start_time - cloud_msg->header.stamp).toSec() << " ");
129+
NODELET_DEBUG_STREAM("point cloud with timestamp from init " << cloud_msg->header.stamp.toSec() << " recevied with a delay of " << (start_time - cloud_msg->header.stamp).toSec() << " ");
130130

131131
// remove leading / on frame id in case present, which is not supported by tf2
132132
// does not do anything if the problem dies not occur -> leave for compatibility
@@ -136,7 +136,7 @@ void IpaPointCloudToLaserScanNodelet::cloudCb(const sensor_msgs::PointCloud2Cons
136136
cloud_frame_id.erase(0,1);
137137
}
138138

139-
// Get frame tranformation
139+
// Get frame transformation
140140
tf2::Transform T;
141141

142142
if ((!target_frame_.empty()) && !(target_frame_ == cloud_frame_id))
@@ -185,11 +185,11 @@ void IpaPointCloudToLaserScanNodelet::cloudCb(const sensor_msgs::PointCloud2Cons
185185
}
186186
else
187187
{
188-
// Assign scan to almost max range since assign to max_range not allowed by assign oparator
188+
// Assign scan to almost max range since assign to max_range not allowed by assign operator
189189
output.ranges.assign(ranges_size, output.range_max - 0.0001);
190190
}
191191

192-
// convert pointcloud to laserscan
192+
// convert point cloud to laserscan
193193
convert_pointcloud_to_laserscan(cloud_msg, output, T, range_min_);
194194

195195
if(use_outlier_filter_)
@@ -199,18 +199,18 @@ void IpaPointCloudToLaserScanNodelet::cloudCb(const sensor_msgs::PointCloud2Cons
199199

200200
ros::Time end_time = ros::Time::now();
201201
ros::Duration dur = end_time-start_time;
202-
NODELET_DEBUG_STREAM("Transform for PC took " << dur.toSec());
202+
NODELET_DEBUG_STREAM("Transform for point cloud took " << dur.toSec());
203203

204204
pub_.publish(output);
205-
NODELET_DEBUG_STREAM("Transform and publisch for scan took " << dur.toSec());
205+
NODELET_DEBUG_STREAM("Transform and publish for scan took " << dur.toSec());
206206
}
207207

208208
/**
209-
* Function to project the pointcloud points within specified region to
209+
* Function to project the point cloud points within specified region to
210210
* the laser scan frame and fill out the laserscan message with the relevant ranges
211211
* from the projection.
212-
* Theborders for the point selection is transformed into pointcloud frame in order
213-
* save time by avoiding unnessecairy point transformations
212+
* The borders for the point selection is transformed into point cloud frame in order
213+
* save time by avoiding unnecessary point transformations
214214
*/
215215
void IpaPointCloudToLaserScanNodelet::convert_pointcloud_to_laserscan(const sensor_msgs::PointCloud2ConstPtr &cloud,
216216
sensor_msgs::LaserScan &output,
@@ -244,15 +244,15 @@ void IpaPointCloudToLaserScanNodelet::convert_pointcloud_to_laserscan(const sens
244244

245245
// Declare help variables
246246
tf2::Vector3 P;
247-
double lambda_x, lambda_y;
248247
tf2::Vector3 P_max;
249248
tf2::Vector3 P_min;
249+
double lambda_x, lambda_y;
250250
double border_distance_sqared;
251251
double range;
252252
double angle;
253253
int index;
254254

255-
// Iterate through pointcloud
255+
// Iterate through point cloud
256256
for (sensor_msgs::PointCloud2ConstIterator<float>
257257
iter_x(*cloud, "x"), iter_y(*cloud, "y"), iter_z(*cloud, "z");
258258
iter_x != iter_x.end();
@@ -264,7 +264,7 @@ void IpaPointCloudToLaserScanNodelet::convert_pointcloud_to_laserscan(const sens
264264
continue;
265265
}
266266

267-
//get reflection point in hight limiting planes in order to check that point lies between borders(above or below is not clearly def):
267+
//get reflection point in height limiting planes in order to check that point lies between borders(above or below is not clearly def):
268268
P.setValue(*iter_x, *iter_y, *iter_z);
269269

270270
/**
@@ -274,7 +274,7 @@ void IpaPointCloudToLaserScanNodelet::convert_pointcloud_to_laserscan(const sens
274274
*
275275
* double lambda_x_max = (P - A_max_o_frame).dot(ex_o_frame);
276276
*
277-
* For now we assume tahat a common set of lambdas hold:
277+
* For now we assume that a common set of lambdas hold:
278278
*/
279279
lambda_x = (P - A_target_o_frame).dot(ex_o_frame);
280280
lambda_y = (P - A_target_o_frame).dot(ey_o_frame);

0 commit comments

Comments
 (0)