simple.py 文件源码

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

项目:marker_navigator 作者: CopterExpress 项目源码 文件源码
def handle(req):
    global msg, pub, task
    print 'get resp class'
    response_class = get_response_class(req)
    print 'resp', response_class
    try:
        task = req
        with task_change_lock:
            pub, msg = get_message_publisher(task)
        print pub, msg
        msg.header.stamp = rospy.get_rostime()
        pub.publish(msg)
        if not offboard_and_arm():
            return response_class(success=False, message='Cannot arm or offboard the vehicle')
        return response_class(success=True)
    except Exception as e:
        return response_class(success=False, message=e.message)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号