コード例 #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)
コード例 #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)
コード例 #3
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
コード例 #4
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
コード例 #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
コード例 #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)
コード例 #7
0
ファイル: test.py プロジェクト: mylxiaoyi/ros_distro
 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)
コード例 #8
0
ファイル: test.py プロジェクト: jdlangs/geometry2
 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)