sick_scan_api_converter.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2022, Ing.-Buero Dr. Michael Lehning, Hildesheim
3 * Copyright (C) 2022, SICK AG, Waldkirch
4 * All rights reserved.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 *
19 * All rights reserved.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions are met:
23 *
24 * * Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * * Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * * Neither the name of Osnabrueck University nor the names of its
30 * contributors may be used to endorse or promote products derived from
31 * this software without specific prior written permission.
32 * * Neither the name of SICK AG nor the names of its
33 * contributors may be used to endorse or promote products derived from
34 * this software without specific prior written permission
35 * * Neither the name of Ing.-Buero Dr. Michael Lehning nor the names of its
36 * contributors may be used to endorse or promote products derived from
37 * this software without specific prior written permission
38 *
39 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
40 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
42 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
43 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
44 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
45 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
46 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49 * POSSIBILITY OF SUCH DAMAGE.
50 *
51 * Authors:
52 * Michael Lehning <michael.lehning@lehning.de>
53 *
54 */
55 
56 #ifndef __SICK_SCAN_API_CONVERTER_H_INCLUDED
57 #define __SICK_SCAN_API_CONVERTER_H_INCLUDED
58 
59 #if __ROS_VERSION == 1
60 #include <ros/ros.h>
61 #include <sensor_msgs/LaserScan.h>
63 #include <sensor_msgs/Imu.h>
65 #include <sick_scan_xd/LFErecMsg.h> // LFErecMsg generated by ros msg-generator
66 #include <sick_scan_xd/LIDoutputstateMsg.h> // LIDoutputstateMsg generated by ros msg-generator
67 #include <sick_scan_xd/RadarScan.h> // RadarScan generated by ros msg-generator
68 #include <sick_scan_xd/SickLdmrsObjectArray.h> // SickLdmrsObjectArray generated by ros msg-generator
69 #endif
70 
71 #include "sick_scan_api.h"
72 
74 {
75 public:
76 #if __ROS_VERSION == 1
77  /* Convert a cartesian SickScanPointCloudMsg to sensor_msgs::PointCloud2 (ROS-1 only) */
79 
80  /* Convert a polar SickScanPointCloudMsg to sensor_msgs::PointCloud2 (ROS-1 only) */
81  static sensor_msgs::PointCloud2 convertPolarPointCloudMsg(const SickScanPointCloudMsg& src_msg);
82 
83  /* Convert a SickScanImuMsg to sensor_msgs::Imu (ROS-1 only) */
84  static sensor_msgs::Imu convertImuMsg(const SickScanImuMsg& src_msg);
85 
86  /* Convert a SickScanLFErecMsg to sick_scan_xd::LFErecMsg (ROS-1 only) */
88 
89  /* Convert a SickScanLIDoutputstateMsg to sick_scan_xd::LIDoutputstateMsg (ROS-1 only) */
91 
92  /* Convert a SickScanLIDoutputstateMsg to sick_scan_xd::RadarScan (ROS-1 only) */
94 
95  /* Convert RadarScan objects to sensor_msgs::PointCloud2 (ROS-1 only) */
96  static sensor_msgs::PointCloud2 convertRadarObjectsToPointCloud(const SickScanHeader& header, const sick_scan_xd::RadarObject* radar_objects, int num_objects);
97 
98  /* Convert a SickScanLdmrsObjectArray to sensor_msgs::SickLdmrsObjectArray (ROS-1 only) */
99  static sick_scan_xd::SickLdmrsObjectArray convertLdmrsObjectArray(const SickScanLdmrsObjectArray& src_msg);
100 
101  /* Convert a SickScanVisualizationMarkerMsg to visualization_msgs::MarkerArray (ROS-1 only) */
103 
104 #endif
105 
106 }; // SickScanApiConverter
107 
108 #endif // __SICK_SCAN_API_CONVERTER_H_INCLUDED
sensor_msgs::Imu_
Definition: Imu.h:28
convertPointCloudMsg
static SickScanPointCloudMsg convertPointCloudMsg(const sick_scan_xd::PointCloud2withEcho &msg_with_echo)
Definition: api_impl.cpp:58
SickScanApiConverter
Definition: sick_scan_api_converter.h:73
Imu.h
SickLdmrsObjectArray.h
sick_scan_xd::RadarObject_
Definition: RadarObject.h:29
sick_scan_xd::LIDoutputstateMsg_
Definition: LIDoutputstateMsg.h:24
SickScanRadarScanType
Definition: sick_scan_api.h:292
sick_scan_api.h
sick_scan_xd::SickLdmrsObjectArray_
Definition: SickLdmrsObjectArray.h:25
convertImuMsg
static SickScanImuMsg convertImuMsg(const ros_sensor_msgs::Imu &src_msg)
Definition: api_impl.cpp:118
sick_scan_xd::LFErecMsg_
Definition: LFErecMsg.h:25
LIDoutputstateMsg.h
convertVisualizationMarkerMsg
static SickScanVisualizationMarkerMsg convertVisualizationMarkerMsg(const ros_visualization_msgs::MarkerArray &src_msg)
Definition: api_impl.cpp:418
SickScanPointCloudMsgType
Definition: sick_scan_api.h:137
PointCloud2.h
sick_scan_xd::RadarScan_
Definition: RadarScan.h:27
RadarScan.h
sensor_msgs::PointCloud2_
Definition: PointCloud2.h:25
SickScanLdmrsObjectArrayType
Definition: sick_scan_api.h:309
visualization_msgs::MarkerArray_
Definition: MarkerArray.h:24
convertLIDoutputstateMsg
static SickScanLIDoutputstateMsg convertLIDoutputstateMsg(const sick_scan_msg::LIDoutputstateMsg &src_msg)
Definition: api_impl.cpp:191
LaserScan.h
convertRadarScanMsg
static SickScanRadarScan convertRadarScanMsg(const sick_scan_msg::RadarScan &src_msg)
Definition: api_impl.cpp:225
SickScanLFErecMsgType
Definition: sick_scan_api.h:210
convertLFErecMsg
static SickScanLFErecMsg convertLFErecMsg(const sick_scan_msg::LFErecMsg &src_msg)
Definition: api_impl.cpp:152
SickScanVisualizationMarkerMsgType
Definition: sick_scan_api.h:358
roswrap::message_traits::header
std_msgs::Header * header(M &m)
returns Header<M>::pointer(m);
Definition: message_traits.h:281
SickScanLIDoutputstateMsgType
Definition: sick_scan_api.h:217
SickScanImuMsgType
Definition: sick_scan_api.h:179
LFErecMsg.h
SickScanHeaderType
Definition: sick_scan_api.h:84
MarkerArray.h


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:10