MRPT  2.0.1
range.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 /*---------------------------------------------------------------
11  APPLICATION: mrpt_ros bridge
12  FILE: range.h
13  AUTHOR: Raghavender Sahdev <raghavendersahdev@gmail.com>
14  ---------------------------------------------------------------*/
15 
16 #pragma once
17 
19 #include <sensor_msgs/Range.h>
20 
21 /// ROS message : http://docs.ros.org/api/sensor_msgs/html/msg/Range.html
22 /// MRPT message:
23 /// https://github.com/MRPT/mrpt/blob/master/libs/obs/include/mrpt/obs/CObservationRange.h
24 
25 namespace mrpt::ros1bridge
26 {
27 /** \addtogroup mrpt_ros1bridge_grp
28  * @{ */
29 
30 /** Convert sensor_msgs/Range -> mrpt::obs::CObservationRange
31  * \return true on sucessful conversion, false on any error.
32  */
33 bool fromROS(const sensor_msgs::Range& msg, mrpt::obs::CObservationRange& obj);
34 
35 /** Convert mrpt::obs::CObservationRange -> sensor_msgs/Range
36  * The user must supply the "msg_header" field to be copied into the output
37  * message object, since that part does not appear in MRPT classes.
38  *
39  * Since COnservation does not contain "radiation_type",
40  * sensor_msgs::Range::radiation_type will be empty. \return true on sucessful
41  * conversion, false on any error.
42  */
43 bool toROS(
44  const mrpt::obs::CObservationRange& obj, const std_msgs::Header& msg_header,
45  sensor_msgs::Range* msg);
46 
47 /** @} */
48 
49 } // namespace mrpt::ros1bridge
Declares a class derived from "CObservation" that encapsules a single range measurement, and associated parameters.
bool toROS(const mrpt::obs::CObservationGPS &obj, const std_msgs::Header &msg_header, sensor_msgs::NavSatFix &msg)
Convert mrpt::obs::CObservationGPS -> sensor_msgs/NavSatFix The user must supply the "msg_header" fie...
Definition: gps.cpp:48
ROS message: http://docs.ros.org/api/sensor_msgs/html/msg/NavSatFix.html MRPT message: https://github...
Definition: gps.h:28
bool fromROS(const sensor_msgs::NavSatFix &msg, mrpt::obs::CObservationGPS &obj)
Convert sensor_msgs/NavSatFix -> mrpt::obs::CObservationGPS.
Definition: gps.cpp:20



Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020