From acc479b03a71e0a453f826fb52a5a3e2949723a4 Mon Sep 17 00:00:00 2001 From: Andres Montano <andres.montano@tecnalia.com> Date: Fri, 3 Jun 2022 13:09:41 +0200 Subject: [PATCH] Update dotfiles --- dockerfiles/DevenvMelodic.Dockerfile | 63 ++++++-- dockerfiles/DevenvNoetic.Dockerfile | 107 ++++++++----- dockerfiles/DevenvPCL.Dockerfile | 224 +++++++++++++++++++++++++++ dotfiles/.bashrc | 4 + dotfiles/.clang-format | 66 ++++++++ dotfiles/.zshrc | 131 ++++++++-------- dotfiles/docker.bash | 29 +++- dotfiles/ros.bash | 56 ++++--- dotfiles/system.bash | 7 + notes/ABEEE | 65 ++++++++ notes/notas | 16 +- 11 files changed, 599 insertions(+), 169 deletions(-) create mode 100644 dockerfiles/DevenvPCL.Dockerfile create mode 100644 dotfiles/.clang-format create mode 100644 dotfiles/system.bash create mode 100644 notes/ABEEE diff --git a/dockerfiles/DevenvMelodic.Dockerfile b/dockerfiles/DevenvMelodic.Dockerfile index 6772c60..4dda1ac 100644 --- a/dockerfiles/DevenvMelodic.Dockerfile +++ b/dockerfiles/DevenvMelodic.Dockerfile @@ -33,6 +33,10 @@ RUN apt-get -y install --no-install-recommends \ python-pip \ python-catkin-tools \ python-osrf-pycommon \ + libclang-dev \ + cppcheck \ + lcov \ + iwyu \ xterm \ zsh \ && rm -rf /var/lib/apt/lists/* @@ -51,11 +55,6 @@ RUN sh -c "echo \ 'deb https://${USER_API_KEY_ARTIFACTS_TECNALIA}@artifact.tecnalia.com/artifactory/tecnalia-robotics-debian xenial main' \ >> /etc/apt/sources.list.d/tecnalia.list" -# RUN sh -c "echo \ -# 'deb https://artifact.tecnalia.com/artifactory/tecnalia-robotics-debian xenial main' \ -# >> /etc/apt/sources.list.d/tecnalia.list" -# COPY auth.conf /etc/apt/ - # Import the key in order to be able to use the packages from the repository RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7E72C5B4111A50084C63C9489E7A9B1D990CF897 @@ -63,7 +62,6 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7E72C5B411 RUN sh -c "echo 'yaml https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/rosdistro/rosdep_tecnalia.yaml' \ >> /etc/ros/rosdep/sources.list.d/20-default.list" -# Packages installed as dependecies of kawada_lab_aplication RUN apt-get update && apt-get install -y \ ros-melodic-ros-control-boilerplate \ ros-melodic-ur-msgs \ @@ -85,7 +83,6 @@ RUN apt-get update && apt-get install -y \ libcanberra-gtk0 \ cmake -# Packages installed as dependecies of sherlock-ui RUN apt-get install -y \ ros-melodic-rosbridge-server \ ros-melodic-moveit \ @@ -112,7 +109,6 @@ RUN apt-get install -y \ ros-melodic-trac-ik-kinematics-plugin \ python3-catkin-pkg-modules - # Packages installed as dependecies of botarobota RUN apt-get install -y \ ros-melodic-ar-track-alvar-msgs \ ros-melodic-navigation @@ -143,9 +139,6 @@ RUN curl -fsSLk https://deb.nodesource.com/setup_14.x | bash - \ && apt-get install -y -qq nodejs \ && npm install -g yarn -# RUN curl -s https://b0e12e65a4f16bfc4594206c69dce2a49a5eabd04efb7540:@packagecloud.io/install/repositories/reelrbtx/SMACC_viewer/script.deb.sh | bash \ -# && apt-get -y install ros-melodic-smacc-viewer - RUN apt-get install -y \ gir1.2-gtk-3.0 \ python3-gi \ @@ -159,13 +152,51 @@ RUN apt-get install -y \ libcanberra-gtk-module \ libcanberra-gtk3-module \ wget \ - terminator + terminator \ + direnv \ + libspnav-dev \ + libbluetooth-dev \ + libcwiid-dev \ + ros-melodic-joy + +RUN apt-get update && apt-get install -y \ +spacenavd \ +ros-melodic-spacenav-node \ +ros-melodic-ros-control + +RUN apt-get update && apt-get install -y \ +ros-melodic-rqt-controller-manager \ +systemd + +RUN wget https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid-telicam-driver_3.0.1.1-1_amd64.deb \ + https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid_1.8.3+96f35dc6-1_amd64.deb \ + https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid-studio_1.8.3+96f35dc6-1_amd64.deb \ + https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid-tools_1.8.3+96f35dc6-1_amd64.deb + +RUN dpkg -i zivid*.deb -# set the zsh theme -#ENV ZSH_THEME agnoster +RUN mv /usr/include/flann/ext/lz4.h /usr/include/flann/ext/lz4.h.bak +RUN mv /usr/include/flann/ext/lz4hc.h /usr/include/flann/ext/lz4.h.bak - # run the installation script -#RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true +RUN ln -s /usr/include/lz4.h /usr/include/flann/ext/lz4.h +RUN ln -s /usr/include/lz4hc.h /usr/include/flann/ext/lz4hc.h + +RUN apt-get update && apt-get install -y \ +ros-melodic-moveit-resources \ +ros-melodic-moveit-visual-tools \ +ros-melodic-moveit-opw-kinematics-plugin \ +ros-melodic-rqt-joint-trajectory-controller \ +ros-melodic-ros-controllers \ +python-mock \ +python-funcsigs \ +clang-format + +RUN apt-get update && apt-get install -y \ +ros-melodic-imu-tools \ +ros-melodic-interactive-marker-twist-server \ +ros-melodic-industrial-core \ +ros-melodic-lms1xx \ +ros-melodic-serial # Update final image RUN apt-get update && apt-get -y upgrade && apt-get -y autoremove diff --git a/dockerfiles/DevenvNoetic.Dockerfile b/dockerfiles/DevenvNoetic.Dockerfile index 7546fc4..506951f 100644 --- a/dockerfiles/DevenvNoetic.Dockerfile +++ b/dockerfiles/DevenvNoetic.Dockerfile @@ -52,7 +52,7 @@ RUN apt-get update && apt-get -y install --no-install-recommends \ # Configure system to look for debian packages in the Artifactory repository ARG USER_API_KEY_ARTIFACTS_TECNALIA RUN sh -c "echo \ - 'deb https://${USER_API_KEY_ARTIFACTS_TECNALIA}@artifact.tecnalia.com/artifactory/tecnalia-robotics-debian xenial main' \ + 'deb https://${USER_API_KEY_ARTIFACTS_TECNALIA}@artifact.tecnalia.com/artifactory/tecnalia-robotics-debian xenial main' \ >> /etc/apt/sources.list.d/tecnalia.list" # Import the key in order to be able to use the packages from the repository @@ -63,50 +63,16 @@ RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt RUN sh -c "echo 'yaml https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/rosdistro/rosdep_tecnalia.yaml' \ >> /etc/ros/rosdep/sources.list.d/20-default.list" -# Packages installed as dependecies of kawada_lab_aplication RUN apt-get update && apt-get install -y \ - cmake \ - python3-lxml \ - cython \ - ros-noetic-effort-controllers \ - ros-noetic-joint-trajectory-controller \ - ros-noetic-moveit-ros-move-group \ - ros-noetic-moveit-planners-ompl \ - ros-noetic-moveit-ros-visualization \ - ros-noetic-moveit-fake-controller-manager \ - ros-noetic-moveit-simple-controller-manager \ - ros-noetic-moveit-core \ - ros-noetic-moveit-kinematics \ - ros-noetic-moveit-ros-planning \ - ros-noetic-rqt-joint-trajectory-controller \ - ros-noetic-realsense2-description \ - ros-noetic-vision-msgs \ - ros-noetic-moveit-setup-assistant \ - ros-noetic-moveit-resources-prbt-moveit-config \ - ros-noetic-rosmon \ - python3-vcstool \ - python3-pip \ - python3-mock - -RUN python3 -m pip install -U rope + wget \ + udev -RUN apt-get update && apt-get install -y \ - lcov \ - libbullet-extras-dev \ - libbenchmark-dev \ - libclang-dev \ - iwyu \ - cppcheck \ - libbullet-dev \ - libbullet-extras-dev \ - ros-noetic-fcl - -RUN apt-get update && apt-get install -y \ - ros-noetic-industrial-robot-simulator +RUN wget https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid-telicam-driver_3.0.1.1-1_amd64.deb \ + https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid_1.8.3+96f35dc6-1_amd64.deb \ + https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid-studio_1.8.3+96f35dc6-1_amd64.deb \ + https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid-tools_1.8.3+96f35dc6-1_amd64.deb -RUN add-apt-repository ppa:ros-industrial/ppa \ - && apt-get update && apt-get install -y \ - taskflow +RUN dpkg -i zivid*.deb # Update final image RUN apt-get update \ @@ -114,12 +80,67 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y \ + direnv + +# Scan and Plan dependencies +RUN apt-get update && apt-get install -y \ + ros-noetic-industrial-robot-simulator \ + ros-noetic-moveit-fake-controller-manager \ + ros-noetic-moveit-planners-ompl \ + ros-noetic-moveit-ros-move-group \ + ros-noetic-moveit-ros-visualization \ + ros-noetic-moveit-ros-warehouse \ + ros-noetic-moveit-simple-controller-manager \ + ros-noetic-warehouse-ros \ + ros-noetic-industrial-robot-client \ + python-numpy \ + ros-noetic-simple-message \ + liblapack-dev \ + ros-noetic-moveit-core \ + ros-noetic-trac-ik-kinematics-plugin \ + ros-noetic-urdfdom-py \ + ros-noetic-srdfdom \ + ros-noetic-pcl-ros \ + ros-noetic-moveit-kinematics \ + ros-noetic-pcl-msgs \ + ros-noetic-moveit-ros-planning-interface \ + ros-noetic-swri-profiler \ + libqd-dev \ + libpcl-dev \ + libpcl-apps1.10 \ + libpcl-common1.10 \ + libpcl-features1.10 \ + libpcl-filters1.10 \ + libpcl-io1.10 \ + libpcl-kdtree1.10 \ + libpcl-keypoints1.10 \ + libpcl-ml1.10 \ + libpcl-octree1.10 \ + libpcl-outofcore1.10 \ + libpcl-people1.10 \ + libpcl-recognition1.10 \ + libpcl-registration1.10 \ + libpcl-sample-consensus1.10 \ + libpcl-search1.10 \ + libpcl-segmentation1.10 \ + libpcl-stereo1.10 \ + libpcl-surface1.10 \ + libpcl-tracking1.10 \ + libpcl-visualization1.10 \ + ros-noetic-catkin-virtualenv \ + python3-zmq \ + ros-noetic-moveit-ros-planning \ + ros-noetic-moveit-setup-assistant \ + ros-noetic-ompl \ + ros-noetic-moveit-ros-manipulation + # Set entrypoint COPY ./ros_entrypoint.sh / RUN chmod a+x /ros_entrypoint.sh ENTRYPOINT ["/ros_entrypoint.sh"] -CMD ["bash"] +CMD ["zsh"] # Switch back to dialog for any ad-hoc use of apt-get ENV DEBIAN_FRONTEND= \ No newline at end of file diff --git a/dockerfiles/DevenvPCL.Dockerfile b/dockerfiles/DevenvPCL.Dockerfile new file mode 100644 index 0000000..9a4c740 --- /dev/null +++ b/dockerfiles/DevenvPCL.Dockerfile @@ -0,0 +1,224 @@ +FROM osrf/ros:noetic-desktop-full +ENV ROS_DISTRO noetic + +# Avoid warnings by switching to noninteractive +ENV DEBIAN_FRONTEND=noninteractive + +# Setup environment +RUN apt-get update && apt-get install -y \ + locales \ + && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +# Configure apt and install packages +RUN apt-get -y install --no-install-recommends \ + apt-transport-https \ + ca-certificates \ + curl \ + gnupg-agent \ + software-properties-common \ + apt-utils dialog 2>&1 \ + # + # Verify if git, process tools, lsb-release (common in install instructions for CLIs) are installed + # Install the https transport support package for The Artifactory debian repository + git \ + git-lfs \ + nano \ + iproute2 \ + procps \ + lsb-release \ + curl \ + cmake \ + openssh-client \ + ros-noetic-catkin \ + python3-catkin-tools \ + python3-osrf-pycommon \ + xterm \ + terminator \ + zsh \ + # && rosdep init || true \ + && rm -rf /var/lib/apt/lists/* + +# Install docker-ce +RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - +RUN add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" +RUN apt-get update && apt-get -y install --no-install-recommends \ + docker-ce-cli \ + && rm -rf /var/lib/apt/lists/* + +# Configure system to look for debian packages in the Artifactory repository +ARG USER_API_KEY_ARTIFACTS_TECNALIA +RUN sh -c "echo \ + 'deb https://${USER_API_KEY_ARTIFACTS_TECNALIA}@artifact.tecnalia.com/artifactory/tecnalia-robotics-debian xenial main' \ + >> /etc/apt/sources.list.d/tecnalia.list" + +# Import the key in order to be able to use the packages from the repository +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7E72C5B4111A50084C63C9489E7A9B1D990CF897 +RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - + +# Configure rosdep +RUN sh -c "echo 'yaml https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/rosdistro/rosdep_tecnalia.yaml' \ + >> /etc/ros/rosdep/sources.list.d/20-default.list" + +RUN apt-get update && apt-get install -y \ + wget \ + udev + +RUN wget https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid-telicam-driver_3.0.1.1-1_amd64.deb \ + https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid_1.8.3+96f35dc6-1_amd64.deb \ + https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid-studio_1.8.3+96f35dc6-1_amd64.deb \ + https://www.zivid.com/hubfs/softwarefiles/releases/1.8.3+96f35dc6-1/u18/zivid-tools_1.8.3+96f35dc6-1_amd64.deb + +RUN dpkg -i zivid*.deb + +# Update final image +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN apt-get update && apt-get install -y \ + direnv + +# Scan and Plan dependencies +RUN apt-get update && apt-get install -y \ + ros-noetic-industrial-robot-simulator \ + ros-noetic-moveit-fake-controller-manager \ + ros-noetic-moveit-planners-ompl \ + ros-noetic-moveit-ros-move-group \ + ros-noetic-moveit-ros-visualization \ + ros-noetic-moveit-ros-warehouse \ + ros-noetic-moveit-simple-controller-manager \ + ros-noetic-warehouse-ros \ + ros-noetic-industrial-robot-client \ + python-numpy \ + ros-noetic-simple-message \ + liblapack-dev \ + ros-noetic-moveit-core \ + ros-noetic-trac-ik-kinematics-plugin \ + ros-noetic-urdfdom-py \ + ros-noetic-srdfdom \ + ros-noetic-pcl-ros \ + ros-noetic-moveit-kinematics \ + ros-noetic-pcl-msgs \ + ros-noetic-moveit-ros-planning-interface \ + ros-noetic-swri-profiler \ + libqd-dev \ + libpcl-dev \ + libpcl-apps1.10 \ + libpcl-common1.10 \ + libpcl-features1.10 \ + libpcl-filters1.10 \ + libpcl-io1.10 \ + libpcl-kdtree1.10 \ + libpcl-keypoints1.10 \ + libpcl-ml1.10 \ + libpcl-octree1.10 \ + libpcl-outofcore1.10 \ + libpcl-people1.10 \ + libpcl-recognition1.10 \ + libpcl-registration1.10 \ + libpcl-sample-consensus1.10 \ + libpcl-search1.10 \ + libpcl-segmentation1.10 \ + libpcl-stereo1.10 \ + libpcl-surface1.10 \ + libpcl-tracking1.10 \ + libpcl-visualization1.10 \ + ros-noetic-catkin-virtualenv \ + python3-zmq \ + ros-noetic-moveit-ros-planning \ + ros-noetic-moveit-setup-assistant \ + ros-noetic-ompl \ + ros-noetic-moveit-ros-manipulation + +RUN sh -c "echo \ + 'deb http://debrob.upc.edu/debian bullseye main contrib non-free' \ + >> /etc/apt/sources.list.d/debian.list" + +RUN wget -v0 - http://debrob.upc.edu/debian/dists/Debian11.2/Release.gpg \ + && apt-key add - < Release.gpg + + +RUN apt-get update && apt-get install -y \ +libusb-1.0-0-dev \ +default-jdk \ +libdouble-conversion-dev \ +libutfcpp-dev \ +build-essential + +# Set entrypoint +COPY ./ros_entrypoint.sh / +RUN chmod a+x /ros_entrypoint.sh + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["zsh"] + +# Switch back to dialog for any ad-hoc use of apt-get +ENV DEBIAN_FRONTEND= + +# libvtk9-dev +# libvtk9-qt-dev +# libusb-1.0-0-dev +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-apps1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-common1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-features1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-filters1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-io1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-kdtree1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-keypoints1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-ml1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-octree1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-outofcore1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-people1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-recognition1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-registration1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-sample-consensus1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-search1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-segmentation1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-stereo1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-surface1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-tracking1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-visualization1.12_1.12.1+dfsg-3+b2_amd64.deb +# http://debrob.upc.edu/debian/pool/main/p/pcl/pcl-tools_1.12.1+dfsg-3+b2_amd64.deb + +# http://debrob.upc.edu/debian/pool/main/v/vtk9/libvtk9-dev_9.1.0%2Breally9.1.0%2Bdfsg2-3%2Bb1_amd64.deb +# http://debrob.upc.edu/debian/pool/main/v/vtk9/libvtk9-qt-dev_9.1.0%2Breally9.1.0%2Bdfsg2-3%2Bb1_amd64.deb + +# http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-apps1.12_1.12.1%2Bdfsg-3%2Bb2_amd64.deb + +#libglew2.2 \ +#libhdf5-103-1 \ +#libjpeg62-turbo \ +#libjsoncpp25 \ +#libnetcdf19 \ +# libopenmpi3 \ +# #libproj22 \ +# libstdc++6 + +# RUN wget http://debrob.upc.edu/debian/pool/main/p/proj/libproj22_8.2.1-1_amd64.deb \ +# http://debrob.upc.edu/debian/pool/main/p/proj/proj-data_8.2.1-1_all.deb \ +# http://debrob.upc.edu/debian/pool/main/g/glibc/libc6-amd64_2.33-6_i386.deb + +# RUN dpkg -i libc6-amd64_2.33-6_i386.deb \ +# libproj22_8.2.1-1_amd64.deb \ +# proj-data_8.2.1-1_all.deb + +# RUN wget http://debrob.upc.edu/debian/pool/main/v/vtk9/libvtk9.1_9.1.0%2Breally9.1.0%2Bdfsg2-3%2Bb1_amd64.deb \ +# http://debrob.upc.edu/debian/pool/main/v/vtk9/vtk9_9.1.0%2Breally9.1.0%2Bdfsg2-3%2Bb1_amd64.deb \ +# http://debrob.upc.edu/debian/pool/main/v/vtk9/python3-vtk9_9.1.0%2Breally9.1.0%2Bdfsg2-3%2Bb1_amd64.deb \ +# http://debrob.upc.edu/debian/pool/main/v/vtk9/libvtk9-dev_9.1.0%2Breally9.1.0%2Bdfsg2-3%2Bb1_amd64.deb + +# # http://debrob.upc.edu/debian/pool/main/p/pcl/libpcl-dev_1.12.1+dfsg-3+b2_amd64.deb \ +# # http://debrob.upc.edu/debian/pool/main/v/vtk9/libvtk9-qt-dev_9.1.0%2Breally9.1.0%2Bdfsg2-3%2Bb1_amd64.deb \ +# # http://debrob.upc.edu/debian/pool/main/v/vtk9/vtk9_9.1.0%2Breally9.1.0%2Bdfsg2-3%2Bb1_amd64.deb \ +# # http://debrob.upc.edu/debian/pool/main/v/vtk9/libvtk9-java_9.1.0%2Breally9.1.0%2Bdfsg2-3%2Bb1_amd64.deb \ +# # http://debrob.upc.edu/debian/pool/main/v/vtk9/libvtk9.1-qt_9.1.0%2Breally9.1.0%2Bdfsg2-3%2Bb1_amd64.deb \ + +# RUN dpkg -i libvtk9.1_9.1.0+really9.1.0+dfsg2-3+b1_amd64.deb +# RUN dpkg -i vtk9_9.1.0+really9.1.0+dfsg2-3+b1_amd64.deb +# RUN dpkg -i python3-vtk9_9.1.0+really9.1.0+dfsg2-3+b1_amd64.deb +# RUN dpkg -i libvtk9-dev_9.1.0+really9.1.0+dfsg2-3+b1_amd64.deb \ No newline at end of file diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc index 34d20ee..25554d8 100644 --- a/dotfiles/.bashrc +++ b/dotfiles/.bashrc @@ -89,6 +89,10 @@ source ~/srcs/development_environment/dotfiles/git.bash #[[ ${BLE_VERSION-} ]] && ble-attach +eval "$(direnv hook bash)" + # Alternative to ble.sh bind 'set show-all-if-ambiguous on' bind 'TAB:menu-complete' + +[ -f ~/.fzf.bash ] && source ~/.fzf.bash diff --git a/dotfiles/.clang-format b/dotfiles/.clang-format new file mode 100644 index 0000000..eca6051 --- /dev/null +++ b/dotfiles/.clang-format @@ -0,0 +1,66 @@ +--- +BasedOnStyle: Google +AccessModifierOffset: -2 +ConstructorInitializerIndentWidth: 2 +AlignEscapedNewlinesLeft: false +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortLoopsOnASingleLine: false +AlwaysBreakTemplateDeclarations: true +AlwaysBreakBeforeMultilineStrings: false +BreakBeforeBinaryOperators: false +BreakBeforeTernaryOperators: false +BreakConstructorInitializersBeforeComma: true +BinPackParameters: true +ColumnLimit: 120 +ConstructorInitializerAllOnOneLineOrOnePerLine: true +DerivePointerBinding: false +PointerBindsToType: true +ExperimentalAutoDetectBinPacking: false +IndentCaseLabels: true +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCSpaceBeforeProtocolList: true +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 60 +PenaltyBreakString: 1 +PenaltyBreakFirstLessLess: 1000 +PenaltyExcessCharacter: 1000 +PenaltyReturnTypeOnItsOwnLine: 90 +SpacesBeforeTrailingComments: 2 +Cpp11BracedListStyle: false +Standard: Auto +IndentWidth: 2 +TabWidth: 2 +UseTab: Never +IndentFunctionDeclarationAfterType: false +SpacesInParentheses: false +SpacesInAngles: false +SpaceInEmptyParentheses: false +SpacesInCStyleCastParentheses: false +SpaceAfterControlStatementKeyword: true +SpaceBeforeAssignmentOperators: true +ContinuationIndentWidth: 4 +SortIncludes: false +SpaceAfterCStyleCast: false + +# Configure each individual brace in BraceWrapping +BreakBeforeBraces: Custom + +# Control of individual brace wrapping cases +BraceWrapping: { + AfterClass: 'true' + AfterControlStatement: 'true' + AfterEnum : 'true' + AfterFunction : 'true' + AfterNamespace : 'true' + AfterStruct : 'true' + AfterUnion : 'true' + BeforeCatch : 'true' + BeforeElse : 'true' + IndentBraces : 'false' +} +... diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc index f641f26..5d842df 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/.zshrc @@ -1,18 +1,56 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH # Path to your oh-my-zsh installation. export ZSH="/home/andres/.oh-my-zsh" +# Use modern completion system +autoload -Uz compinit +compinit + +zstyle ':completion:*' auto-description 'specify: %d' +zstyle ':completion:*' completer _expand _complete _correct _approximate +zstyle ':completion:*' format 'Completing %d' +zstyle ':completion:*' group-name '' +zstyle ':completion:*' menu select=2 +eval "$(dircolors -b)" +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} +zstyle ':completion:*' list-colors '' +zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s +zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*' +zstyle ':completion:*' menu select=long +zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s +zstyle ':completion:*' use-compctl false +zstyle ':completion:*' verbose true + +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' +zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' + # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, # to know which specific one was loaded, run: echo $RANDOM_THEME # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -ZSH_THEME="robbyrussell" +#ZSH_THEME="robbyrussell" #ZSH_THEME="avit" #ZSH_THEME="dst" #ZSH_THEME="bira" #ZSH_THEME="agnoster" +ZSH_THEME="powerlevel10k/powerlevel10k" + +# Set up the prompt + +autoload -Uz promptinit +promptinit +prompt adam1 + +setopt histignorealldups sharehistory # Set list of themes to pick from when loading at random # Setting this variable when ZSH_THEME=random will cause zsh to load @@ -20,44 +58,14 @@ ZSH_THEME="robbyrussell" # If set to an empty array, this variable will have no effect. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment the following line to disable bi-weekly auto-update checks. -# DISABLE_AUTO_UPDATE="true" - -# Uncomment the following line to automatically update without prompting. -# DISABLE_UPDATE_PROMPT="true" - -# Uncomment the following line to change how often to auto-update (in days). -# export UPDATE_ZSH_DAYS=13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - # Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" +ENABLE_CORRECTION="true" # Uncomment the following line to display red dots whilst waiting for completion. # You can also set it to another string to have that shown instead of the default red dots. # e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" +COMPLETION_WAITING_DOTS="true" # Uncomment the following line if you want to change the command execution time # stamp shown in the history command output. @@ -67,46 +75,15 @@ ZSH_THEME="robbyrussell" # see 'man strftime' for details. HIST_STAMPS="dd/mm/yyyy" -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - # Which plugins would you like to load? # Standard plugins can be found in $ZSH/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(git history-substring-search zsh-autosuggestions) #zsh-autosuggestions +plugins=(git history-substring-search zsh-autosuggestions sudo last-working-dir zsh-syntax-highlighting globalias) #zsh-autosuggestions source $ZSH/oh-my-zsh.sh -# User configuration - -setopt no_share_history - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" - # Create a cache folder if it isn't exists if [ ! -d "$HOME/.cache/zsh" ]; then mkdir -p $HOME/.cache/zsh @@ -115,10 +92,26 @@ fi # Define a custom file for compdump export ZSH_COMPDUMP="$HOME/.cache/zsh/zcompdump-$HOST-$ZSH_VERSION" +# User configuration + +setopt no_share_history + export EDITOR="code -r" -export PATH=~/.venv/ddeploy_venv/bin:$PATH -export PATH=~/.venv/rocker_venv/bin:$PATH +# Include dotfiles +source ${HOME}/srcs/development_environment/dotfiles/git.bash +source ${HOME}/srcs/development_environment/dotfiles/docker.bash +source ${HOME}/srcs/development_environment/dotfiles/ros.bash +source ${HOME}/srcs/development_environment/dotfiles/system.bash + +eval "$(direnv hook zsh)" + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +# Finalize Powerlevel10k instant prompt. Should stay at the bottom of ~/.zshrc. +(( ! ${+functions[p10k-instant-prompt-finalize]} )) || p10k-instant-prompt-finalize + -source /home/andres/srcs/development_environment/dotfiles/git.bash -source /home/andres/srcs/development_environment/dotfiles/docker.bash diff --git a/dotfiles/docker.bash b/dotfiles/docker.bash index 5dcff22..484cbed 100644 --- a/dotfiles/docker.bash +++ b/dotfiles/docker.bash @@ -1,5 +1,5 @@ # Poining to pip venv -#alias rocker="~/.venv/rocker/bin/rocker" +# alias rocker="~/.venv/rocker/bin/rocker" alias ddeploy="~/.venv/ddeploy/bin/ddeploy" # docker common commands @@ -21,7 +21,11 @@ function dsr() { } function rundoc() { - rocker --home --user --nvidia --x11 --ssh --git --volume /dev/video0:/dev/video0 --privileged --name melodic --network host devenv:melodic $1 + rocker --home --user --nvidia --pulse --x11 --ssh --git --volume /dev/video0:/dev/video0 --privileged --name melodic --network host devenv:melodic $1 +} + +function docrun() { + rocker --nvidia --pulse --x11 --privileged --name odin_robot --network host odin_robot:melodic $1 } function runmelodic() { @@ -55,3 +59,24 @@ function datkinetic() { function runpythonsyntax(){ rocker --home --name python_syntax tecnalia-docker-dev.artifact.tecnalia.com/docker:git } + +#DOCKER +alias dexec='f(){ docker exec -w /root/ --detach-keys="ctrl-@" -e DISPLAY=$DISPLAY -it $1 /bin/bash -c "terminator --no-dbus"; unset -f f; }; f' +alias dexec_nt='f(){ docker exec --detach-keys="ctrl-@" -e DISPLAY=$DISPLAY -it $1 /bin/bash ; unset -f f; }; f' +alias dstart='f(){ docker start $1; dexec $1; unset -f f; }; f' +# Run using same X and .ssh folder +alias drun='f(){ docker run -it -e DISPLAY=$DISPLAY --detach-keys="ctrl-@" -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/.ssh:/root/.ssh:ro -v ~/docker_share/:/root/docker_share/ --net=host --name $2 $1; unset -f f; }; f' +alias drun_nvidia='f(){ docker run -it --name $2 --privileged \ + --net=host \ + --env=NVIDIA_VISIBLE_DEVICES=all \ + --env=NVIDIA_DRIVER_CAPABILITIES=all \ + --env=DISPLAY \ + --env=QT_X11_NO_MITSHM=1 \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + --gpus all \ + --device /dev/snd \ + -e NVIDIA_VISIBLE_DEVICES=0 \ + --detach-keys="ctrl-@" \ + -v ~/.ssh:/root/.ssh:ro \ + -v ~/docker_share/:/root/docker_share/ \ + $1 /bin/bash; unset -f f; }; f' diff --git a/dotfiles/ros.bash b/dotfiles/ros.bash index 0645734..539f229 100644 --- a/dotfiles/ros.bash +++ b/dotfiles/ros.bash @@ -2,37 +2,43 @@ # ROS ################################################################### -alias sourcekinetic='source /opt/ros/kinetic/setup.bash' -alias sourcemelodic='source /opt/ros/melodic/setup.bash' -alias sourcenoetic='source /opt/ros/noetic/setup.bash' +export ROS_DISTRO=noetic -# Source the current workspace, replacing any previous repo sourcing commands -alias sourcethis='unset CMAKE_PREFIX_PATH;source ./devel/setup.bash' +ext=$(basename ${SHELL}) -# Automatic return to your last-sourced catkin root directory -alias roshome='cd $(echo $CMAKE_PREFIX_PATH | cut -d ':' -f 1);cd ..' - -# Automatic catkin_make from any folder (use in conjunction with the above one-liner) -cb() { - (roshome && exec catkin build --summarize "$@") +# Source rosmon +function smon(){ + source /opt/ros/${ROS_DISTRO}/etc/catkin/profile.d/50-rosmon.${ext} } -# Clean workspace (delete the generated folders, then catkin build) -alias cbclean='(roshome && rm -rf build devel install && cb)' - -# Change the format of ROS console output. This way you can get rid of the annoying timestamp. -# The total list of items you can add to this format string is available here. As of the time this article was written, the options were: -# severity message time thread logger file line function -export ROSCONSOLE_FORMAT='[${severity}] ${message}' +# Source the current workspace +function sourcethis(){ + source ./devel/setup.${ext} && smon +} -# Export a package config, helps with finding some manually installed packages -export PKG_CONFIG_PATH=/home/andres/.local/lib/pkgconfig/:$PKG_CONFIG_PATH +# Automatic catkin build +function cb() { + catkin build --summarize "$@" +} -memaster() { - export ROS_MASTER_URI=http://localhost:11311/ - export ROS_IP=127.0.0.1 +# Clean workspace (delete the generated folders, then catkin build) +function cbclean(){ + roscd && cd .. && rm -rf build devel install && cb } -cib(){ - catkin init && catkin config --extend /opt/ros/melodic && catkin build +function cib(){ + catkin init && catkin config --extend /opt/ros/${ROS_DISTRO} && catkin build } + +# If terminal starts in a ws, auto source it (useful for vscode) +pwd_bck=${PWD} +cropped=${PWD#${HOME}/ros/${ROS_DISTRO}/} +WS_name=${cropped%%/*} +WS_path=${HOME}/ros/${ROS_DISTRO}/${WS_name} +FILE=${WS_path}/devel/setup.${ext} +if [[ -f $FILE ]]; then + cd ${WS_path} + source $FILE + smon + cd ${pwd_bck} +fi diff --git a/dotfiles/system.bash b/dotfiles/system.bash new file mode 100644 index 0000000..ff8b431 --- /dev/null +++ b/dotfiles/system.bash @@ -0,0 +1,7 @@ +# Manual aliases +alias ll='lsd -lh --group-dirs=first' +alias la='lsd -a --group-dirs=first' +alias l='lsd --group-dirs=first' +alias lla='lsd -lha --group-dirs=first' +alias ls='lsd --group-dirs=first' +alias cat='bat' diff --git a/notes/ABEEE b/notes/ABEEE new file mode 100644 index 0000000..1e16190 --- /dev/null +++ b/notes/ABEEE @@ -0,0 +1,65 @@ +02/24/2022 +Danial +Panagoitis + +Dismantling batteries + +Robotic capabilities to handling batteries + +Use case +TRL 5-6 +RIA + +Jon -- + +Smart handling technologies IA in background +Recycling + +Outcomes: +1- High level reconfigurable and Perseption technologies focused on the environment +2- Dexterous resources +3- Increase productivity, optimize the results + +Prodution line + +Security +Recycling + +Target cicycling? +Dircharging +cell full battery pack + +Lost types of battery shapes, sizes +Discuss + +Remove risk in dismantling task +Cells +measure voltaje temperature to open the cells + +focuss on some type of batteries + +Depending on the requirements of the batteries choose the robot + +-------- + +Generic solution for different scenarios + +How to handling in a clever way different parts + +-------- + +Organize the WP + +Others WP typical from European projects +WP low level -- sensors +WP high level -- assembly secuence generator +WP Optimization -- teachin by demos tration + +Currently some ideas + +-------- + +Partner yet have to be contacted + +Raúl Monday +Kuka + diff --git a/notes/notas b/notes/notas index 1b73128..6a22c40 100644 --- a/notes/notas +++ b/notes/notas @@ -1,17 +1,5 @@ -# flange_H^tool transformation - fHt_pose_x = Column(Float,default=0.0) - fHt_pose_y = Column(Float,default=0.0) - fHt_pose_z = Column(Float,default=0.0) - fHt_roll = Column(Float,default=0.0) - fHt_pitch = Column(Float,default=0.0) - fHt_yaw = Column(Float,default=0.0) - # flange_H^cam transformation - # tf_fHc_pose_x = Column(Float,default=0.0) - # tf_fHc_pose_y = Column(Float,default=0.0) - # tf_fHc_pose_z = Column(Float,default=0.0) - # tf_fHc_roll = Column(Float,default=0.0) - # tf_fHc_pitch = Column(Float,default=0.0) - # tf_fHc_yaw = Column(Float,default=0.0) + +python-gobject -- GitLab