From 96c7e30b72241d51acee8e68a41cc74bc82c67e9 Mon Sep 17 00:00:00 2001
From: Andres Montano <andres.montano@tecnalia.com>
Date: Tue, 9 Nov 2021 07:57:25 +0100
Subject: [PATCH] Tesseract work in progress

---
 dockerfiles/DevenvMelodic.Dockerfile     | 30 +++++++++--
 dockerfiles/DevenvNoetic.Dockerfile      | 31 +++++++++--
 dockerfiles/TesseractIgnition.Dockerfile | 65 ++++++++++++++++++++++++
 dotfiles/.zshrc                          |  4 +-
 dotfiles/docker.bash                     |  2 +-
 notes/ROS Industrial.md                  | 47 +++++++++++++++++
 6 files changed, 166 insertions(+), 13 deletions(-)
 create mode 100644 dockerfiles/TesseractIgnition.Dockerfile
 create mode 100644 notes/ROS Industrial.md

diff --git a/dockerfiles/DevenvMelodic.Dockerfile b/dockerfiles/DevenvMelodic.Dockerfile
index cabcefd..47c88c9 100644
--- a/dockerfiles/DevenvMelodic.Dockerfile
+++ b/dockerfiles/DevenvMelodic.Dockerfile
@@ -30,6 +30,7 @@ RUN apt-get -y install --no-install-recommends \
     curl \
     cmake \
     openssh-client \
+    python-pip \
     python-catkin-tools \
     python-osrf-pycommon \
     xterm \
@@ -98,7 +99,12 @@ RUN apt-get install -y \
     ros-melodic-imu-complementary-filter \
     ros-melodic-mavros-msgs \
     ros-melodic-joint-trajectory-controller \
-    python-sqlalchemy
+    ros-melodic-executive-smach-visualization \
+    ros-melodic-catkin-virtualenv \
+    python-sqlalchemy \
+    python-zmq \
+    ros-melodic-trac-ik-kinematics-plugin \
+    python3-catkin-pkg-modules
 
  # Packages installed as dependecies of botarobota
 RUN apt-get install -y \
@@ -112,7 +118,9 @@ RUN apt-get install -y \
     sqlite3
 
 RUN apt-get install -y \
-    ros-melodic-realsense2-camera
+    ros-melodic-realsense2-camera \
+    ros-melodic-eigen-conversions \
+    ros-melodic-industrial-ci
 
 RUN apt-get update \
     && apt-get upgrade ca-certificates -y
@@ -121,11 +129,23 @@ 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 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 \
+    python3-gi-cairo \
+    python3-numpy \
+    python3-pip \
+    python-pip \
+    graphviz \
+    xdot
+
+RUN python3 -m pip install xdot
 
 # Update final image
-RUN apt-get update && apt-get -y upgrade
+RUN apt-get update && apt-get -y upgrade && apt-get -y autoremove
 RUN apt-get clean
 
 # Set entrypoint
diff --git a/dockerfiles/DevenvNoetic.Dockerfile b/dockerfiles/DevenvNoetic.Dockerfile
index ded54f2..7546fc4 100644
--- a/dockerfiles/DevenvNoetic.Dockerfile
+++ b/dockerfiles/DevenvNoetic.Dockerfile
@@ -32,6 +32,7 @@ RUN apt-get -y install --no-install-recommends \
     curl \
     cmake \
     openssh-client \
+    ros-noetic-catkin \
     python3-catkin-tools \
     python3-osrf-pycommon \
     xterm \
@@ -85,14 +86,34 @@ RUN apt-get update && apt-get install -y \
     ros-noetic-rosmon \
     python3-vcstool \
     python3-pip \
