Error transformPose() takes exactly 3 arguments (4 given)
Hi,
I am using transformPose with 3 arguments as in the manual, but it seems that python adds "self" implicitly as first argument so I gut the error that transformPose takes exactly 3 argument (4 given). How can I get around this problem?
global mapPose
tf_l = tf.TransformListener(rospy.Duration(10))
new_pt = PoseStamped()
tf_l.waitForTransform(data.header.frame_id, mapPose.header.frame_id, rospy.Time(0), rospy.Duration(0))
tf_l.transformPose(data.header.frame_id,mapPose, new_pt)
Can you link to the "manual" you are mentioning? The signature of
transformPose
is actually just with 3 arguments (self
included)...So I guess this is an error in the manual, not the library...
Hi,
sure, the manual is http://docs.ros.org/kinetic/api/tf/ht... . As you said, the signature just has 3 arguments, which I am passing. I just don't understand why I get this error message, why does ROS think I am passing 4 arguments?
Well, this is the C++ API, not the python one (I linked the python version above). Obviously, one could argue that they should be the same, but they are not ;-)
So you need to use the python API, which is, in the end, simply: