From 39b31e0a6087553988d55cea38bf490fe4c95b33 Mon Sep 17 00:00:00 2001 From: Jonas Frey Date: Sun, 18 Feb 2024 12:14:58 +0100 Subject: [PATCH 1/4] wvn headers --- wild_visual_navigation/__init__.py | 5 +++++ wild_visual_navigation/cfg/__init__.py | 5 +++++ wild_visual_navigation/cfg/experiment_params.py | 5 +++++ wild_visual_navigation/cfg/global_params.py | 5 +++++ wild_visual_navigation/cfg/ros_params.py | 5 +++++ wild_visual_navigation/feature_extractor/__init__.py | 5 +++++ wild_visual_navigation/feature_extractor/dino_interface.py | 5 +++++ .../feature_extractor/dino_trt_interface.py | 5 +++++ .../feature_extractor/feature_extractor.py | 5 +++++ .../feature_extractor/segment_extractor.py | 5 +++++ wild_visual_navigation/feature_extractor/stego_interface.py | 5 +++++ .../feature_extractor/torchvision_interface.py | 5 +++++ wild_visual_navigation/image_projector/__init__.py | 5 +++++ wild_visual_navigation/image_projector/image_projector.py | 5 +++++ wild_visual_navigation/model/__init__.py | 5 +++++ wild_visual_navigation/model/linear_rnvp.py | 5 +++++ wild_visual_navigation/model/network_register.py | 5 +++++ wild_visual_navigation/model/simple_gcn.py | 5 +++++ wild_visual_navigation/model/simple_mlp.py | 5 +++++ wild_visual_navigation/supervision_generator/__init__.py | 5 +++++ .../supervision_generator/supervision_generator.py | 5 +++++ .../supervision_generator/twist_dataset.py | 5 +++++ wild_visual_navigation/traversability_estimator/__init__.py | 5 +++++ wild_visual_navigation/traversability_estimator/graphs.py | 5 +++++ wild_visual_navigation/traversability_estimator/nodes.py | 5 +++++ .../traversability_estimator/traversability_estimator.py | 5 +++++ wild_visual_navigation/utils/__init__.py | 5 +++++ wild_visual_navigation/utils/confidence_generator.py | 5 +++++ wild_visual_navigation/utils/create_experiment_folder.py | 5 +++++ wild_visual_navigation/utils/data.py | 5 +++++ wild_visual_navigation/utils/flatten_dict.py | 5 +++++ wild_visual_navigation/utils/get_confidence.py | 5 +++++ wild_visual_navigation/utils/get_logger.py | 5 +++++ wild_visual_navigation/utils/gpu_monitor.py | 5 +++++ wild_visual_navigation/utils/kalman_filter.py | 5 +++++ wild_visual_navigation/utils/loading.py | 5 +++++ wild_visual_navigation/utils/loss.py | 5 +++++ wild_visual_navigation/utils/meshes.py | 5 +++++ wild_visual_navigation/utils/operation_modes.py | 5 +++++ wild_visual_navigation/utils/testing.py | 5 +++++ wild_visual_navigation/visu/__init__.py | 5 +++++ wild_visual_navigation/visu/image_functionality.py | 5 +++++ wild_visual_navigation/visu/paper_colors.py | 5 +++++ wild_visual_navigation/visu/plotting.py | 5 +++++ wild_visual_navigation/visu/visualizer.py | 5 +++++ 45 files changed, 225 insertions(+) diff --git a/wild_visual_navigation/__init__.py b/wild_visual_navigation/__init__.py index a07f1c50..3cd7a002 100644 --- a/wild_visual_navigation/__init__.py +++ b/wild_visual_navigation/__init__.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import os WVN_ROOT_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) diff --git a/wild_visual_navigation/cfg/__init__.py b/wild_visual_navigation/cfg/__init__.py index ea882567..cbb1c7e1 100644 --- a/wild_visual_navigation/cfg/__init__.py +++ b/wild_visual_navigation/cfg/__init__.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from .global_params import get_global_env_params, GlobalEnvironmentParams from .experiment_params import ExperimentParams from .ros_params import RosLearningNodeParams, RosFeatureExtractorNodeParams diff --git a/wild_visual_navigation/cfg/experiment_params.py b/wild_visual_navigation/cfg/experiment_params.py index 92b58a54..37c63d2d 100644 --- a/wild_visual_navigation/cfg/experiment_params.py +++ b/wild_visual_navigation/cfg/experiment_params.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from dataclasses import dataclass, field from typing import List, Optional from typing import Any diff --git a/wild_visual_navigation/cfg/global_params.py b/wild_visual_navigation/cfg/global_params.py index a6d8fbe1..f88e3240 100644 --- a/wild_visual_navigation/cfg/global_params.py +++ b/wild_visual_navigation/cfg/global_params.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from dataclasses import dataclass diff --git a/wild_visual_navigation/cfg/ros_params.py b/wild_visual_navigation/cfg/ros_params.py index 0e5acc77..e6b42037 100644 --- a/wild_visual_navigation/cfg/ros_params.py +++ b/wild_visual_navigation/cfg/ros_params.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from dataclasses import dataclass from typing import Dict from typing import Any diff --git a/wild_visual_navigation/feature_extractor/__init__.py b/wild_visual_navigation/feature_extractor/__init__.py index c986125c..8b3be17c 100644 --- a/wild_visual_navigation/feature_extractor/__init__.py +++ b/wild_visual_navigation/feature_extractor/__init__.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from .dino_interface import DinoInterface, run_dino_interfacer from .torchvision_interface import TorchVisionInterface diff --git a/wild_visual_navigation/feature_extractor/dino_interface.py b/wild_visual_navigation/feature_extractor/dino_interface.py index 61e94f9a..aa43a0a8 100644 --- a/wild_visual_navigation/feature_extractor/dino_interface.py +++ b/wild_visual_navigation/feature_extractor/dino_interface.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from os.path import join import torch.nn.functional as F import torch diff --git a/wild_visual_navigation/feature_extractor/dino_trt_interface.py b/wild_visual_navigation/feature_extractor/dino_trt_interface.py index 749b0f60..9882335c 100644 --- a/wild_visual_navigation/feature_extractor/dino_trt_interface.py +++ b/wild_visual_navigation/feature_extractor/dino_trt_interface.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation import WVN_ROOT_DIR from os.path import join from omegaconf import DictConfig diff --git a/wild_visual_navigation/feature_extractor/feature_extractor.py b/wild_visual_navigation/feature_extractor/feature_extractor.py index 38ba8267..10065b9b 100644 --- a/wild_visual_navigation/feature_extractor/feature_extractor.py +++ b/wild_visual_navigation/feature_extractor/feature_extractor.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation.feature_extractor import ( StegoInterface, DinoInterface, diff --git a/wild_visual_navigation/feature_extractor/segment_extractor.py b/wild_visual_navigation/feature_extractor/segment_extractor.py index 5726ed2a..afd1716e 100644 --- a/wild_visual_navigation/feature_extractor/segment_extractor.py +++ b/wild_visual_navigation/feature_extractor/segment_extractor.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# # author: Jonas Frey import torch diff --git a/wild_visual_navigation/feature_extractor/stego_interface.py b/wild_visual_navigation/feature_extractor/stego_interface.py index d1a52098..e4f5aaca 100644 --- a/wild_visual_navigation/feature_extractor/stego_interface.py +++ b/wild_visual_navigation/feature_extractor/stego_interface.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from os.path import join import torch.nn.functional as F import torch diff --git a/wild_visual_navigation/feature_extractor/torchvision_interface.py b/wild_visual_navigation/feature_extractor/torchvision_interface.py index 75961623..dc274812 100644 --- a/wild_visual_navigation/feature_extractor/torchvision_interface.py +++ b/wild_visual_navigation/feature_extractor/torchvision_interface.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation import WVN_ROOT_DIR from os.path import join diff --git a/wild_visual_navigation/image_projector/__init__.py b/wild_visual_navigation/image_projector/__init__.py index be10e47c..23c44b27 100644 --- a/wild_visual_navigation/image_projector/__init__.py +++ b/wild_visual_navigation/image_projector/__init__.py @@ -1 +1,6 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from .image_projector import ImageProjector, run_image_projector diff --git a/wild_visual_navigation/image_projector/image_projector.py b/wild_visual_navigation/image_projector/image_projector.py index e077de89..ba585290 100644 --- a/wild_visual_navigation/image_projector/image_projector.py +++ b/wild_visual_navigation/image_projector/image_projector.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from pytictac import Timer from os.path import join import torch diff --git a/wild_visual_navigation/model/__init__.py b/wild_visual_navigation/model/__init__.py index cdceb237..7af1f4a7 100644 --- a/wild_visual_navigation/model/__init__.py +++ b/wild_visual_navigation/model/__init__.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from .simple_mlp import SimpleMLP, DoubleMLP from .simple_gcn import SimpleGCN from .linear_rnvp import LinearRnvp diff --git a/wild_visual_navigation/model/linear_rnvp.py b/wild_visual_navigation/model/linear_rnvp.py index 2d2b3ba4..ac65eda1 100644 --- a/wild_visual_navigation/model/linear_rnvp.py +++ b/wild_visual_navigation/model/linear_rnvp.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import copy import torch from torch import nn, distributions diff --git a/wild_visual_navigation/model/network_register.py b/wild_visual_navigation/model/network_register.py index d6911546..d8c6409a 100644 --- a/wild_visual_navigation/model/network_register.py +++ b/wild_visual_navigation/model/network_register.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation.model import * import inspect import torch diff --git a/wild_visual_navigation/model/simple_gcn.py b/wild_visual_navigation/model/simple_gcn.py index 583ee2ea..e68b6a19 100644 --- a/wild_visual_navigation/model/simple_gcn.py +++ b/wild_visual_navigation/model/simple_gcn.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import torch import torch.nn.functional as F diff --git a/wild_visual_navigation/model/simple_mlp.py b/wild_visual_navigation/model/simple_mlp.py index e913a7e1..cb04a9a2 100644 --- a/wild_visual_navigation/model/simple_mlp.py +++ b/wild_visual_navigation/model/simple_mlp.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import torch from wild_visual_navigation.utils import Data diff --git a/wild_visual_navigation/supervision_generator/__init__.py b/wild_visual_navigation/supervision_generator/__init__.py index 0c2728a4..9e6213e3 100644 --- a/wild_visual_navigation/supervision_generator/__init__.py +++ b/wild_visual_navigation/supervision_generator/__init__.py @@ -1,2 +1,7 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from .twist_dataset import TwistDataset, TwistDataModule from .supervision_generator import SupervisionGenerator, run_supervision_generator diff --git a/wild_visual_navigation/supervision_generator/supervision_generator.py b/wild_visual_navigation/supervision_generator/supervision_generator.py index 026e1d89..560cb9c5 100644 --- a/wild_visual_navigation/supervision_generator/supervision_generator.py +++ b/wild_visual_navigation/supervision_generator/supervision_generator.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation import WVN_ROOT_DIR from wild_visual_navigation.traversability_estimator.graphs import DistanceWindowGraph from wild_visual_navigation.traversability_estimator.nodes import TwistNode diff --git a/wild_visual_navigation/supervision_generator/twist_dataset.py b/wild_visual_navigation/supervision_generator/twist_dataset.py index be34386d..11c9c6b2 100644 --- a/wild_visual_navigation/supervision_generator/twist_dataset.py +++ b/wild_visual_navigation/supervision_generator/twist_dataset.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation import WVN_ROOT_DIR import os import torch diff --git a/wild_visual_navigation/traversability_estimator/__init__.py b/wild_visual_navigation/traversability_estimator/__init__.py index 71d7560f..5210f307 100644 --- a/wild_visual_navigation/traversability_estimator/__init__.py +++ b/wild_visual_navigation/traversability_estimator/__init__.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from .graphs import ( BaseGraph, TemporalWindowGraph, diff --git a/wild_visual_navigation/traversability_estimator/graphs.py b/wild_visual_navigation/traversability_estimator/graphs.py index 7ce5cbb6..690d1dd7 100644 --- a/wild_visual_navigation/traversability_estimator/graphs.py +++ b/wild_visual_navigation/traversability_estimator/graphs.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from .nodes import BaseNode import networkx as nx import random diff --git a/wild_visual_navigation/traversability_estimator/nodes.py b/wild_visual_navigation/traversability_estimator/nodes.py index 7173396a..8daa5f30 100644 --- a/wild_visual_navigation/traversability_estimator/nodes.py +++ b/wild_visual_navigation/traversability_estimator/nodes.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation.image_projector import ImageProjector from wild_visual_navigation.utils import ( make_box, diff --git a/wild_visual_navigation/traversability_estimator/traversability_estimator.py b/wild_visual_navigation/traversability_estimator/traversability_estimator.py index 486166f6..d5434704 100644 --- a/wild_visual_navigation/traversability_estimator/traversability_estimator.py +++ b/wild_visual_navigation/traversability_estimator/traversability_estimator.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation.feature_extractor import FeatureExtractor from wild_visual_navigation.image_projector import ImageProjector from wild_visual_navigation.model import get_model diff --git a/wild_visual_navigation/utils/__init__.py b/wild_visual_navigation/utils/__init__.py index 79d300c3..9c491315 100644 --- a/wild_visual_navigation/utils/__init__.py +++ b/wild_visual_navigation/utils/__init__.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from .data import Data, Batch from .flatten_dict import flatten_dict from .get_logger import get_logger, get_neptune_run diff --git a/wild_visual_navigation/utils/confidence_generator.py b/wild_visual_navigation/utils/confidence_generator.py index c8914182..5ffb70c3 100644 --- a/wild_visual_navigation/utils/confidence_generator.py +++ b/wild_visual_navigation/utils/confidence_generator.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation.utils import KalmanFilter from wild_visual_navigation import WVN_ROOT_DIR import torch diff --git a/wild_visual_navigation/utils/create_experiment_folder.py b/wild_visual_navigation/utils/create_experiment_folder.py index cbb3ac51..67b74c29 100644 --- a/wild_visual_navigation/utils/create_experiment_folder.py +++ b/wild_visual_navigation/utils/create_experiment_folder.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import datetime import os import shutil diff --git a/wild_visual_navigation/utils/data.py b/wild_visual_navigation/utils/data.py index ea8a7f4c..c1a3fb86 100644 --- a/wild_visual_navigation/utils/data.py +++ b/wild_visual_navigation/utils/data.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from typing import Any, List, Optional, Type, Union from typing_extensions import Self import torch diff --git a/wild_visual_navigation/utils/flatten_dict.py b/wild_visual_navigation/utils/flatten_dict.py index 0446b895..970771b3 100644 --- a/wild_visual_navigation/utils/flatten_dict.py +++ b/wild_visual_navigation/utils/flatten_dict.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import collections __all__ = ["flatten_dict"] diff --git a/wild_visual_navigation/utils/get_confidence.py b/wild_visual_navigation/utils/get_confidence.py index 3594aa7c..fa90917a 100644 --- a/wild_visual_navigation/utils/get_confidence.py +++ b/wild_visual_navigation/utils/get_confidence.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import torch.nn.functional as F import torch diff --git a/wild_visual_navigation/utils/get_logger.py b/wild_visual_navigation/utils/get_logger.py index 27ba414e..681dea06 100644 --- a/wild_visual_navigation/utils/get_logger.py +++ b/wild_visual_navigation/utils/get_logger.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from pytorch_lightning.loggers.neptune import NeptuneLogger from pytorch_lightning.loggers import TensorBoardLogger, WandbLogger from wild_visual_navigation.utils import flatten_dict diff --git a/wild_visual_navigation/utils/gpu_monitor.py b/wild_visual_navigation/utils/gpu_monitor.py index 0af8c015..b7788d58 100644 --- a/wild_visual_navigation/utils/gpu_monitor.py +++ b/wild_visual_navigation/utils/gpu_monitor.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import torch import os import pandas as pd diff --git a/wild_visual_navigation/utils/kalman_filter.py b/wild_visual_navigation/utils/kalman_filter.py index e2157cc1..3ba2ed41 100644 --- a/wild_visual_navigation/utils/kalman_filter.py +++ b/wild_visual_navigation/utils/kalman_filter.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import torch import torch.nn as nn diff --git a/wild_visual_navigation/utils/loading.py b/wild_visual_navigation/utils/loading.py index 84ddf529..59c6e03c 100644 --- a/wild_visual_navigation/utils/loading.py +++ b/wild_visual_navigation/utils/loading.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import os import yaml from wild_visual_navigation import WVN_ROOT_DIR diff --git a/wild_visual_navigation/utils/loss.py b/wild_visual_navigation/utils/loss.py index ea2769a5..e1a1218c 100644 --- a/wild_visual_navigation/utils/loss.py +++ b/wild_visual_navigation/utils/loss.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation.utils import ConfidenceGenerator import torch.nn.functional as F diff --git a/wild_visual_navigation/utils/meshes.py b/wild_visual_navigation/utils/meshes.py index 95c4fd9e..91e57d95 100644 --- a/wild_visual_navigation/utils/meshes.py +++ b/wild_visual_navigation/utils/meshes.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import torch from kornia.geometry.linalg import transform_points diff --git a/wild_visual_navigation/utils/operation_modes.py b/wild_visual_navigation/utils/operation_modes.py index 776e4475..a052e22e 100644 --- a/wild_visual_navigation/utils/operation_modes.py +++ b/wild_visual_navigation/utils/operation_modes.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from enum import Enum diff --git a/wild_visual_navigation/utils/testing.py b/wild_visual_navigation/utils/testing.py index b83af273..d87b9e2a 100644 --- a/wild_visual_navigation/utils/testing.py +++ b/wild_visual_navigation/utils/testing.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import os import cv2 import torch diff --git a/wild_visual_navigation/visu/__init__.py b/wild_visual_navigation/visu/__init__.py index be43c69e..b71a666a 100644 --- a/wild_visual_navigation/visu/__init__.py +++ b/wild_visual_navigation/visu/__init__.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from .paper_colors import ( paper_colors_rgb_u8, paper_colors_rgba_u8, diff --git a/wild_visual_navigation/visu/image_functionality.py b/wild_visual_navigation/visu/image_functionality.py index 5f2c0c73..002bdb03 100644 --- a/wild_visual_navigation/visu/image_functionality.py +++ b/wild_visual_navigation/visu/image_functionality.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# # TODO: Jonas doc strings import os import imageio diff --git a/wild_visual_navigation/visu/paper_colors.py b/wild_visual_navigation/visu/paper_colors.py index 44d26463..d83f1566 100644 --- a/wild_visual_navigation/visu/paper_colors.py +++ b/wild_visual_navigation/visu/paper_colors.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# paper_colors_rgb_u8 = { "orange": (251, 151, 39), "mangenta": (150, 36, 145), diff --git a/wild_visual_navigation/visu/plotting.py b/wild_visual_navigation/visu/plotting.py index 7df721a7..67fb4cf6 100644 --- a/wild_visual_navigation/visu/plotting.py +++ b/wild_visual_navigation/visu/plotting.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from matplotlib.backends.backend_agg import FigureCanvasAgg from PIL import Image import numpy as np diff --git a/wild_visual_navigation/visu/visualizer.py b/wild_visual_navigation/visu/visualizer.py index fd188715..1936287e 100644 --- a/wild_visual_navigation/visu/visualizer.py +++ b/wild_visual_navigation/visu/visualizer.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Jonas Frey, Matias Mattamala. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# # TODO: Jonas doc strings, rework visualiation functions import os From 2cd6e056ff5cb342074f5cf18e876be1c8bfe3af Mon Sep 17 00:00:00 2001 From: Jonas Frey Date: Sun, 18 Feb 2024 12:17:40 +0100 Subject: [PATCH 2/4] wvn_ros wvn_anymal header --- .../scripts/anymal_msg_converter_node.py | 5 +++++ .../scripts/anymal_msg_with_latent_converter_node.py | 5 +++++ .../open_source_rosbag_converter/convert_to_public_format.py | 5 +++++ .../scripts/open_source_rosbag_converter/encoding_fixer.py | 5 +++++ .../scripts/policy_debug_info_converter_node.py | 5 +++++ wild_visual_navigation_ros/scripts/overlay_images.py | 5 +++++ wild_visual_navigation_ros/scripts/smart_carrot.py | 5 +++++ .../scripts/wvn_feature_extractor_node.py | 5 +++++ wild_visual_navigation_ros/scripts/wvn_learning_node.py | 5 +++++ wild_visual_navigation_ros/setup.py | 5 +++++ .../src/wild_visual_navigation_ros/__init__.py | 5 +++++ .../src/wild_visual_navigation_ros/ros_converter.py | 5 +++++ .../src/wild_visual_navigation_ros/scheduler.py | 5 +++++ 13 files changed, 65 insertions(+) mode change 100755 => 100644 wild_visual_navigation_anymal/scripts/anymal_msg_converter_node.py mode change 100755 => 100644 wild_visual_navigation_anymal/scripts/anymal_msg_with_latent_converter_node.py mode change 100755 => 100644 wild_visual_navigation_anymal/scripts/open_source_rosbag_converter/convert_to_public_format.py mode change 100755 => 100644 wild_visual_navigation_anymal/scripts/open_source_rosbag_converter/encoding_fixer.py diff --git a/wild_visual_navigation_anymal/scripts/anymal_msg_converter_node.py b/wild_visual_navigation_anymal/scripts/anymal_msg_converter_node.py old mode 100755 new mode 100644 index 578a481b..7a05373d --- a/wild_visual_navigation_anymal/scripts/anymal_msg_converter_node.py +++ b/wild_visual_navigation_anymal/scripts/anymal_msg_converter_node.py @@ -1,4 +1,9 @@ #!/usr/bin/python3 +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation_msgs.msg import CustomState, RobotState from anymal_msgs.msg import AnymalState import rospy diff --git a/wild_visual_navigation_anymal/scripts/anymal_msg_with_latent_converter_node.py b/wild_visual_navigation_anymal/scripts/anymal_msg_with_latent_converter_node.py old mode 100755 new mode 100644 index 3d40005c..9e950eac --- a/wild_visual_navigation_anymal/scripts/anymal_msg_with_latent_converter_node.py +++ b/wild_visual_navigation_anymal/scripts/anymal_msg_with_latent_converter_node.py @@ -1,4 +1,9 @@ #!/usr/bin/python3 +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation_msgs.msg import CustomState, RobotState from anymal_msgs.msg import AnymalState from std_msgs.msg import Float32MultiArray diff --git a/wild_visual_navigation_anymal/scripts/open_source_rosbag_converter/convert_to_public_format.py b/wild_visual_navigation_anymal/scripts/open_source_rosbag_converter/convert_to_public_format.py old mode 100755 new mode 100644 index c53d348c..a24aa053 --- a/wild_visual_navigation_anymal/scripts/open_source_rosbag_converter/convert_to_public_format.py +++ b/wild_visual_navigation_anymal/scripts/open_source_rosbag_converter/convert_to_public_format.py @@ -1,4 +1,9 @@ #!/usr/bin/env python +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import rospy from anymal_msgs.msg import AnymalState diff --git a/wild_visual_navigation_anymal/scripts/open_source_rosbag_converter/encoding_fixer.py b/wild_visual_navigation_anymal/scripts/open_source_rosbag_converter/encoding_fixer.py old mode 100755 new mode 100644 index 4c0f5447..7945b045 --- a/wild_visual_navigation_anymal/scripts/open_source_rosbag_converter/encoding_fixer.py +++ b/wild_visual_navigation_anymal/scripts/open_source_rosbag_converter/encoding_fixer.py @@ -1,4 +1,9 @@ #!/env/bin/python3 +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from __future__ import print_function diff --git a/wild_visual_navigation_anymal/scripts/policy_debug_info_converter_node.py b/wild_visual_navigation_anymal/scripts/policy_debug_info_converter_node.py index 4b2dd9bb..eddfb37b 100644 --- a/wild_visual_navigation_anymal/scripts/policy_debug_info_converter_node.py +++ b/wild_visual_navigation_anymal/scripts/policy_debug_info_converter_node.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import rospy from geometry_msgs.msg import TwistStamped from std_msgs.msg import Float32MultiArray diff --git a/wild_visual_navigation_ros/scripts/overlay_images.py b/wild_visual_navigation_ros/scripts/overlay_images.py index cffb533a..7d0cdd2d 100644 --- a/wild_visual_navigation_ros/scripts/overlay_images.py +++ b/wild_visual_navigation_ros/scripts/overlay_images.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import message_filters import rospy from sensor_msgs.msg import Image # , CameraInfo # , CompressedImage diff --git a/wild_visual_navigation_ros/scripts/smart_carrot.py b/wild_visual_navigation_ros/scripts/smart_carrot.py index 8e0cf7d0..cafb0114 100644 --- a/wild_visual_navigation_ros/scripts/smart_carrot.py +++ b/wild_visual_navigation_ros/scripts/smart_carrot.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from grid_map_msgs.msg import GridMap import rospy import numpy as np diff --git a/wild_visual_navigation_ros/scripts/wvn_feature_extractor_node.py b/wild_visual_navigation_ros/scripts/wvn_feature_extractor_node.py index e7778a24..bf0154f9 100644 --- a/wild_visual_navigation_ros/scripts/wvn_feature_extractor_node.py +++ b/wild_visual_navigation_ros/scripts/wvn_feature_extractor_node.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation import WVN_ROOT_DIR from wild_visual_navigation.feature_extractor import FeatureExtractor from wild_visual_navigation.cfg import ExperimentParams, RosFeatureExtractorNodeParams diff --git a/wild_visual_navigation_ros/scripts/wvn_learning_node.py b/wild_visual_navigation_ros/scripts/wvn_learning_node.py index 6d458496..ee31198e 100644 --- a/wild_visual_navigation_ros/scripts/wvn_learning_node.py +++ b/wild_visual_navigation_ros/scripts/wvn_learning_node.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from wild_visual_navigation import WVN_ROOT_DIR from wild_visual_navigation.image_projector import ImageProjector from wild_visual_navigation.supervision_generator import SupervisionGenerator diff --git a/wild_visual_navigation_ros/setup.py b/wild_visual_navigation_ros/setup.py index f376a2ec..cdfffc9f 100644 --- a/wild_visual_navigation_ros/setup.py +++ b/wild_visual_navigation_ros/setup.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from setuptools import setup from catkin_pkg.python_setup import generate_distutils_setup diff --git a/wild_visual_navigation_ros/src/wild_visual_navigation_ros/__init__.py b/wild_visual_navigation_ros/src/wild_visual_navigation_ros/__init__.py index e84e4753..b8dda2bc 100644 --- a/wild_visual_navigation_ros/src/wild_visual_navigation_ros/__init__.py +++ b/wild_visual_navigation_ros/src/wild_visual_navigation_ros/__init__.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# from .ros_converter import ( robot_state_to_torch, wvn_robot_state_to_torch, diff --git a/wild_visual_navigation_ros/src/wild_visual_navigation_ros/ros_converter.py b/wild_visual_navigation_ros/src/wild_visual_navigation_ros/ros_converter.py index f2b3769b..93ce778c 100644 --- a/wild_visual_navigation_ros/src/wild_visual_navigation_ros/ros_converter.py +++ b/wild_visual_navigation_ros/src/wild_visual_navigation_ros/ros_converter.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# import cv2 from geometry_msgs.msg import Pose from nav_msgs.msg import Odometry diff --git a/wild_visual_navigation_ros/src/wild_visual_navigation_ros/scheduler.py b/wild_visual_navigation_ros/src/wild_visual_navigation_ros/scheduler.py index 3026a811..8183cfc6 100644 --- a/wild_visual_navigation_ros/src/wild_visual_navigation_ros/scheduler.py +++ b/wild_visual_navigation_ros/src/wild_visual_navigation_ros/scheduler.py @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# class Scheduler: """ Implements a modified weighted round-robin scheduler From 14b3d67755dee0ee3544de7eb78d4f3a56af827c Mon Sep 17 00:00:00 2001 From: Jonas Frey Date: Sun, 18 Feb 2024 12:22:40 +0100 Subject: [PATCH 3/4] cmake copy right --- wild_visual_navigation_anymal/CMakeLists.txt | 5 +++++ wild_visual_navigation_ros/CMakeLists.txt | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/wild_visual_navigation_anymal/CMakeLists.txt b/wild_visual_navigation_anymal/CMakeLists.txt index 72f1a53e..c0be04f0 100644 --- a/wild_visual_navigation_anymal/CMakeLists.txt +++ b/wild_visual_navigation_anymal/CMakeLists.txt @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# cmake_minimum_required(VERSION 3.0.2) project(wild_visual_navigation_anymal) set (CMAKE_CXX_STANDARD 14) diff --git a/wild_visual_navigation_ros/CMakeLists.txt b/wild_visual_navigation_ros/CMakeLists.txt index 908adcda..8953d5e1 100644 --- a/wild_visual_navigation_ros/CMakeLists.txt +++ b/wild_visual_navigation_ros/CMakeLists.txt @@ -1,3 +1,8 @@ +# +# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey. +# All rights reserved. Licensed under the MIT license. +# See LICENSE file in the project root for details. +# cmake_minimum_required(VERSION 3.0.2) project(wild_visual_navigation_ros) From 403d0538d6e19f56e0af9abd55597bb0f51f3dad Mon Sep 17 00:00:00 2001 From: Jonas Frey Date: Sun, 18 Feb 2024 12:35:19 +0100 Subject: [PATCH 4/4] readme and license --- LICENSE | 21 +++++++++++++++++++++ README.md | 15 +++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..288c58ea --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022-2024 ETH Zurich, Matias Mattamala, Jonas Frey. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index d2fff42a..6f10558d 100644 --- a/README.md +++ b/README.md @@ -190,3 +190,18 @@ Introduction to [pytest](https://github.com/pluralsight/intro-to-pytest). ```shell pytest ``` + + +### Open-Sourcing +Generating headers +```shell +pip3 install adheader + +# If your are using zsh otherwise remove \ +addheader wild_visual_navigation -t header.txt -p \*.py --sep-len 79 --comment='#' --sep=' ' +addheader wild_visual_navigation_ros -t header.txt -p \*.py -sep-len 79 --comment='#' --sep=' ' +addheader wild_visual_navigation_anymal -t header.txt -p \*.py --sep-len 79 --comment='#' --sep=' ' + +addheader wild_visual_navigation_ros -t header.txt -p \*CMakeLists.txt --sep-len 79 --comment='#' --sep=' ' +addheader wild_visual_navigation_anymal -t header.txt -p \*.py -p \*CMakeLists.txt --sep-len 79 --comment='#' --sep=' ' +``` \ No newline at end of file