MRPT  2.0.1
gps.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: GPS.h
13  AUTHOR: Raghavender Sahdev <raghavendersahdev@gmail.com>
14  ---------------------------------------------------------------*/
15 
16 #pragma once
17 
19 #include <sensor_msgs/NavSatFix.h>
20 
21 /// ROS message: http://docs.ros.org/api/sensor_msgs/html/msg/NavSatFix.html
22 /// MRPT message:
23 /// https://github.com/MRPT/mrpt/blob/master/libs/obs/include/mrpt/obs/CObservationGPS.h
24 
25 /** Conversion functions between ROS 1 <-> MRPT types.
26  * \ingroup mrpt_ros1bridge_grp
27  */
29 {
30 /** \addtogroup mrpt_ros1bridge_grp
31  * @{ */
32 
33 /** Convert sensor_msgs/NavSatFix -> mrpt::obs::CObservationGPS
34  * \return true on sucessful conversion, false on any error.
35  */
36 bool fromROS(
37  const sensor_msgs::NavSatFix& msg, mrpt::obs::CObservationGPS& obj);
38 
39 /** Convert mrpt::obs::CObservationGPS -> sensor_msgs/NavSatFix
40  * The user must supply the "msg_header" field to be copied into the output
41  * message object, since that part does not appear in MRPT classes.
42  *
43  * Since COnservationGPS does not contain "position_covariance" and
44  * "position_covariance_type" sensor_msgs::NavSatFix::position_covariance_type
45  * and sensor_msgs::NavSatFix::position_covariance will be empty. \return true
46  * on sucessful conversion, false on any error.
47  */
48 bool toROS(
49  const mrpt::obs::CObservationGPS& obj, const std_msgs::Header& msg_header,
50  sensor_msgs::NavSatFix& msg);
51 
52 /** @} */
53 
54 } // namespace mrpt::ros1bridge
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
This class stores messages from GNSS or GNSS+IMU devices, from consumer-grade inexpensive GPS receive...



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