Main Page
Related Pages
Namespaces
Namespace List
Classes
Class List
Class Hierarchy
Class Members
All
a
b
c
d
f
g
h
i
l
m
n
o
p
r
s
t
~
Functions
a
b
c
g
l
m
o
p
r
s
t
~
Variables
a
b
c
d
f
g
h
i
l
m
n
o
p
r
s
t
Files
File List
File Members
All
Functions
Variables
src
point_cloud_assembler_srv.cpp
Go to the documentation of this file.
1
/*********************************************************************
2
* Software License Agreement (BSD License)
3
*
4
* Copyright (c) 2008, Willow Garage, Inc.
5
* All rights reserved.
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions
9
* are met:
10
*
11
* * Redistributions of source code must retain the above copyright
12
* notice, this list of conditions and the following disclaimer.
13
* * Redistributions in binary form must reproduce the above
14
* copyright notice, this list of conditions and the following
15
* disclaimer in the documentation and/or other materials provided
16
* with the distribution.
17
* * Neither the name of the Willow Garage nor the names of its
18
* contributors may be used to endorse or promote products derived
19
* from this software without specific prior written permission.
20
*
21
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
* POSSIBILITY OF SUCH DAMAGE.
33
*********************************************************************/
34
35
36
#include "
laser_assembler/base_assembler_srv.h
"
37
38
39
using namespace
std
;
40
41
namespace
laser_assembler
42
{
43
50
class
PointCloudAssemblerSrv
:
public
BaseAssemblerSrv
<sensor_msgs::PointCloud>
51
{
52
public
:
53
PointCloudAssemblerSrv
()
54
{
55
56
}
57
58
~PointCloudAssemblerSrv
()
59
{
60
61
}
62
63
unsigned
int
GetPointsInScan
(
const
sensor_msgs::PointCloud& scan)
64
{
65
return
scan.points.size() ;
66
}
67
68
void
ConvertToCloud
(
const
string
& fixed_frame_id,
const
sensor_msgs::PointCloud& scan_in, sensor_msgs::PointCloud& cloud_out)
69
{
70
tf_->transformPointCloud(fixed_frame_id, scan_in, cloud_out) ;
71
return ;
72
}
73
74
private
:
75
76
};
77
78
}
79
80
using namespace
laser_assembler
;
81
82
int
main
(
int
argc,
char
**argv)
83
{
84
ros::init
(argc, argv,
"point_cloud_assembler"
);
85
ros::NodeHandle
n;
86
ROS_WARN
(
"The point_cloud_assembler_srv is deprecated. Please switch to "
87
"using the laser_scan_assembler. Documentation is available at "
88
"http://www.ros.org/wiki/laser_assembler"
);
89
PointCloudAssemblerSrv
pc_assembler;
90
pc_assembler.
start
() ;
91
ros::spin
();
92
93
return
0;
94
}
laser_assembler::PointCloudAssemblerSrv::~PointCloudAssemblerSrv
~PointCloudAssemblerSrv()
Definition:
point_cloud_assembler_srv.cpp:58
ros::init
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
laser_assembler::PointCloudAssemblerSrv::PointCloudAssemblerSrv
PointCloudAssemblerSrv()
Definition:
point_cloud_assembler_srv.cpp:53
laser_assembler::PointCloudAssemblerSrv::ConvertToCloud
void ConvertToCloud(const string &fixed_frame_id, const sensor_msgs::PointCloud &scan_in, sensor_msgs::PointCloud &cloud_out)
Definition:
point_cloud_assembler_srv.cpp:68
laser_assembler::PointCloudAssemblerSrv::GetPointsInScan
unsigned int GetPointsInScan(const sensor_msgs::PointCloud &scan)
Returns the number of points in the current scan.
Definition:
point_cloud_assembler_srv.cpp:63
laser_assembler::BaseAssemblerSrv::start
void start()
Tells the assembler to start listening to input data It is possible that a derived class needs to ini...
Definition:
base_assembler_srv.h:236
ROS_WARN
#define ROS_WARN(...)
laser_assembler::PointCloudAssemblerSrv
Maintains a history of incremental point clouds (usually from laser scans) and generates a point clou...
Definition:
point_cloud_assembler_srv.cpp:50
laser_assembler
Definition:
periodic_snapshotter.cpp:50
std
laser_assembler::BaseAssemblerSrv
Maintains a history of point clouds and generates an aggregate point cloud upon request.
Definition:
base_assembler_srv.h:104
main
int main(int argc, char **argv)
Definition:
point_cloud_assembler_srv.cpp:82
ros::spin
ROSCPP_DECL void spin()
ros::NodeHandle
base_assembler_srv.h
laser_assembler
Author(s): Vijay Pradeep
autogenerated on Sat Aug 10 2024 02:10:39