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)
choose_topic_image_reply.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录