-    python3-mock \
-    && rm -rf /var/lib/apt/lists/*
-
-# Update final image
-RUN apt-get update && apt-get -y upgrade
+    python3-mock
 
 RUN python3 -m pip install -U rope
 
+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 add-apt-repository ppa:ros-industrial/ppa \
+    && apt-get update && apt-get install -y \
+    taskflow
+
+# Update final image
+RUN apt-get update \
+    && apt-get -y upgrade \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
+
 # Set entrypoint
 COPY ./ros_entrypoint.sh /
 RUN chmod a+x /ros_entrypoint.sh
diff --git a/dockerfiles/TesseractIgnition.Dockerfile b/dockerfiles/TesseractIgnition.Dockerfile
new file mode 100644
index 0000000..6c1981b
--- /dev/null
+++ b/dockerfiles/TesseractIgnition.Dockerfile
@@ -0,0 +1,65 @@
+FROM ubuntu:focal
+
+# 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 \
+    xterm \
+    terminator \
+    zsh \
+    wget \
+    && rosdep init || true
+
+# Packages installed as dependecies of tesseract-ignition
+RUN sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
+RUN wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add -
+RUN apt-get update \
+    && apt install -y \
+    libignition-common3-dev \
+    libignition-common3-av-dev \
+    libignition-common3-events-dev \
+    libignition-common3-profiler-dev \
+    libignition-msgs5-dev \
+    libignition-rendering3-dev \
+    libignition-rendering3-ogre1-dev \
+    libignition-rendering3-ogre2-dev \
+    libignition-transport8-dev \
+    libignition-gui3-dev \
+    libignition-math6-eigen3-dev
+
+# Update final image
+RUN apt-get -y upgrade \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
+
+CMD ["bash"]
+
+# Switch back to dialog for any ad-hoc use of apt-get
+ENV DEBIAN_FRONTEND=
\ No newline at end of file
diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc
index d19112c..61d6b4e 100644
--- a/dotfiles/.zshrc
+++ b/dotfiles/.zshrc
@@ -9,6 +9,7 @@ export ZSH="/home/andres/.oh-my-zsh"
 # to know which specific one was loaded, run: echo $RANDOM_THEME
 # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
 ZSH_THEME="robbyrussell"
+#ZSH_THEME="avit"
 #ZSH_THEME="dst"
 #ZSH_THEME="bira"
 #ZSH_THEME="agnoster"
@@ -74,7 +75,7 @@ HIST_STAMPS="dd/mm/yyyy"
 # 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
+plugins=(git history-substring-search zsh-autosuggestions) #zsh-autosuggestions
 
 source $ZSH/oh-my-zsh.sh
 
@@ -111,4 +112,3 @@ export PATH=~/.venv/rocker_venv/bin:$PATH
 
 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 76ee296..9266b91 100644
--- a/dotfiles/docker.bash
+++ b/dotfiles/docker.bash
@@ -45,7 +45,7 @@ function drma {
 }
 
 function dat() {
-	docker exec -it melodic bash
+	docker exec -it melodic bash -c "cd ~/ros/melodic/$1 && bash"
 }
 
 function datnoetic() {
diff --git a/notes/ROS Industrial.md b/notes/ROS Industrial.md
new file mode 100644
index 0000000..8bd3333
--- /dev/null
+++ b/notes/ROS Industrial.md	
@@ -0,0 +1,47 @@
+# ROS Industrial -- Planning projects
+
+Git hub repositories for [community & partner](https://github.com/ros-industrial) and [Consirtium](https://github.com/ros-industrial-consortium) developed.
+
+## [Tesseract Robotics](https://github.com/tesseract-robotics)
+
+### [Tesseract Environment](https://github.com/tesseract-robotics/tesseract)
+
+The planning framework (Tesseract) was designed to be light weight, limiting the number of dependencies, mainly only using standard libraries like, eigen, boost, orocos and to the packages below. The core packages are ROS agnostic and have full python support.
+
+
+#### Build Instructions
+    . Clone repository into your workspace
+    . Clone the repositories in the dependencies.rosinstall file using wstool or some other method (e.g. manually git cloning them)
+    . Run rosdep install -iy --from-paths --ignore-src src
+    . Build the workspace using catkin tools, colcon, or a similar tool
+
+*NOTE:* For noetic tesseract_ext is not required. Install the following dependencies: libbullet-dev, libbullet-extras-dev and ros-noetic-fcl. Taskflow can be install using the PPA below.
+
+*NOTE:* To speed up clean build you may want to add tesseract_ext to an extended workspace.
+
+*NOTE:* Install TaskFlow from ROS-Industrial PPA.
+
+````
+RUN add-apt-repository ppa:ros-industrial/ppa \
+    apt-get update && apt-get install -y \
+    taskflow
+````
+#### [Tesseract Setup Wizard and Visualization Tools](https://snapcraft.io/tesseract-ignition)
+Snap from tesseract-ignition
+
+ros-noetic-ifopt
+sudo apt-get install bison flex
+
+### Documentation
+https://github.com/tesseract-robotics/tesseract_docs.git
+
+
+
+
+=====
+
+https://github.com/ros-industrial/fanuc.git (melodic)
+http://docs.ros.org/en/kinetic/api/moveit_tutorials/html/doc/ikfast/ikfast_tutorial.html
+
+
+
-- 
GitLab