Skip to content
Snippets Groups Projects
Commit f072f3dc authored by Montaño Sarria, Andres Felipe's avatar Montaño Sarria, Andres Felipe
Browse files

Single dockerfile for noetic and melodic

parent dd1e8010
No related branches found
No related tags found
No related merge requests found
ARG ROS_DISTRO
FROM osrf/ros:${ROS_DISTRO}-desktop-full
RUN echo "Building devenv for ROS" $ROS_DISTRO
# 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 update && 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
clang-format \
direnv \
git \
git-lfs \
less \
nano \
openssh-client \
terminator \
xterm \
zsh \
#
ros-${ROS_DISTRO}-catkin \
ros-${ROS_DISTRO}-plotjuggler \
ros-${ROS_DISTRO}-plotjuggler-ros \
ros-${ROS_DISTRO}-rosmon \
ros-${ROS_DISTRO}-rqt-controller-manager \
ros-${ROS_DISTRO}-rqt-joint-trajectory-controller
RUN if [ "${ROS_DISTRO}" = "noetic" ]; \
then \
apt-get -y install \
ipython3 \
python-is-python3 \
python3-catkin-tools \
python3-click \
python3-numpy \
python3-osrf-pycommon; \
elif [ "${ROS_DISTRO}" = "melodic" ]; \
then \
apt-get -y install \
ipython \
python-catkin-tools \
python-pip \
python-osrf-pycommon; \
else \
echo "Not supported version"; \
fi
# Configure system to look for debian packages in the Artifactory repository
COPY auth.conf /etc/apt/auth.conf.d/tecnalia.conf
# 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"
# 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 \
# docker-ce \
# docker-ce-cli \
# containerd.io \
# docker-compose-plugin
# Install pip3 and packages
RUN apt-get install -y \
python3-pip \
&& pip3 install sqlite_utils
# Install node for UIs
RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash \
&& apt-get install -y nodejs && npm -g install yarn
# ROS WS dependencies
RUN apt-get update && apt-get install -y \
libceres-dev \
libcomedi-dev \
libglfw3-dev \
libmodbus-dev \
python-numpy \
socat \
# ROS Distro packages
ros-${ROS_DISTRO}-ackermann-msgs \
ros-${ROS_DISTRO}-amcl \
ros-${ROS_DISTRO}-cartesian-trajectory-controller \
ros-${ROS_DISTRO}-chomp-motion-planner \
ros-${ROS_DISTRO}-collada-urdf \
ros-${ROS_DISTRO}-effort-controllers \
ros-${ROS_DISTRO}-force-torque-sensor-controller \
ros-${ROS_DISTRO}-gmapping \
ros-${ROS_DISTRO}-hector-gazebo-plugins \
ros-${ROS_DISTRO}-hector-mapping \
ros-${ROS_DISTRO}-imu-complementary-filter \
ros-${ROS_DISTRO}-imu-tools \
ros-${ROS_DISTRO}-industrial-core \
ros-${ROS_DISTRO}-industrial-robot-simulator \
ros-${ROS_DISTRO}-industrial-robot-status-controller \
ros-${ROS_DISTRO}-industrial-robot-status-interface \
ros-${ROS_DISTRO}-interactive-marker-twist-server \
ros-${ROS_DISTRO}-joint-trajectory-controller \
ros-${ROS_DISTRO}-joy \
ros-${ROS_DISTRO}-lms1xx \
ros-${ROS_DISTRO}-map-server \
ros-${ROS_DISTRO}-mavros-msgs \
ros-${ROS_DISTRO}-move-base \
ros-${ROS_DISTRO}-moveit-commander \
ros-${ROS_DISTRO}-moveit-fake-controller-manager \
ros-${ROS_DISTRO}-moveit-planners-chomp \
ros-${ROS_DISTRO}-moveit-planners-ompl \
ros-${ROS_DISTRO}-moveit-resources \
ros-${ROS_DISTRO}-moveit-ros-benchmarks \
ros-${ROS_DISTRO}-moveit-ros-move-group \
ros-${ROS_DISTRO}-moveit-ros-planning-interface \
ros-${ROS_DISTRO}-moveit-ros-visualization \
ros-${ROS_DISTRO}-moveit-ros-warehouse \
ros-${ROS_DISTRO}-moveit-setup-assistant\
ros-${ROS_DISTRO}-moveit-simple-controller-manager \
ros-${ROS_DISTRO}-moveit-visual-tools \
ros-${ROS_DISTRO}-navigation \
ros-${ROS_DISTRO}-pass-through-controllers \
ros-${ROS_DISTRO}-pilz-industrial-motion \
ros-${ROS_DISTRO}-realsense2-camera \
ros-${ROS_DISTRO}-robot-localization \
ros-${ROS_DISTRO}-ros-control \
ros-${ROS_DISTRO}-ros-control-boilerplate \
ros-${ROS_DISTRO}-ros-controllers \
ros-${ROS_DISTRO}-rosbridge-server \
ros-${ROS_DISTRO}-scaled-joint-trajectory-controller \
ros-${ROS_DISTRO}-serial \
ros-${ROS_DISTRO}-spacenav-node \
ros-${ROS_DISTRO}-speed-scaling-interface \
ros-${ROS_DISTRO}-speed-scaling-state-controller \
ros-${ROS_DISTRO}-teb-local-planner \
ros-${ROS_DISTRO}-trac-ik-kinematics-plugin \
ros-${ROS_DISTRO}-twist-controller \
ros-${ROS_DISTRO}-twist-mux \
ros-${ROS_DISTRO}-ur-client-library \
ros-${ROS_DISTRO}-ur-msgs \
ros-${ROS_DISTRO}-velocity-controllers \
ros-${ROS_DISTRO}-warehouse-ros-mongo
RUN if [ "${ROS_DISTRO}" = "noetic" ]; \
then \
apt-get -y install \
ipython3 \
python-is-python3 \
python3-catkin-tools \
python3-click \
python3-numpy \
python3-osrf-pycommon; \
elif [ "${ROS_DISTRO}" = "melodic" ]; \
then \
apt-get -y install \
ros-${ROS_DISTRO}-ar-track-alvar \
python-mock \
python-funcsigs \
python-sqlalchemy \
python3-rospkg-modules \
python3-yaml; \
else \
echo "Not supported version"; \
fi
# Update this date to re-run the image final update
LABEL image.date=01-12-2022
# Update final image
RUN apt-get update \
&& apt-get -y upgrade
# Set entrypoint
COPY ./ros_entrypoint.sh /
RUN chmod a+x /ros_entrypoint.sh
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["zsh"]
ENV ROS_DISTRO "${ROS_DISTRO}"
ENV SHELL /usr/bin/zsh
ENV RUNNING_IN_DOCKER true
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=
\ No newline at end of file
...@@ -25,26 +25,33 @@ RUN apt-get update && apt-get -y install --no-install-recommends \ ...@@ -25,26 +25,33 @@ RUN apt-get update && apt-get -y install --no-install-recommends \
git \ git \
git-lfs \ git-lfs \
nano \ nano \
less \
clang-format \ clang-format \
direnv \ direnv \
xterm \ xterm \
terminator \ terminator \
zsh \ zsh \
# #
ros-${ROS_DISTRO}-catkin \ ipython \
ros-${ROS_DISTRO}-rosmon \
ros-${ROS_DISTRO}-plotjuggler-ros \
python-catkin-tools \ python-catkin-tools \
python-numpy \ python-numpy \
python-osrf-pycommon \ python-osrf-pycommon \
ipython ros-${ROS_DISTRO}-catkin \
ros-${ROS_DISTRO}-plotjuggler \
ros-${ROS_DISTRO}-plotjuggler-ros \
ros-${ROS_DISTRO}-rosmon \
ros-${ROS_DISTRO}-rqt-controller-manager \
ros-${ROS_DISTRO}-rqt-joint-trajectory-controller
# Install docker-ce # Install docker-ce
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - # RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository \ # RUN add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" # "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
RUN apt-get update && apt-get -y install --no-install-recommends \ # RUN apt-get update && apt-get -y install --no-install-recommends \
docker-ce-cli # docker-ce \
# docker-ce-cli \
# containerd.io \
# docker-compose-plugin
# && rm -rf /var/lib/apt/lists/* # && rm -rf /var/lib/apt/lists/*
# Configure system to look for debian packages in the Artifactory repository # Configure system to look for debian packages in the Artifactory repository
......
...@@ -32,26 +32,28 @@ RUN apt-get update && apt-get -y install --no-install-recommends \ ...@@ -32,26 +32,28 @@ RUN apt-get update && apt-get -y install --no-install-recommends \
terminator \ terminator \
zsh \ zsh \
# #
ipython3 \
python-is-python3 \
python3-catkin-tools \
python3-click \
python3-numpy \
python3-osrf-pycommon \
ros-${ROS_DISTRO}-catkin \ ros-${ROS_DISTRO}-catkin \
ros-${ROS_DISTRO}-plotjuggler \ ros-${ROS_DISTRO}-plotjuggler \
ros-${ROS_DISTRO}-plotjuggler-ros \ ros-${ROS_DISTRO}-plotjuggler-ros \
ros-${ROS_DISTRO}-rosmon \ ros-${ROS_DISTRO}-rosmon \
python3-catkin-tools \ ros-${ROS_DISTRO}-rqt-controller-manager \
python3-osrf-pycommon \ ros-${ROS_DISTRO}-rqt-joint-trajectory-controller
python3-numpy \
python3-click \
python-is-python3 \
ipython3
# Install docker-ce # Install docker-ce
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - # RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository \ # RUN add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" # "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
RUN apt-get update && apt-get -y install \ # RUN apt-get update && apt-get -y install \
docker-ce \ # docker-ce \
docker-ce-cli \ # docker-ce-cli \
containerd.io \ # containerd.io \
docker-compose-plugin # docker-compose-plugin
# Configure system to look for debian packages in the Artifactory repository # Configure system to look for debian packages in the Artifactory repository
# ARG USER_API_KEY_ARTIFACTS_TECNALIA # ARG USER_API_KEY_ARTIFACTS_TECNALIA
...@@ -74,6 +76,7 @@ RUN apt-get update && apt-get install -y \ ...@@ -74,6 +76,7 @@ RUN apt-get update && apt-get install -y \
libcomedi-dev \ libcomedi-dev \
libglfw3-dev \ libglfw3-dev \
libmodbus-dev \ libmodbus-dev \
python-numpy \
ros-${ROS_DISTRO}-ackermann-msgs \ ros-${ROS_DISTRO}-ackermann-msgs \
ros-${ROS_DISTRO}-amcl \ ros-${ROS_DISTRO}-amcl \
ros-${ROS_DISTRO}-cartesian-trajectory-controller \ ros-${ROS_DISTRO}-cartesian-trajectory-controller \
...@@ -85,11 +88,15 @@ RUN apt-get update && apt-get install -y \ ...@@ -85,11 +88,15 @@ RUN apt-get update && apt-get install -y \
ros-${ROS_DISTRO}-hector-gazebo-plugins \ ros-${ROS_DISTRO}-hector-gazebo-plugins \
ros-${ROS_DISTRO}-hector-mapping \ ros-${ROS_DISTRO}-hector-mapping \
ros-${ROS_DISTRO}-imu-complementary-filter \ ros-${ROS_DISTRO}-imu-complementary-filter \
ros-${ROS_DISTRO}-imu-tools \
ros-${ROS_DISTRO}-industrial-core \
ros-${ROS_DISTRO}-industrial-robot-simulator \ ros-${ROS_DISTRO}-industrial-robot-simulator \
ros-${ROS_DISTRO}-industrial-robot-status-controller \ ros-${ROS_DISTRO}-industrial-robot-status-controller \
ros-${ROS_DISTRO}-industrial-robot-status-interface \ ros-${ROS_DISTRO}-industrial-robot-status-interface \
ros-${ROS_DISTRO}-interactive-marker-twist-server \
ros-${ROS_DISTRO}-joint-trajectory-controller \ ros-${ROS_DISTRO}-joint-trajectory-controller \
ros-${ROS_DISTRO}-joy \ ros-${ROS_DISTRO}-joy \
ros-${ROS_DISTRO}-lms1xx \
ros-${ROS_DISTRO}-map-server \ ros-${ROS_DISTRO}-map-server \
ros-${ROS_DISTRO}-mavros-msgs \ ros-${ROS_DISTRO}-mavros-msgs \
ros-${ROS_DISTRO}-move-base \ ros-${ROS_DISTRO}-move-base \
...@@ -116,6 +123,7 @@ RUN apt-get update && apt-get install -y \ ...@@ -116,6 +123,7 @@ RUN apt-get update && apt-get install -y \
ros-${ROS_DISTRO}-ros-controllers \ ros-${ROS_DISTRO}-ros-controllers \
ros-${ROS_DISTRO}-rosbridge-server \ ros-${ROS_DISTRO}-rosbridge-server \
ros-${ROS_DISTRO}-scaled-joint-trajectory-controller \ ros-${ROS_DISTRO}-scaled-joint-trajectory-controller \
ros-${ROS_DISTRO}-serial \
ros-${ROS_DISTRO}-spacenav-node \ ros-${ROS_DISTRO}-spacenav-node \
ros-${ROS_DISTRO}-speed-scaling-interface \ ros-${ROS_DISTRO}-speed-scaling-interface \
ros-${ROS_DISTRO}-speed-scaling-state-controller \ ros-${ROS_DISTRO}-speed-scaling-state-controller \
...@@ -140,9 +148,7 @@ RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash \ ...@@ -140,9 +148,7 @@ RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash \
# Update final image # Update final image
RUN apt-get update \ RUN apt-get update \
&& apt-get -y upgrade \ && apt-get -y upgrade
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set entrypoint # Set entrypoint
COPY ./ros_entrypoint.sh / COPY ./ros_entrypoint.sh /
......
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
name = Andres Montano name = Andres Montano
email = andres.montano@tecnalia.com email = andres.montano@tecnalia.com
[credential] [credential]
helper = cache --timeout=3600 helper = "!f() { /home/andres/.vscode-server/bin/6261075646f055b99068d3688932416f2346dd3b/node /tmp/vscode-remote-containers-3d8c92443114dbc6ada6ba17c8fe7a517dcf20fc.js $*; }; f"
...@@ -9,9 +9,10 @@ alias dimp="docker image prune" ...@@ -9,9 +9,10 @@ alias dimp="docker image prune"
# Run container with rocker # Run container with rocker
# usage: rundock {noetic, melodic} [{remodel_ws, odin_ws}] [cmd] # usage: rundock {noetic, melodic} [{remodel_ws, odin_ws}] [cmd]
# To share docker --volume /var/run/docker.sock:/var/run/docker.sock:ro
function rundock() { function rundock() {
cd ~/ros/$1/$2; cd ~/ros/$1/$2;
rocker --home --user --ssh --git --privileged --nvidia --x11 --volume /var/run/docker.sock:/var/run/docker.sock:ro --network host --name $1 devenv:$1 $3 rocker --home --ssh --git --user --nvidia --x11 --network host --name $1 devenv:$1 $3
} }
# Execute container, move to workspace, and source SHELL # Execute container, move to workspace, and source SHELL
...@@ -40,7 +41,7 @@ function drmui(){ ...@@ -40,7 +41,7 @@ function drmui(){
# usage: dockbuild {noetic, melodic} # usage: dockbuild {noetic, melodic}
function dockbuild(){ function dockbuild(){
cd ~/srcs/development_environment/dockerfiles; cd ~/srcs/development_environment/dockerfiles;
docker build -t devenv:$1 --build-arg USER_API_KEY_ARTIFACTS_TECNALIA="$(cat ~/.ssh/user_api_key_artifacts_tecnalia)" -f $1.Dockerfile . docker build -t devenv:$1 --build-arg ROS_DISTRO=$1 -f devenv.Dockerfile .
} }
# function runpythonsyntax(){ # function runpythonsyntax(){
......
...@@ -40,7 +40,7 @@ function sourceros(){ ...@@ -40,7 +40,7 @@ function sourceros(){
# Source the current workspace # Source the current workspace
function sourcethis(){ function sourcethis(){
pwd_st=${PWD} pwd_st=${PWD}
roshome && source ./devel/setup.${ext} && smon roshome && sourcews
cd ${pwd_st} cd ${pwd_st}
} }
...@@ -58,16 +58,16 @@ function cbclean(){ ...@@ -58,16 +58,16 @@ function cbclean(){
roshome && rm -rf build devel install && catkin build --summarize --cmake-args -DCMAKE_BUILD_TYPE=Release roshome && rm -rf build devel install && catkin build --summarize --cmake-args -DCMAKE_BUILD_TYPE=Release
} }
# Initialize catkin workspace, configure and build it
function cib(){
catkin init && catkin config --extend /opt/ros/${ROS_DISTRO} && catkin build --summarize --cmake-args -DCMAKE_BUILD_TYPE=Release
}
# Run ci locally # Run ci locally
function runci(){ function runci(){
rosrun industrial_ci run_ci ROS_DISTRO="$@" DOCKER_IMAGE=tecnalia-robotics-docker.artifact.tecnalia.com/flexbotics-base-devel:"$@" rosrun industrial_ci run_ci ROS_DISTRO="$@" DOCKER_IMAGE=tecnalia-robotics-docker.artifact.tecnalia.com/flexbotics-base-devel:"$@"
} }
# Initialize catkin workspace, configure and build it
function cib(){
catkin init && catkin config --extend /opt/ros/${ROS_DISTRO} && catkin build --summarize
}
# If terminal starts in a ws, auto source it (useful for vscode) # If terminal starts in a ws, auto source it (useful for vscode)
if [ -z ${ROS_DISTRO+x} ]; then ; if [ -z ${ROS_DISTRO+x} ]; then ;
else else
......
# IK Plugin MoveIt
kinematics::KinematicsBase
## KinematicsBase
kinematics::KinematicsBase
The KinematicsBase interface enables you, to:
- write your own forward and inverse kinematic solvers
- wrap external kinematic solver libraries
### Interface Description
The well documented interface is located here <https://github.com/ros-planning/moveit/blob/3464e3d27bd8655aa6187ca5d3a031a4f72663e2/moveit_core/kinematics_base/include/moveit/kinematics_base/kinematics_base.h>.
### Concrete Implementations
Examples for implementations of the KinematicsBase are
- the KDL plugin: header <https://github.com/ros-planning/moveit/blob/master/moveit_kinematics/kdl_kinematics_plugin/include/moveit/kdl_kinematics_plugin/kdl_kinematics_plugin.h>, cpp <https://github.com/ros-planning/moveit/blob/master/moveit_kinematics/kdl_kinematics_plugin/src/kdl_kinematics_plugin.cpp>
- the SrvKinematicsPlugin: header <https://github.com/ros-planning/moveit/blob/master/moveit_kinematics/srv_kinematics_plugin/include/moveit/srv_kinematics_plugin/srv_kinematics_plugin.h>, cpp <https://github.com/ros-planning/moveit/blob/master/moveit_kinematics/srv_kinematics_plugin/src/srv_kinematics_plugin.cpp>
...@@ -12,3 +12,28 @@ ...@@ -12,3 +12,28 @@
ur_kinematics/UR16eKinematicsPlugin ERROR ur_kinematics/UR16eKinematicsPlugin ERROR
descartes (cpability) is not compatible with bio_ik descartes (cpability) is not compatible with bio_ik
Se generó un ikfast plugin con la escena de smart3d
smart3d_manipulator_kinematics/IKFastKinematicsPlugin_manipulator
Para limitar los joints del ur, modificar el archivo:
/home/andres/ros/noetic/asai_ws/src/universal_robot/ur_description/config/ur16e/joint_limits.yaml
=> Esto no produce mejores resultados
## Closed form IK with calibration
This is an open issue in official UR repository <https://github.com/ros-industrial/universal_robot/issues/564>
As @miguel.prada suggest one option could be take the IKFast solutions as input seeds to other gradient descendent IK solver (e.g., KDL, bio_ik, track_ik, ...). The package everything in a IK_moveit_pluging.
## References
<https://robotics.stackexchange.com/questions/9152/inverse-kinematics-after-calibration>
<https://forum.universal-robots.com/t/inverse-kinematics-python/24735>
<https://github.com/ros-industrial/universal_robot/pull/414>
<https://iopscience.iop.org/article/10.1088/1742-6596/1449/1/012128>
<https://github.com/ros-industrial/universal_robot/issues/357>
<https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/issues/316>
<https://github.com/ros-industrial/universal_robot/issues/564>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment