choose_topic_image_reply.py 文件源码

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

项目:telegram_robot 作者: uts-magic-lab 项目源码 文件源码
def do_image_stuff(self, update):
        # Get topics of type Image
        topics_and_types = rospy.get_published_topics()
        image_topics = []
        for top, typ in topics_and_types:
            if typ == 'sensor_msgs/Image':
                image_topics.append(top)

        keyboard = []
        for topicname in image_topics:
            keyboard.append([InlineKeyboardButton(
                topicname, callback_data=topicname)])

        reply_markup = InlineKeyboardMarkup(keyboard)

        update.message.reply_text('Choose image topic:',
                                  reply_markup=reply_markup)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号