#include <utils.h>
class Utils implements utility functions for SIM Localization.
Definition at line 118 of file utils.h.
◆ flattenString()
void sick_scan::Utils::flattenString |
( |
std::string & |
s | ) |
|
|
static |
Shortcut to replace linefeeds by colon-separators
Definition at line 106 of file utils.cpp.
◆ flattenToString() [1/4]
static std::string sick_scan::Utils::flattenToString |
( |
const sick_scan::SickLocColaTelegramMsg & |
cola_telegram | ) |
|
|
inlinestatic |
Shortcut to print a SickLocColaTelegramMsg in flatten format, replacing linefeeds by colon-separators
Definition at line 164 of file utils.h.
◆ flattenToString() [2/4]
static std::string sick_scan::Utils::flattenToString |
( |
const sick_scan::SickLocResultPortTelegramMsg & |
telegram | ) |
|
|
inlinestatic |
Shortcut to print a SickLocColaTelegramMsg in flatten format, replacing linefeeds by colon-separators
Definition at line 181 of file utils.h.
◆ flattenToString() [3/4]
static std::string sick_scan::Utils::flattenToString |
( |
const std_msgs::Header * |
header | ) |
|
|
inlinestatic |
Shortcut to print (msg_header.stamp.sec,msg_header.stamp.nsec) on ROS1 resp. (msg_header.stamp.sec,msg_header.stamp.nanosec) on ROS2
Definition at line 154 of file utils.h.
◆ flattenToString() [4/4]
template<typename T >
static std::string sick_scan::Utils::flattenToString |
( |
const T & |
x | ) |
|
|
inlinestatic |
Shortcut to print a type in flatten format, replacing linefeeds by colon-separators
Definition at line 144 of file utils.h.
◆ identicalByStream() [1/4]
static bool sick_scan::Utils::identicalByStream |
( |
const SickLocColaTelegramMsg & |
x, |
|
|
const SickLocColaTelegramMsg & |
y |
|
) |
| |
|
inlinestatic |
Compares two SickLocColaTelegramMsg by streaming them to strings. Returns true, if string representation of x and y is identical, otherwise false. The message headers with timestamp and frame_id are ignored.
Definition at line 250 of file utils.h.
◆ identicalByStream() [2/4]
static bool sick_scan::Utils::identicalByStream |
( |
const SickLocResultPortTelegramMsg & |
x, |
|
|
const SickLocResultPortTelegramMsg & |
y |
|
) |
| |
|
inlinestatic |
Compares two SickLocResultPortTelegramMsgs by streaming them to strings. Returns true, if string representation of x and y is identical, otherwise false. The message headers with timestamp and frame_id are ignored.
Definition at line 231 of file utils.h.
◆ identicalByStream() [3/4]
template<typename T >
static bool sick_scan::Utils::identicalByStream |
( |
const std::vector< T > & |
x, |
|
|
const std::vector< T > & |
y |
|
) |
| |
|
inlinestatic |
Compares two vectors by streaming them to strings. Returns true, if string representation of x and y is identical, otherwise false.
Definition at line 214 of file utils.h.
◆ identicalByStream() [4/4]
template<typename T >
static bool sick_scan::Utils::identicalByStream |
( |
const T & |
x, |
|
|
const T & |
y |
|
) |
| |
|
inlinestatic |
Compares two objects by streaming them to strings. Returns true, if string representation of x and y is identical, otherwise false.
Definition at line 201 of file utils.h.
◆ normalizeAngle()
static double sick_scan::Utils::normalizeAngle |
( |
double |
angle | ) |
|
|
inlinestatic |
Returns the normalized angle, i.e. the angle in the range -PI to +PI.
- Parameters
-
[in] | angle | angle in radians |
- Returns
- normalized angle in radians
Definition at line 260 of file utils.h.
◆ toAsciiString()
std::string sick_scan::Utils::toAsciiString |
( |
const uint8_t * |
binary_data, |
|
|
int |
length |
|
) |
| |
|
static |
Converts and returns binary data to ascii string with non-ascii data represented as "\x<hexvalue>"
- Parameters
-
[in] | binary_data | binary input data |
- Returns
- hex string
Definition at line 82 of file utils.cpp.
◆ toHexString()
std::string sick_scan::Utils::toHexString |
( |
const std::vector< uint8_t > & |
binary_data | ) |
|
|
static |
Converts and returns binary data to hex string
- Parameters
-
[in] | binary_data | binary input data |
- Returns
- hex string
Definition at line 69 of file utils.cpp.
The documentation for this class was generated from the following files: