Beispiel #1
0
    def test_convert(self):
        p = tf2_ros.Stamped(PyKDL.Vector(1, 2, 3),
                            builtin_interfaces.msg.Time(sec=0), 'my_frame')
        msg = tf2_ros.convert(p, PointStamped)
        p2 = tf2_ros.convert(msg, PyKDL.Vector)

        self.assertEqual(p2[0], p[0])
        self.assertEqual(p2[1], p[1])
        self.assertEqual(p2[2], p[2])
        self.assertEqual(p2.header, p.header)
Beispiel #2
0
 def test_convert(self):
     p = tf2_ros.Stamped(PyKDL.Vector(1, 2, 3), rospy.Time(), 'my_frame')
     print(p)
     msg = tf2_ros.convert(p, PointStamped)
     print(msg)
     p2 = tf2_ros.convert(msg, PyKDL.Vector)
     print(p2)
     p2[0] = 100
     print(p)
     print(p2)
     print(p2.header)
 def test_convert(self):
     p = tf2_ros.Stamped(PyKDL.Vector(1, 2, 3), rospy.Time(), 'my_frame')
     print p
     msg = tf2_ros.convert(p, PointStamped) 
     print msg
     p2 = tf2_ros.convert(msg, PyKDL.Vector)
     print p2
     p2[0] = 100
     print p
     print p2
     print p2.header
def convert():
    v = PyKDL.Vector(1,2,3)
    vs = tf2_ros.Stamped(v, rospy.Time(2), 'a')
    vs2 = tf2_ros.convert(vs, PyKDL.Vector)
    vs2[1] = 100
    print vs2
    print v
Beispiel #5
0
def convert():
    v = PyKDL.Vector(1, 2, 3)
    vs = tf2_ros.Stamped(v, rospy.Time(2), 'a')
    vs2 = tf2_ros.convert(vs, PyKDL.Vector)
    vs2[1] = 100
    print vs2
    print v
Beispiel #6
0
 def test_convert(self):
     v = PyKDL.Vector(1, 2, 3)
     vs = tf2_ros.Stamped(v, rospy.Time(2), 'a')
     vs2 = tf2_ros.convert(vs, PyKDL.Vector)
     self.assertEqual(vs.x(), 1)
     self.assertEqual(vs.y(), 2)
     self.assertEqual(vs.z(), 3)
     self.assertEqual(vs2.x(), 1)
     self.assertEqual(vs2.y(), 2)
     self.assertEqual(vs2.z(), 3)
Beispiel #7
0
 def test_convert(self):
     v = PyKDL.Vector(1,2,3)
     vs = tf2_ros.Stamped(v, rospy.Time(2), 'a')
     vs2 = tf2_ros.convert(vs, PyKDL.Vector)
     self.assertEqual(vs.x(), 1)
     self.assertEqual(vs.y(), 2)
     self.assertEqual(vs.z(), 3)
     self.assertEqual(vs2.x(), 1)
     self.assertEqual(vs2.y(), 2)
     self.assertEqual(vs2.z(), 3)
Beispiel #8
0
 def test_convert(self):
     v = PyKDL.Vector(1,2,3)
     vs = tf2_ros.Stamped(v, builtin_interfaces.msg.Time(sec=2), 'a')
     vs2 = tf2_ros.convert(vs, PyKDL.Vector)
     self.assertEqual(vs.x(), 1)
     self.assertEqual(vs.y(), 2)
     self.assertEqual(vs.z(), 3)
     self.assertEqual(vs2.x(), 1)
     self.assertEqual(vs2.y(), 2)
     self.assertEqual(vs2.z(), 3)