diff --git a/change-gdm-background b/change-gdm-background new file mode 100755 index 0000000000000000000000000000000000000000..0b0f3207bb84ae5413fb7fecc7e6ecdb3f1355b3 --- /dev/null +++ b/change-gdm-background @@ -0,0 +1,215 @@ +#!/usr/bin/env bash +# Autor: Thiago Silva +# Contact: thiagos.dasilva@gmail.com +# URL: https://github.com/thiggy01/change-gdm-background +# =================================================================== # + +# Check if script is run by root. +if [ "$(id -u)" -ne 0 ] ; then + echo 'This script must be run as root or with the sudo command.' + exit 1 +fi + +# Check what linux distro is being used. +distro="$(lsb_release -c | cut -f 2)" +if ! [[ "$distro" =~ (focal|groovy|hirsute) ]]; then + echo 'Sorry, this script only works with focal, groovy or hirsute distros.' + exit 1 +fi + +# Check if glib 2.0 development libraries are installed. +if [ ! -x "$(command -v glib-compile-resources)" ]; then + echo 'Additional glib 2.0 libraries need to be installed.' + read -p 'Type y or Y to proceed. Any other key to exit: ' -n 1 + if [[ "$REPLY" =~ ^[yY]$ ]]; then + apt install libglib2.0-dev-bin + else + echo "This tool can't run without required libraries" + echo "Exiting." + echo + exit 1 + fi +fi + +# Assign the default gdm theme file path. +if [ "$(lsb_release -i | awk '{print $3}')" == 'Ubuntu' ]; then + gdm3Resource=/usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource +elif [ "$(lsb_release -i | awk '{print $3}')" == 'Pop' ]; then + gdm3Resource=/usr/share/gnome-shell/theme/Pop/gnome-shell-theme.gresource +fi + +# Create a backup file of the original theme if there isn't one. +[ ! -f "$gdm3Resource"~ ] && cp "$gdm3Resource" "$gdm3Resource~" + +# Restore backup function. +restore () { +mv "$gdm3Resource~" "$gdm3Resource" +if [ "$?" -eq 0 ]; then + chmod 644 "$gdm3Resource" + echo 'GDM background sucessfully restored.' + read -p 'Do you want to restart gdm to apply change? (y/n):' -n 1 + echo + if [[ "$REPLY" =~ ^[yY]$ ]]; then + service gdm restart + else + echo 'Restart GDM service to apply change.' + exit 0 + fi +fi +} + +# Restore the original gdm3 theme. +[ "$1" == "--restore" ] && restore + +#Define main variables. +gdm3xml=$(basename "$gdm3Resource").xml +workDir="/tmp/gdm3-theme" + +# Create directories from resource list. +CreateDirs() { +for resource in `gresource list "$gdm3Resource~"`; do + resource="${resource#\/org\/gnome\/shell\/}" + if [ ! -d "$workDir"/"${resource%/*}" ]; then + mkdir -p "$workDir"/"${resource%/*}" + fi +done +} + +# Extract resources from binary file. +ExtractRes() { +for resource in `gresource list "$gdm3Resource~"`; do + gresource extract "$gdm3Resource~" "$resource" > \ + "$workDir"/"${resource#\/org\/gnome\/shell\/}" +done +} + +# Compile resources into a gresource binary file. +CompileRes() { +glib-compile-resources --sourcedir=$workDir/theme/ $workDir/theme/"$gdm3xml" +} + +# Moves the newly created resource to its default place. +MoveRes() { +mv $workDir/theme/gnome-shell-theme.gresource $gdm3Resource +} + +# Check if gresource was sucessfuly moved to its default folder. +Check() { +if [ "$?" -eq 0 ]; then +# Solve a permission change issue (thanks to @huepf from github). + chmod 644 "$gdm3Resource" + echo 'GDM background sucessfully changed.' + read -p 'Do you want to restart gdm to apply change? (y/n):' -n 1 + echo + # If change was successful apply ask for gdm restart. + if [[ "$REPLY" =~ ^[yY]$ ]]; then + service gdm restart + else + echo "Change will be applied only after restarting gdm" + echo + fi +else + # If something went wrong, restore backup file. + echo 'something went wrong.' + restore + echo 'No changes were applied.' +fi +} + +CleanUp() { + # Remove temporary directories and files. + rm -r "$workDir" + exit 0 +} + +# Test if argument is an image file. +if [[ $(file --mime-type -b "$1") == image/*g ]]; then + + # Define image variables. + gdmBgImg=$(realpath "$1") + imgFile=$(basename "$gdmBgImg") + + # Call procedures to create directories and extract resources to them. + CreateDirs + ExtractRes + + # Copy selected image to the resources directory. + cp "$gdmBgImg" "$workDir"/theme + + # Change gdm background to the image you submited. + oldBg="#lockDialogGroup \{.*?\}" + newBg="#lockDialogGroup { + background: url('resource:\/\/\/org\/gnome\/shell\/theme\/$imgFile'); + background-size: cover; }" + perl -i -0777 -pe "s/$oldBg/$newBg/s" "$workDir"/theme/gdm3.css + + # Generate gresource xml file. + echo '<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/org/gnome/shell/theme">' > "$workDir"/theme/"$gdm3xml" + for file in `gresource list "$gdm3Resource~"`; do + echo " <file>${file#\/org\/gnome/shell\/theme\/}</file>" \ + >> "$workDir"/theme/"$gdm3xml" + done + echo " <file>$imgFile</file>" >> "$workDir"/theme/"$gdm3xml" + echo ' </gresource> +</gresources>' >> "$workDir"/theme/"$gdm3xml" + + # Compile the new gresource. + CompileRes + + # Move gresource to the default place. + MoveRes + + # Check if everything was successful. + Check + + # Remove temporary files and exit. + CleanUp + +# Change background colors. +elif [[ "$1" =~ ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ ]]; then + + # Store selected background color. + BgColor="$1" + + CreateDirs + ExtractRes + + # Change gdm background to the color you submited. + oldBg="#lockDialogGroup \{.*?\}" + newBg="#lockDialogGroup { + background: $BgColor; + background-size: cover; }" + perl -i -0777 -pe "s/$oldBg/$newBg/s" "$workDir"/theme/gdm3.css + + # Generate the gresource xml file. + echo '<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/org/gnome/shell/theme">' > "$workDir"/theme/"$gdm3xml" + for file in `gresource list "$gdm3Resource~"`; do + echo " <file>${file#\/org\/gnome/shell\/theme\/}</file>" \ + >> "$workDir"/theme/"$gdm3xml" + done + echo ' </gresource> +</gresources>' >> "$workDir"/theme/"$gdm3xml" + + # Compile the new gresource. + CompileRes + + # Move gresource to the default place. + MoveRes + + # Remove temporary files and exit. + CleanUp + +else + + # If no file was submited or file submited isn't an image, + # show this message. + echo 'Image file not found or wrong color hex code.' + echo 'Please, submit a .jpg or .png image file or a valid hex code.' + echo 'Usage: sudo ./ubuntu-20.04-change-gdm-background /path/to/image.*g' + echo 'Usage: sudo ./ubuntu-20.04-change-gdm-background \#yourhexcode' + +fi diff --git a/dockerfiles/DevenvFoxy.Dockerfile b/dockerfiles/DevenvFoxy.Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..9983d21e87a4841b16dad9400daf9b91f3260383 --- /dev/null +++ b/dockerfiles/DevenvFoxy.Dockerfile @@ -0,0 +1,67 @@ +FROM osrf/ros:foxy-desktop-focal + +ENV ROS_DISTRO foxy +ENV RUNNING_IN_DOCKER true + +# 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 \ + software-properties-common \ + curl \ + gnupg-agent \ + apt-utils dialog 2>&1 \ + git \ + git-lfs \ + nano \ + less \ + xterm \ + zsh \ + && 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 + +# 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 add-apt-repository ppa:ros-industrial/ppa + +RUN apt-get update && apt-get install -y \ + taskflow + +RUN apt-get update \ + && apt-get upgrade ca-certificates -y + +# Update final image +RUN apt-get update && apt-get -y upgrade && apt-get -y autoremove +RUN apt-get clean + +# Set entrypoint +COPY ./ros_entrypoint.sh / +RUN chmod a+x /ros_entrypoint.sh + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["zsh"] +ENV SHELL /usr/bin/zsh + +# Switch back to dialog for any ad-hoc use of apt-get +ENV DEBIAN_FRONTEND= diff --git a/dockerfiles/snp_workshop.Dockerfile b/dockerfiles/snp_workshop.Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..964013e80065b90b0beabae7c086f7196df0b1f1 --- /dev/null +++ b/dockerfiles/snp_workshop.Dockerfile @@ -0,0 +1,90 @@ +ARG FROM_IMAGE=osrf/ros:foxy-desktop +ARG OVERLAY_WS=/opt/ros/snpd_ws + +# multi-stage for caching +FROM $FROM_IMAGE AS cacher + +# clone overlay source +ARG OVERLAY_WS +WORKDIR $OVERLAY_WS/src +RUN git clone https://github.com/tecnalia-advancedmanufacturing-robotics/scan_n_plan_workshop.git +RUN vcs import ./ < scan_n_plan_workshop/dependencies_tesseract.repos +RUN vcs import ./ < scan_n_plan_workshop/dependencies.repos +RUN vcs import ./ < scan_n_plan_workshop/snp_automate_2022/dependencies.repos + +# copy manifests for caching +WORKDIR /opt +RUN mkdir -p /tmp/opt && \ + find ./ -name "package.xml" | \ + xargs cp --parents -t /tmp/opt && \ + find ./ -name "COLCON_IGNORE" | \ + xargs cp --parents -t /tmp/opt || true + +# multi-stage for building +FROM $FROM_IMAGE AS builder + +# Configure apt and install packages +RUN apt-get update && apt-get -y install --no-install-recommends \ + apt-transport-https \ + apt-utils dialog 2>&1 \ + software-properties-common \ + git \ + nano \ + less \ + xterm \ + zsh \ + && rm -rf /var/lib/apt/lists/* + +# Install taskflow dependency from the ROS-I PPA +RUN add-apt-repository ppa:ros-industrial/ppa + +RUN apt-get update && apt-get install -y \ + taskflow + +# Install missing dependencies +RUN apt-get update && apt-get install -y \ + ros-foxy-control-msgs \ + ros-foxy-diagnostic-updater \ + ros-foxy-ifopt \ + ros-foxy-joint-state-publisher \ + ros-foxy-joint-state-publisher-gui \ + ros-foxy-librealsense2 \ + ros-foxy-octomap \ + ros-foxy-octomap-msgs \ + ros-foxy-ompl \ + ros-foxy-xacro \ + lcov \ + libxmlrpcpp-dev \ + libyaml-cpp-dev \ + libbullet-dev libbullet-extras-dev libbullet2.88 libbulletml-dev + +# install overlay dependencies +# finish rosdep command with true because some dependencies are not found +ARG OVERLAY_WS +WORKDIR $OVERLAY_WS +COPY --from=cacher /tmp/$OVERLAY_WS/src ./src +RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ + apt-get update && rosdep install -y \ + --from-paths \ + src \ + --ignore-src \ + || true \ + && rm -rf /var/lib/apt/lists/* + +# build overlay source +COPY --from=cacher $OVERLAY_WS/src ./src +ARG OVERLAY_MIXINS="release" +RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ + colcon build \ + --cmake-args \ + -DTESSERACT_BUILD_FCL=OFF \ + --mixin $OVERLAY_MIXINS + +# source entrypoint setup +ENV OVERLAY_WS $OVERLAY_WS +RUN sed --in-place --expression \ + '$isource "$OVERLAY_WS/install/setup.bash"' \ + /ros_entrypoint.sh + +# run launch file +CMD ["ros2", "launch", "snp_automate_2022", "start.launch.xml"] diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc index 9c90b43c36f1e988f5296dcf210d07a69d1dfaef..d7b6aa4e12361411a20d58040115fab52042425b 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/.zshrc @@ -104,7 +104,7 @@ source ${HOME}/srcs/development_environment/dotfiles/system.bash eval "$(direnv hook zsh)" -# [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh diff --git a/dotfiles/ros.bash b/dotfiles/ros.bash index e38d40282428e95dfa1f481d130a71ad9d52148b..553744ad111d920a28f98e34b2d686b8e89e775c 100644 --- a/dotfiles/ros.bash +++ b/dotfiles/ros.bash @@ -3,7 +3,7 @@ ################################################################### # Define ROS_DISTRO before source ROS -if [ -z $ROS_DISTRO ]; then export ROS_DISTRO=noetic; fi +# if [ -z $ROS_DISTRO ]; then export ROS_DISTRO=noetic; fi # Determine shell extension if [ -z $SHELL ]; then echo "SHELL not set"; else ext=$(basename ${SHELL}); fi @@ -55,15 +55,15 @@ function cib(){ } # If terminal starts in a ws, auto source it (useful for vscode) -pwd_init=${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 - cd ${pwd_init} -else - source /opt/ros/${ROS_DISTRO}/setup.${ext} -fi +#pwd_init=${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 +# cd ${pwd_init} +#else +# source /opt/ros/${ROS_DISTRO}/setup.${ext} +#fi diff --git a/iscan-bundle-2.30.4.x64.deb.tar.gz b/iscan-bundle-2.30.4.x64.deb.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d9e02992384379481da9e7d9dc5093eee005f24b Binary files /dev/null and b/iscan-bundle-2.30.4.x64.deb.tar.gz differ diff --git a/notes/00_Notes_Godel.md b/notes/00_Notes_Godel.md new file mode 100644 index 0000000000000000000000000000000000000000..0dc03d3d5843eb8e888356ca3e31f253f91fa590 --- /dev/null +++ b/notes/00_Notes_Godel.md @@ -0,0 +1,62 @@ +# Godel + +## godel_plugins + +## godel_process_planning + +## godel_process_path_generation + +## godel_msgs + +## godel_surface_detection + +<https://github.com/PointCloudLibrary/pcl/issues/410> + +>>> +It's pretty simple actually. Although the qhull dev(s) made it pretty hard to debug this due to +obfuscated code and design flaws.. At least they put a note about the solution onto their NEWS page <http://www.qhull.org/news/qhull-news.html> . +QHull now provides qh_QHpointer and global struct versions of the library as static and shared libraries each and the new libqhull.so is compiled without qh_QHpointer in 2012. +PCL detects libqhull.so and uses it as if it was compiled with qh_QHpointer aaand voila, you're in the middle of a jungle of undetected code incompatibilities.. + +I changed the library to the new "libqhull_p.so" and things work as expected. +Would be great to see this fixed in 1.7.2 :) + +This brings us to politics though... It looks like ubuntu/debian didn't care to include these qh_QHpointer shared libs in their libqhull6 packages until now. +I therefore assume pcl will only work with the static libs they provide. + +Also, it's important to fix PCLConfig.cmake.in:141. Not everyone's on Windows (why is this even "most likely" the case?) and this shared/wrong static mixup makes it even harder to see through this linking mess. + +I should get around to create a pull-request for this over the weekend.. + +>>> +Using CMake to generate the correct solution file, works definitively, but on Windows, qhullstatic_p and qhullstatic_pd must be linked, instead of qhull_p and qhull_pd, as suggested, otherwise an undefined reference on 'qh_qh' is given. + +>>> +Linking pcl to libqhullstatic.a solved it, as described above. As far as I can tell, this thread is the only explanation of this issue anywhere. + +>>> +The only solution is to use the 8.0.0 version of qhull until PCL fixes the obsolete code. + +## godel_polygon_offset + +## godel_process_execution + +## godel_openvoronoi + +Repository that contains a ROS-Industrial Godel project-specific fork of the OpenVoronoi library. +It has been converted to a ROS catkin package by adding a package manifest (`package.xml`) and a replacement build script (`CMakeLists.txt`). It has additionally been patched to provide a getter for the `MachiningGraph` member variable `g` in the `OffsetSorter` class. +Apart from these changes (and this new `README.md` file), all sources and other files have been left unchanged and are identical to those in the [source repository][]. + +## Setups + +### Melodic Ubuntu Bionic + +libqhull7:amd64 2015.2-4 +libpcl-dev 1.8.1+dfsg1-2ubuntu2.18.04.1 + +### Noetic Ubuntu Focal + +libqhull7:amd64 2015.2-4 +libpcl-dev 1.10.0+dfsg-5ubuntu1 + +-- Experimental on Docker - Noetic diff --git a/notes/noether b/notes/noether new file mode 100644 index 0000000000000000000000000000000000000000..a4e440223cb8060f3bac9cca5cdd091300d0a1fc --- /dev/null +++ b/notes/noether @@ -0,0 +1,22 @@ +2/11/2022 + +To build exmaples: + +- git: + local-name: ros_industrial_cmake_boilerplate + uri: 'https://github.com/ros-industrial/ros_industrial_cmake_boilerplate.git' + version: 0.2.8 +- git: + local-name: perception_pcl + uri: 'https://github.com/ros-perception/perception_pcl.git' + version: 1.7.1 +-git: + local-name: noether + uri: 'https://github.com/ros-industrial/noether.git' + version: 9b500301059fc9ed3cb8cffca6aa48dbe9fdbba5 + +mon launch noether_examples mesh_segmenter_server_client.launch filename:=/home/andres/ros/noetic/noether_ws/src/noether/noether_examples/data/plane_defect.ply + +mon launch noether_examples mesh_segmenter_node.launch filename:=/home/andres/ros/noetic/noether_ws/src/noether/noether_examples/data/raw_mesh.ply show_individually:=true save_outputs:=true + +mon launch noether_examples eigen_value_edge_generator_demo.launch mesh_file:=/home/andres/ros/noetic/noether_ws/src/noether/noether_examples/data/plane_defect.ply diff --git a/powerlevel10k/fonts/MesloLGS NF Bold Italic.ttf b/powerlevel10k/fonts/MesloLGS NF Bold Italic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..be059c0cb6815e8f63b99809040c1fc0b70ffdef Binary files /dev/null and b/powerlevel10k/fonts/MesloLGS NF Bold Italic.ttf differ diff --git a/powerlevel10k/fonts/MesloLGS NF Bold.ttf b/powerlevel10k/fonts/MesloLGS NF Bold.ttf new file mode 100644 index 0000000000000000000000000000000000000000..6142dd042c3d38e757f648f7a2864c73c158257f Binary files /dev/null and b/powerlevel10k/fonts/MesloLGS NF Bold.ttf differ diff --git a/powerlevel10k/fonts/MesloLGS NF Italic.ttf b/powerlevel10k/fonts/MesloLGS NF Italic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..90ca569664d9ad469fd82c9a2b2673c05400af77 Binary files /dev/null and b/powerlevel10k/fonts/MesloLGS NF Italic.ttf differ diff --git a/powerlevel10k/fonts/MesloLGS NF Regular.ttf b/powerlevel10k/fonts/MesloLGS NF Regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..e9e4de5fb0c771853d123da3c872b188caab3340 Binary files /dev/null and b/powerlevel10k/fonts/MesloLGS NF Regular.ttf differ diff --git a/srcs_list.txt b/srcs_list.txt new file mode 100644 index 0000000000000000000000000000000000000000..05b748b27fb0dd4b15007abaf66a7e27ccead428 --- /dev/null +++ b/srcs_list.txt @@ -0,0 +1,40 @@ +gdm-tools +https://github.com/realmazharhussain/gdm-tools.git + +pdfmixtool +git@gitlab.com:scarpetta/pdfmixtool.git + +plymouth-theme +https://github.com/pop-os/plymouth-theme.git + +pop-fonts +https://github.com/pop-os/fonts.git + +pop-theme +https://github.com/pop-os/gtk-theme + +vortex-ubuntu-plymouth-theme +https://github.com/emanuele-scarsella/vortex-ubuntu-plymouth-theme.git + +disk-usage-space +https://github.com/anfemosa/disk-usage-space.git + +powerlevel10k + +roscon_2015 +https://github.com/ros-industrial-consortium/roscon_2015.git + +roscon_workshop_2021 +https://github.com/ros-industrial-consortium/roscon_workshop_2021 + +ros_tutorial +https://github.com/anfemosa/ros_tutorial.git + +bat +https://github.com/sharkdp/bat.git + +iscan-bundle +https://support.epson.net/linux/en/iscan_c.php?version=2.30.4 + +lsd +https://github.com/Peltoche/lsd.git