This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// qe.c | |
// hidtest | |
// | |
// Created by Albin Stigö on 09/09/2017. | |
// Copyright © 2017 Albin Stigo. All rights reserved. | |
// | |
// License BSD | |
// https://opensource.org/licenses/BSD-2-Clause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from geometry_msgs.msg import Pose | |
def are_poses_equal(p1, p2): | |
pos1 = p1.position | |
pos2 = p2.position | |
if isclose(pos1.x, pos2.x) and isclose(pos1.y, pos2.y) and isclose(pos1.z, pos2.z): | |
o1 = p1.orientation | |
o2 = p2.orientation | |
r1, p1, y1 = euler_from_quaternion([o1.x, o1.y, o1.z, o1.w]) | |
r2, p2, y2 = euler_from_quaternion([o2.x, o2.y, o2.z, o2.w]) |