api.py 文件源码

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

项目:openag_brain 作者: OpenAgInitiative 项目源码 文件源码
def get_param(param_name):
    """
    GET /api/<version>/param/<param_name>

    GET the value for a specific parameter at param_name in the ROS
    Parameter Server.

    Parameter value is in the "result" field of the JSON response body. If
    parameter does not exist, a JSON document with ERROR field will
    be returned.
    """
    if not rospy.has_param(param_name):
        return error("No such parameter exists")
    return jsonify({"result": str(rospy.get_param(param_name))})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号