demo_joy.py 文件源码

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

项目:PyByrobotPetrone 作者: ildoonet 项目源码 文件源码
def __init__(self, joy_topic):
        rospy.loginfo("waiting for petrone")
        rospy.wait_for_message('battery', Float32)
        rospy.loginfo("found petrone")

        # fly control publisher
        self.pub_fly = rospy.Publisher('cmd_fly', Int8, queue_size=1)
        self.pub_led = rospy.Publisher('led_color', String, queue_size=1)

        # subscribe to the joystick at the end to make sure that all required
        # services were found
        self._buttons = None
        rospy.Subscriber(joy_topic, Joy, self.cb_joy)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号