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))})
评论列表
文章目录