remove function

This commit is contained in:
duongtd 2025-12-05 11:28:20 +07:00
parent 59c8d4fd69
commit 7416a97789

View File

@ -10,32 +10,32 @@
#include <robot/time.h>
#include <cmath>
template <typename T>
bool isEqual(const T& a, const T& b, double eps = 1e-5)
{
return std::fabs(a - b) < eps;
}
// template <typename T>
// bool isEqual(const T& a, const T& b, double eps = 1e-5)
// {
// return std::fabs(a - b) < eps;
// }
inline bool operator==(const geometry_msgs::Quaternion& a, const geometry_msgs::Quaternion& b)
{
return isEqual(a.x, b.x) && isEqual(a.y, b.y) && isEqual(a.z, b.z) && isEqual(a.w, b.w);
}
// inline bool operator==(const geometry_msgs::Quaternion& a, const geometry_msgs::Quaternion& b)
// {
// return isEqual(a.x, b.x) && isEqual(a.y, b.y) && isEqual(a.z, b.z) && isEqual(a.w, b.w);
// }
inline bool operator==(const geometry_msgs::Point& a, const geometry_msgs::Point& b)
{
return isEqual(a.x, b.x) && isEqual(a.y, b.y) && isEqual(a.z, b.z);
}
// inline bool operator==(const geometry_msgs::Point& a, const geometry_msgs::Point& b)
// {
// return isEqual(a.x, b.x) && isEqual(a.y, b.y) && isEqual(a.z, b.z);
// }
inline bool operator==(const geometry_msgs::Pose& a, const geometry_msgs::Pose& b)
{
return (a.position == b.position) && (a.orientation == b.orientation);
}
// inline bool operator==(const geometry_msgs::Pose& a, const geometry_msgs::Pose& b)
// {
// return (a.position == b.position) && (a.orientation == b.orientation);
// }
inline bool operator==(const geometry_msgs::PoseStamped& a, const geometry_msgs::PoseStamped& b)
{
return (a.header.frame_id == b.header.frame_id) &&
(a.pose == b.pose);
}
// inline bool operator==(const geometry_msgs::PoseStamped& a, const geometry_msgs::PoseStamped& b)
// {
// return (a.header.frame_id == b.header.frame_id) &&
// (a.pose == b.pose);
// }
namespace data_convert
{