wheel_speed.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:plantbot 作者: marooncn 项目源码 文件源码
def speed_converter():
  rospy.init_node('wheel_speed', anonymous=True)
  pub1 = rospy.Publisher('lwheel_vtarget', Float32, queue_size=10)
  pub2 = rospy.Publisher('rwheel_vtarget', Float32, queue_size=10)
  rate = rospy.Rate(10)
  while not rospy.is_shutdown():
    rospy.Subscriber('cmd_vel', Twist, callback)
    s1 = "The left wheel's target speed is %f m/s." % lv
    s2 = "The right wheel's target speed is %f m/s." % rv
    rospy.loginfo(s1)
    rospy.loginfo(s2)
    pub1.publish(lv)
    pub2.publish(rv) 
    rate.sleep()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号