From 1dabc13ab8df59870ca2b4d8751706c493babcda Mon Sep 17 00:00:00 2001 From: JulianTrommer Date: Tue, 8 Oct 2024 14:46:33 +0200 Subject: [PATCH] Removed b5 from project --- README.md | 16 +-- build/Taskfile | 76 ------------ build/config.yml | 4 - build/hooks/pre-commit.d/10-flake8.sh | 12 -- build/hooks/pre-commit.d/20-markdown.sh | 12 -- build/tasks/ros.sh | 114 ------------------ doc/01_general/02_installation.md | 46 +------ doc/01_general/03_commands.md | 102 ---------------- doc/01_general/Readme.md | 3 +- doc/02_development/02_linting.md | 2 - .../10_installing_python_packages.md | 12 -- .../14_distributed_simulation.md | 4 +- doc/02_development/installing_cuda.md | 6 - doc/06_perception/01_dataset_generator.md | 8 +- .../07_position_heading_filter_debug_node.md | 2 +- doc/07_planning/01_py_trees.md | 7 +- 16 files changed, 14 insertions(+), 412 deletions(-) delete mode 100644 build/Taskfile delete mode 100644 build/config.yml delete mode 100644 build/hooks/pre-commit.d/10-flake8.sh delete mode 100644 build/hooks/pre-commit.d/20-markdown.sh delete mode 100644 build/tasks/ros.sh delete mode 100644 doc/01_general/03_commands.md diff --git a/README.md b/README.md index b4495249..48c48f93 100644 --- a/README.md +++ b/README.md @@ -23,26 +23,12 @@ As the project is still in early development, these requirements are subject to ## Installation -To run the project you have to install [b5](https://github.com/team23/b5) -and [docker](https://docs.docker.com/engine/install/) with NVIDIA GPU support, +To run the project you have to install [docker](https://docs.docker.com/engine/install/) with NVIDIA GPU support, [nvidia-docker](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker). -`b5` is used to simplify some of the docker commands and to provide a more user-friendly interface. `docker` and `nvidia-docker` are used to run the project in a containerized environment with GPU support. -Afterwards, you can set up and execute the project with the following two commands: - -```bash -# Setup project -b5 install - -# Run project -b5 run -``` - More detailed instructions about setup and execution can be found [here](./doc/01_general/Readme.md). -More available b5 commands are documented [here](./doc/01_general/03_commands.md). - ## Development If you contribute to this project please read the guidelines first. They can be found [here](./doc/02_development/Readme.md). diff --git a/build/Taskfile b/build/Taskfile deleted file mode 100644 index c89e1133..00000000 --- a/build/Taskfile +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash -# b5 Taskfile, see https://git.team23.de/build/b5 for details - -########################################## -# General commands -########################################## - -task:shell() { - container="$1" - command="$2" - additionalArguments="${@:3}" - docker:container_run "${container:-agent}" "${command:-/bin/bash}" ${additionalArguments:-} -} - -########################################## -# Project setup / maintenance -########################################## -task:install() { - task:install:git_hooks - #task:gitconfig:copy - install:gpu-support - docker:install -} - -install:gpu-support() { - # check if docker-nvidia is installed, to make the project also executable on - # systems without nvidia GPU. - - if [ -z "$(command -v docker-nvidia)" ] - then - echo -e "Juhu! Alles ist richtig installiert für NVIDIA-Support! Hier ein Keks für dich :D" - else - RED='\033[0;31m' - NC='\033[0m' - echo -e "${RED}######################################################################################${NC}" - echo -e "${RED}WARNING: NVIDIA Container Toolkit not installed. The project won't run as expected!${NC}" - echo -e "${RED}#####################################################################################${NC}" - fi -} - -########################################## -# Project linting -########################################## - -task:lint() { - b5 python:lint - b5 markdown:lint -} - -task:python:lint() { - docker:container_run -T flake8 code -} - -task:markdown:lint() { - docker:container_run -T mdlint markdownlint . -} - -task:markdown:fix() { - docker:container_run -T mdlint markdownlint --fix . -} - -task:comlipy() { - docker:container_run -T comlipy -c /apps/build/config-comlipy.yml "$@" -} - -task:install:git_hooks() { - test -L ../.git/hooks/pre-commit || ln -s ../../build/hooks/pre-commit ../.git/hooks/ - test -L ../.git/hooks/commit-msg || ln -s ../../build/hooks/commit-msg ../.git/hooks/ - chmod +x ./hooks/* -} - -task:gitconfig:copy() { - cp -u ~/.gitconfig ../.gitconfig -} - -source ./tasks/ros.sh diff --git a/build/config.yml b/build/config.yml deleted file mode 100644 index 648c6c08..00000000 --- a/build/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -# b5 config file -modules: - template: - docker: diff --git a/build/hooks/pre-commit.d/10-flake8.sh b/build/hooks/pre-commit.d/10-flake8.sh deleted file mode 100644 index 237a5180..00000000 --- a/build/hooks/pre-commit.d/10-flake8.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -python_changed=0 -FILE_PATTERN=\.py$ - -git diff --cached --name-only | grep -q $FILE_PATTERN && python_changed=1 - -if [ $python_changed = 1 ]; then - b5 python:lint -else - echo "No python files in commit, skip python linting" -fi \ No newline at end of file diff --git a/build/hooks/pre-commit.d/20-markdown.sh b/build/hooks/pre-commit.d/20-markdown.sh deleted file mode 100644 index 13a93af0..00000000 --- a/build/hooks/pre-commit.d/20-markdown.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -markdown_changed=0 -FILE_PATTERN=\.md$ - -git diff --cached --name-only | grep -q $FILE_PATTERN && markdown_changed=1 - -if [ $markdown_changed = 1 ]; then - b5 lint -else - echo "No markdown files in commit, skip markdown linting" -fi \ No newline at end of file diff --git a/build/tasks/ros.sh b/build/tasks/ros.sh deleted file mode 100644 index bea9d749..00000000 --- a/build/tasks/ros.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env bash -# b5 Taskfile, see https://git.team23.de/build/b5 for details - -# shortcuts for commands documented here -# http://wiki.ros.org/ROS/CommandLineTools#Common_user_tools - -task:roscommand() { - # seems necessary to source the setup file on every call - docker:container_run agent /bin/bash -c "source /opt/ros/noetic/setup.bash && ${@}" -} - -task:rosbag() { - task:roscommand "rosbag ${@}" -} - -task:ros_readbagfile() { - task:roscommand "ros_readbagfile ${@}" -} - -task:rosbash() { - task:roscommand "rosbash ${@}" -} - -task:roscd() { - task:roscommand "roscd ${@}" -} - -task:rosclean() { - task:roscommand "rosclean ${@}" -} - -task:roscore() { - task:roscommand "roscore ${@}" -} - -task:rosdep() { - task:roscommand "rosdep ${@}" -} - -task:rosed() { - task:roscommand "rosed ${@}" -} - -task:roscreate-pkg() { - task:roscommand "roscreate-pkg ${@}" -} - -task:roscreate-stack() { - task:roscommand "roscreate-stack ${@}" -} - -task:rosrun() { - task:roscommand "rosrun ${@}" -} - -task:roslaunch() { - task:roscommand "roslaunch ${@}" -} - -task:roslocate() { - task:roscommand "roslocate ${@}" -} - -task:rosmake() { - task:roscommand "rosmake ${@}" -} - -task:rosmsg() { - task:roscommand "rosmsg ${@}" -} - -task:rosnode() { - additionalArguments="${@:1}" - task:roscommand "rosnode ${@}" -} - -task:rospack() { - task:roscommand "rospack ${@}" -} - -task:rosparam() { - task:roscommand "rosparam ${@}" -} - -task:rossrv() { - task:roscommand "rossrv ${@}" -} - -task:rosservice() { - task:roscommand "rosservice ${@}" -} - -task:rosstack() { - task:roscommand "rosstack ${@}" -} - -task:rostopic() { - task:roscommand "rostopic ${@}" -} - -task:rosversion() { - task:roscommand "rosversion ${@}" -} -task:rqt_graph() { - task:roscommand "rqt_graph ${@}" -} - -task:rqt_plot() { - task:roscommand "rqt_plot ${@}" -} - -task:rqt_topic() { - task:roscommand "rqt_topic ${@}" -} diff --git a/doc/01_general/02_installation.md b/doc/01_general/02_installation.md index bd42665b..a0a1d332 100644 --- a/doc/01_general/02_installation.md +++ b/doc/01_general/02_installation.md @@ -1,38 +1,12 @@ # 🛠️ Installation -To run the project you have to install [b5](https://github.com/team23/b5) and [docker](https://docs.docker.com/engine/install/) with NVIDIA GPU support, [nvidia-docker](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker). +To run the project you have to install [docker](https://docs.docker.com/engine/install/) with NVIDIA GPU support, [nvidia-docker](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker). -For development, we further recommend PyCharm Professional. More information about its installation can be found in [PyCharm Setup](../02_development/06_pycharm_setup.md) +For development, we recommend Visual Studio Code with the plugins that are recommended inside the `.vscode` folder. ## Installation -If not yet installed first install b5 and docker as described in section [b5 installation](#b5-installation) and [Docker with NVIDIA GPU support](#docker-with-nvidia-gpu-support). - -After that setting up the project and executing it is as easy as that: - -```shell -# Setup project -b5 install - -# Run project -b5 run -``` - -## b5 installation - -Make sure you have installed python and pip. If not yet installed, you can do by the following (Ubuntu): - -```shell -# Install python3 -sudo apt install python3 -``` - -Afterwards just install b5 by running: - -```shell -# Install b5 -pip install b5 -``` +If not yet installed first install docker as described in section [Docker with NVIDIA GPU support](#docker-with-nvidia-gpu-support). ## Docker with NVIDIA GPU support @@ -90,20 +64,6 @@ sudo systemctl restart docker ## 🚨 Common Problems -### `b5: command not found` - ---- - -1. If you already installed b5 (`pip install b5`) try to log out and log back in. - -2. If that doesn't help add this line to your `~/.bash_profile` or `~/.bashrc`: - - ```shell - export PATH=$PATH:$HOME/.local/bin - ``` - -([possible reason](https://stackoverflow.com/a/73256004)) - ### Vulkan device not available Cannot find a compatible Vulkan Device. diff --git a/doc/01_general/03_commands.md b/doc/01_general/03_commands.md deleted file mode 100644 index e25324e3..00000000 --- a/doc/01_general/03_commands.md +++ /dev/null @@ -1,102 +0,0 @@ -# ⌨️ Available commands - -A specific `b5` workflow for gpu installation in this project is specified in an issue comment: - -## General commands - -### `b5 run` - -Starts the Project (docker-compose up). - -### `b5 halt` - -Stops the Project (docker-compose down). - -### `b5 shell` - -Makes it possible to get a shell of any docker container contained in the project. - -Possible arguments: - -| `argument` | `description` | `optional` | `default` | -|-------------|------------------------|------------|-----------| -| `container` | Container name | True | flake8 | -| `command` | Command to be executed | True | | - -Usage: `b5 shell ` - -#### Examples - -```shell -# Execute flake8 lint in `components`-folder: -b5 shell flake8 components - -# Get Shell in perception container (hypothetic example) -b5 shell perception -``` - -## Project setup / maintenance - -### `b5 install` - -Setup the project. Has to be run after cloning the project. - -### `b5 update` - -Update the project. - -## Project linting - -### `b5 lint` - -Runs the project linters. More documentation about linting can be found [here](../02_development/02_linting.md). - -### `b5 python:lint` - -Runs the python linter. More documentation about linting can be found [here](../02_development/02_linting.md). - -### `b5 markdown:lint` - -Runs the markdown linter. More documentation about linting can be found [here](../02_development/02_linting.md). - -## Shortcuts for ROS - -Shortcuts to run the ROS commands directly in the container. Detailed documentation -about this commands can be found [here](http://wiki.ros.org/ROS/CommandLineTools#Common_user_tools). - -For more complex tasks it's easier to just get a shell into the container with `b5 shell` and run the commands there. - -`b5 rosbag` -`b5 ros_readbagfile` -`b5 rosbash` -`b5 roscd` -`b5 rosclean` -`b5 roscore` -`b5 rosdep` -`b5 rosed` -`b5 roscreate-pkg` -`b5 roscreate-stack` -`b5 rosrun` -`b5 roslaunch` -`b5 roslocate` -`b5 rosmake` -`b5 rosmsg` -`b5 rosnode` -`b5 rospack` -`b5 rosparam` -`b5 rossrv` -`b5 rosservice` -`b5 rosstack` -`b5 rostopic` -`b5 rosversion` -`b5 rqt_graph` - -## 🚨 Common Problems - -` -REQUIRED process [carla_ros_bridge-1] has died! -` - -If the execution of `b5 run` is stopping because of this error the reason might be a duplicate Carla ROS bridge. - -To eliminate this problem, run `b5 halt --remove-orphans`. diff --git a/doc/01_general/Readme.md b/doc/01_general/Readme.md index de254e8f..313b5e96 100644 --- a/doc/01_general/Readme.md +++ b/doc/01_general/Readme.md @@ -3,5 +3,4 @@ This Folder contains instruction how to execute the project and what it does. 1. [Installation](./02_installation.md) -2. [Available b5 commands](./03_commands.md) -3. [Current architecture of the agent](./04_architecture.md) +2. [Current architecture of the agent](./04_architecture.md) diff --git a/doc/02_development/02_linting.md b/doc/02_development/02_linting.md index ab42b32f..728a1500 100644 --- a/doc/02_development/02_linting.md +++ b/doc/02_development/02_linting.md @@ -18,8 +18,6 @@ To enforce unified standards in all python files, we use [Flake8](https://pypi.o To enforce unified standards in all markdown files, we use [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli). More details on it can be found in the according documentation. -The markdown linter can fix some errors on its own by executing `b5 markdown:fix`. - ## 🚨 Common Problems Currently, we are not aware about any Problems. diff --git a/doc/02_development/10_installing_python_packages.md b/doc/02_development/10_installing_python_packages.md index 445cfe9c..7cb876a6 100644 --- a/doc/02_development/10_installing_python_packages.md +++ b/doc/02_development/10_installing_python_packages.md @@ -28,15 +28,3 @@ An example how this file could look like is given below: torch==1.13.0 torchvision==0.1.9 ``` - -To install the added packages run `b5 install` afterwards. - -## Common Problems - -Sometimes, PyCharm does not recognize installed packages on the docker container. -This leads to the problem that the program cannot be started in PyCharm via the run button, but only via command line. - -A workaround for this problem is: - -1. Run ```docker compose build``` in the console in the build folder. -2. Click on the python interpreter in the lower right corner and reselect it. diff --git a/doc/02_development/14_distributed_simulation.md b/doc/02_development/14_distributed_simulation.md index 75a981d7..80dc7692 100644 --- a/doc/02_development/14_distributed_simulation.md +++ b/doc/02_development/14_distributed_simulation.md @@ -51,8 +51,8 @@ Replace the ip-address in the following files: ### Start the agent on your local machine ```bash -b5 run_distributed -b5 run_dev_distributed +docker compose -f build/docker-compose_distributed.yaml up +docker compose -f build/docker-compose_dev_distributed.yaml up ``` ## How do you know that you do not have enough compute resources? diff --git a/doc/02_development/installing_cuda.md b/doc/02_development/installing_cuda.md index 0daa0002..832325b1 100644 --- a/doc/02_development/installing_cuda.md +++ b/doc/02_development/installing_cuda.md @@ -17,7 +17,6 @@ Marco Riedenauer ## First install For execution of the program, cuda-toolkit v11.7 has to be installed on both, your computer and the docker container. -Cuda-toolkit should already be installed on the docker container by executing ```b5 install``` in your build folder: For installing cuda-toolkit on your computer, execute step-by-step the following commands in your command line: @@ -51,8 +50,3 @@ the installer outputs that already another version of cuda-toolkit is installed, you have to uninstall the old version first. This can be done by executing the file `cuda-uninstaller` in the installation folder, usually `/usr/local/cuda-x.y/bin`. - -### Executing b5 install/update leads to an error of incompatible nvcc and drivers - -I had this problem after reinstalling cuda-toolkit on my computer. The best workaround I found is to uninstall all -NVIDIA drivers and cuda-toolkit and reinstall both of them. diff --git a/doc/06_perception/01_dataset_generator.md b/doc/06_perception/01_dataset_generator.md index ad688f7d..e1a71aff 100644 --- a/doc/06_perception/01_dataset_generator.md +++ b/doc/06_perception/01_dataset_generator.md @@ -81,11 +81,9 @@ index d1ae1df..ef1b503 100644 To run the dataset generator, first the Carla Simulator has to be running: - ```bash - b5 run carla-simulator - ``` +Start the docker containr `leaderboard-2.0`. -You can then run the dataset generator by executing the following command in the `b5 shell`: +You can then run the dataset generator by executing the following command in an attached shell: ```bash python3 perception/src/dataset_generator.py --host carla-simulator --port 2000 --use-empty-world @@ -119,7 +117,7 @@ the # ... ``` -Once the leaderboard evaluator is running, you can start the dataset generator in the `b5 shell`: +Once the leaderboard evaluator is running, you can start the dataset generator in an attached shell: ```bash python3 perception/src/dataset_generator.py --host carla-simulator --port 2000 diff --git a/doc/06_perception/07_position_heading_filter_debug_node.md b/doc/06_perception/07_position_heading_filter_debug_node.md index fd1da95c..34f7ec2c 100644 --- a/doc/06_perception/07_position_heading_filter_debug_node.md +++ b/doc/06_perception/07_position_heading_filter_debug_node.md @@ -183,7 +183,7 @@ To be able to save data in csv files you just need to uncomment the saving metho To use the [viz.py](../../code/perception/src/00_Experiments/Position_Heading_Datasets/viz.py) file you will have to: 1. Configure the main method to your likings inside the viz.py: ![picture](/doc/00_assets/perception/sensor_debug_viz_config.png) -2. Open up the b5 shell typing ```b5 shell``` into the terminal +2. Open up an attached shell 3. Navigate to the code/perception/src/00_Experiments/Position_Heading folder using ```cd``` 4. run the viz.py using ```python viz.py``` diff --git a/doc/07_planning/01_py_trees.md b/doc/07_planning/01_py_trees.md index 94cab5db..5d21de8c 100644 --- a/doc/07_planning/01_py_trees.md +++ b/doc/07_planning/01_py_trees.md @@ -45,10 +45,9 @@ There is a very simple example for pytrees. Run: -1. call `b5 update` to update docker container -2. call `b5 run` to start container -3. in a second shell call `b5 shell` -4. run `py-trees-demo-behaviour-lifecycle` to execute the example +1. Start the dev container for the agent +2. Attach a shell to the container +3. run `py-trees-demo-behaviour-lifecycle` to execute the example ## Common commands