Exemplo n.º 1
0
	def get_odom(self):
		#Get the current transform between the odom and base frames
		try:
			(trans, rot)  = self.tf_listener.lookupTransform(self.map_frame, self.base_frame, rospy.Time(0))
		except (tf.Exception, tf.ConnectivityException, tf.LookupException):
			rospy.loginfo("TF Exception")
			return

		return (Point(*trans), quat_to_angle(Quaternion(*rot)))
Exemplo n.º 2
0
    def get_odom_angle(self):
        # Get the current transform between the odom and base frames
        try:
            (trans,
             rot) = self.tf_listener.lookupTransform(self.odom_frame,
                                                     self.base_frame,
                                                     rospy.Time(0))
        except (tf.Exception, tf.ConnectivityException, tf.LookupException):
            rospy.loginfo("TF Exception")
            return

        # Convert the rotation from a quaternion to an Euler angle
        return quat_to_angle(Quaternion(*rot))