diff --git a/.gitignore b/.gitignore index 98fb39e..5d277f9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ adore_cli .ccache adore_cli_core **/.tmp +.tmp diff --git a/README.md b/README.md index 6833d3c..96d4817 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # ADORe CLI -The adore_cli project provides a runtime docker context for ADORe. +The ADORe CLI project provides a ROS2 context and runtime context for ADORe. -## Getting started +## Prerequisites Docker and make must be installed to use this project +## Getting started + 1. clone the repository 2. run the provided make target to launch the cli ```bash diff --git a/adore_cli.mk b/adore_cli.mk index 0e87bb0..795f1d0 100644 --- a/adore_cli.mk +++ b/adore_cli.mk @@ -8,11 +8,7 @@ SHELL:=/bin/bash ADORE_CLI_PROJECT:=adore_cli_core ADORE_CLI_MAKEFILE_PATH:=$(shell realpath "$(shell dirname "$(lastword $(MAKEFILE_LIST))")") -ifeq ($(SUBMODULES_PATH),) - ADORE_CLI_SUBMODULES_PATH:=${ADORE_CLI_MAKEFILE_PATH} -else - ADORE_CLI_SUBMODULES_PATH:=$(shell realpath ${SUBMODULES_PATH}) -endif +ADORE_CLI_SUBMODULES_PATH:=${ADORE_CLI_MAKEFILE_PATH} MAKE_GADGETS_PATH:=${ADORE_CLI_SUBMODULES_PATH}/make_gadgets ifeq ($(wildcard $(MAKE_GADGETS_PATH)/*),) @@ -56,28 +52,24 @@ $(shell touch "${ADORE_CLI_MAKEFILE_PATH}/.bash_history") $(shell mkdir -p "${SOURCE_DIRECTORY}/.log") .PHONY: start -start: adore_cli_setup adore_cli_start adore_cli_attach adore_cli_teardown ## OFFLINE start of adore cli - -.PHONY: run -run: adore_cli_setup adore_cli_start adore_cli_run adore_cli_teardown ## Execute a command in the ADORe CLI context `make run cmd=""` +start: adore_cli_setup adore_cli_start ## Start the ADORe CLI docker compose context .PHONY: stop -stop: stop_adore_cli +stop: stop_adore_cli ## Stop ADORe CLI docker compose context if it is running +.PHONY: run +run: adore_cli_setup adore_cli_start adore_cli_run adore_cli_teardown ## Execute a command in the ADORe CLI context `make run cmd=""` .PHONY: adore_cli_up adore_cli_up: adore_cli_setup adore_cli_start adore_cli_attach adore_cli_teardown -.PHONY: cli -cli: adore_cli ## Same as 'make adore_cli' for the lazy - .PHONY: stop_adore_cli stop_adore_cli: docker_host_context_check adore_cli_teardown ## Stop adore_cli docker context if it is running .PHONY: stop_adore_cli stop_adore_cli: docker_host_context_check adore_cli_teardown -.PHONY: adore_cli -adore_cli: docker_host_context_check ## Start adore_cli context or attach to it if already running +.PHONY: cli +cli: docker_host_context_check ## Start ADORe CLI docker context or attach to it if it is already running @if [[ "$$(docker inspect -f '{{.State.Running}}' '${ADORE_CLI_CONTAINER_NAME}' 2>/dev/null)" == "true" ]]; then\ cd "${ADORE_CLI_MAKEFILE_PATH}" && make --file=${ADORE_CLI_MAKEFILE_PATH}/adore_cli.mk adore_cli_attach;\ exit 0;\ diff --git a/adore_cli/.tmp/Makefile b/adore_cli/.tmp/Makefile deleted file mode 100644 index 2862eba..0000000 --- a/adore_cli/.tmp/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -SHELL:=/bin/bash - -.DEFAULT_GOAL := all - -ROOT_DIR:=$(shell dirname "$(realpath $(firstword $(MAKEFILE_LIST)))") -SUBMODULES_PATH:=${ROOT_DIR} - -MAKEFLAGS += --no-print-directory - -.PHONY:build -build: - cd mathematics_toolbox && make build - cd OptiNLC && make build - cd CasADi && make build - mkdir -p build - cp mathematics_toolbox/eigen/build build/eigen -r - cp mathematics_toolbox/osqp/build build/osqp -r - cp OptiNLC/OptiNLC/build build/OptiNLC -r - cp CasADi/build build/CasADi -r -# cd build/eigen && find . -type f -exec sed -i "s|/tmp/|$$(pwd)/|g" {} + -# cd build/osqp && find . -type f -exec sed -i "s|/tmp/|$$(pwd)/|g" {} + - -.PHONY: install -install: - @if [ ! -d "build" ]; then \ - echo "ERROR: The vendor build directory: ${ROOT_DIR}/build does not exist. Did you build the vendor libraries with 'make build'?"; \ - exit 1; \ - fi - find build -maxdepth 2 -type f -name "*.deb" -print0 | xargs -0 sudo dpkg -i --force-all - cd CasADi && make install - -.PHONY: clean -clean: - rm -rf build - cd OptiNLC && make clean - cd mathematics_toolbox && make clean - cd CasADi && make clean diff --git a/adore_cli/.tmp/packages/casadi_20241128-1_amd64.deb b/adore_cli/.tmp/packages/casadi_20241128-1_amd64.deb deleted file mode 100644 index 68379e2..0000000 Binary files a/adore_cli/.tmp/packages/casadi_20241128-1_amd64.deb and /dev/null differ diff --git a/adore_cli/.tmp/packages/eigen3_20230705-1_amd64.deb b/adore_cli/.tmp/packages/eigen3_20230705-1_amd64.deb deleted file mode 100644 index a7ce2ca..0000000 Binary files a/adore_cli/.tmp/packages/eigen3_20230705-1_amd64.deb and /dev/null differ diff --git a/adore_cli/.tmp/packages/optinlc_0.1.1_amd64.deb b/adore_cli/.tmp/packages/optinlc_0.1.1_amd64.deb deleted file mode 100644 index 0af6437..0000000 Binary files a/adore_cli/.tmp/packages/optinlc_0.1.1_amd64.deb and /dev/null differ diff --git a/adore_cli/.tmp/packages/osqp_20230705-1_amd64.deb b/adore_cli/.tmp/packages/osqp_20230705-1_amd64.deb deleted file mode 100644 index c224538..0000000 Binary files a/adore_cli/.tmp/packages/osqp_20230705-1_amd64.deb and /dev/null differ diff --git a/adore_cli/.tmp/requirements/combined_requirements.pip3 b/adore_cli/.tmp/requirements/combined_requirements.pip3 deleted file mode 100644 index a8d1995..0000000 --- a/adore_cli/.tmp/requirements/combined_requirements.pip3 +++ /dev/null @@ -1,9 +0,0 @@ - -breathe -exhale -keras -matplotlib -numpy -setuptools -tensorflow -utm diff --git a/adore_cli/.tmp/requirements/combined_requirements.system b/adore_cli/.tmp/requirements/combined_requirements.system deleted file mode 100644 index 106a2a7..0000000 --- a/adore_cli/.tmp/requirements/combined_requirements.system +++ /dev/null @@ -1,67 +0,0 @@ - -ament-cmake -apt-file -bash -catch2 -ccache -clang-format -cmake -cowsay -curl -file -fzf -g++ -gcc -gdb -gdbserver -gettext -git -htop -inetutils-ping -less -libboost1.74-all-dev -libboost-all-dev -libeigen3-dev -libgeometry-msgs-dev -libhdf5-dev -libopencv-dev -libproj-dev -libroscpp-dev -make -netcat -netcat-traditional -nlohmann-json3-dev -nmap -pkg-config -python3-colcon-common-extensions -python3-pip -python3-venv -ros-${ROS_DISTRO}-foxglove-bridge -ros-${ROS_DISTRO}-plotjuggler -ros-${ROS_DISTRO}-plotjuggler-ros -ros-${ROS_DISTRO}-ros-base -ros-${ROS_DISTRO}-rosbridge-suite -ros-${ROS_DISTRO}-tracetools -ros-${ROS_DISTRO}-tracetools-acceleration -ros-${ROS_DISTRO}-tracetools-acceleration-dbgsym -ros-${ROS_DISTRO}-tracetools-analysis -ros-${ROS_DISTRO}-tracetools-dbgsym -ros-${ROS_DISTRO}-tracetools-image-pipeline -ros-${ROS_DISTRO}-tracetools-image-pipeline-dbgsym -ros-${ROS_DISTRO}-tracetools-launch -ros-${ROS_DISTRO}-tracetools-read -ros-${ROS_DISTRO}-tracetools-test -ros-${ROS_DISTRO}-tracetools-trace -ros-dev-tools -ros-iron-cv-bridge -ros-iron-tf2 -ros-iron-tf2-ros -rsyslog -sudo -telnet -traceroute -vim -wget -x11-apps -xterm -zsh diff --git a/make_gadgets b/make_gadgets index fcb9f57..1bc0b01 160000 --- a/make_gadgets +++ b/make_gadgets @@ -1 +1 @@ -Subproject commit fcb9f5761af396adf4492cc062051c6d6ef51d2a +Subproject commit 1bc0b014be90fae79a6d9bb51423808ae564bf21