def ros_service_response_cmd(service, result, _id=None, values=None):
    """
    create a rosbridge service_response command object

    a response to a ROS service call

    :param service: name of the service that was called
    :param result: boolean return value of service callback. True means success, False failure.
    :param _id: if an ID was provided to the call_service request, then the service response will contain the ID
    :param values: dict of the return values. If the service had no return values, then this field
                   can be omitted (and will be by the rosbridge server)
    """
    command = {
        "op": "service_response",
        "service": service,
        "result": result
    }

    if _id:
        command["id"] = _id

    if values:
        command["values"] = values

    return command