def goalCB(self, poseStamped):
# reset timestamp because of bug: https://github.com/ros/geometry/issues/82
poseStamped.header.stamp = rospy.Time(0)
try:
robotToTarget1 = self.listener.transformPose("/base_footprint", poseStamped)
except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException) as e:
rospy.logerr("Error while transforming pose: %s", str(e))
return
quat = robotToTarget1.pose.orientation
(roll,pitch,yaw) = euler_from_quaternion((quat.x, quat.y, quat.z, quat.w))
self.motionProxy.moveTo(robotToTarget1.pose.position.x, robotToTarget1.pose.position.y, yaw)
评论列表
文章目录