def cmdVel_publish(self, cmdVelocity):
# Publish Twist
self.cmdVel_pub.publish(cmdVelocity)
# Publish TwistStamped
self.baseVelocity.twist = cmdVelocity
baseVelocity = TwistStamped()
baseVelocity.twist = cmdVelocity
now = rospy.get_rostime()
baseVelocity.header.stamp.secs = now.secs
baseVelocity.header.stamp.nsecs = now.nsecs
self.cmdVelStamped_pub.publish(baseVelocity)
评论列表
文章目录