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

Update README

parent ebe5053e
No related branches found
No related tags found
No related merge requests found
# Development Environment
Scripts and setups my devel setup # ROS development environment
A set of configuration files to generate docker images for development in ROS. The aim of this project is to provide a development environment that can be used in any ROS distribution, sharing your home directory with the container.
## Installation
To use these configuration files some prerequisites must be met.
```bash
git clone git@git.code.tecnalia.com:andres.montano/development_environment.git
```
### Rocker
[**rocker**](https://github.com/osrf/rocker) is a tool to run docker images with customized local support injected for things like nvidia video cards support.
#### rocker installation
```bash
sudo apt-get install python3-rocker
```
#### OYR (off-your-rocker) pluging for rocker
[**OYR**](https://github.com/sloretz/off-your-rocker) is a plugin for rocker that allows to run docker images with extra parameteers and configurations.
In this project OYR is used to launch a docker container with a named volume, not supported by rocker.
```bash
pip3 install git+https://github.com/sloretz/off-your-rocker.git
```
## Usage/Examples
### Before generate a docker image
The dockerfile allows the installation of package dependencies for the workspace these could be ROS packages or python packages, installed with apt-get or pip. Packages are defined in a requirements.txt file at ws_dependencies folder, the file name is defined by the ROS_DISTRO (e.g. ./ws_dependencies/melodic_requirements.txt).
Requirements.txt file example:
```bash
# APT-GET PACKAGES
# Base
python3-catkin-tools
ipython3
python-is-python3
python3-click
python3-numpy
python3-osrf-pycommon
python3-vcstool
python3-pip
clangd
liblldb-dev
libllvm-ocaml-dev
# Neurondones
ros-noetic-libpcan
ros-noetic-moveit-ros-move-group
ros-noetic-moveit-fake-controller-manager
ros-noetic-moveit-kinematics
ros-noetic-moveit-planners-ompl
ros-noetic-moveit-ros-visualization
ros-noetic-moveit-setup-assistant
ros-noetic-ros-control
ros-noetic-ros-controllers
# PIP PACKAGES
pyk4a
# EOF
```
**TIP** To obtain the dependencies list for you workspace you can use the command `rosdep check --from-paths src --ignore-src`
If some extra libs are needed, they can be added in extra_libs folder, where a common_libs.txt file is located jointly with ROS_DISTRO_libs.txt files. These libs are packages downloaded and installed in the docker image during the build process. Therefore, files containing urls with links to the sources of the libs.
Example of common_libs.txt file:
```bash
# List with links to additional libraries to install in devenv image
# bat-musl
https://github.com/sharkdp/bat/releases/download/v0.24.0/bat-musl_0.24.0_amd64.deb
# lsd-musl
https://github.com/lsd-rs/lsd/releases/download/v1.0.0/lsd-musl_1.0.0_amd64.deb
# ripgrep
https://github.com/BurntSushi/ripgrep/releases/download/14.1.0/ripgrep_14.1.0-1_amd64.deb
```
### TECNALIA login info
An auth.conf file with TECNALIA login info is required to add access to the Tecnalia's artifactory repository.
```bash
machine https://artifact.tecnalia.com/artifactory/tecnalia-robotics-debian
login USER@tecnalia.com
password AVERYLONGPASSWORDGENERATEDBYTOKENINARTIFACTORY
```
### dotfiles
#### docker.sh
dotfile with useful commands to simplify the docker use.
Useful commands:
```bash
Usage: dockbuild <ROS_DISTRO> [build_args]
ROS_DISTRO: Ros distribution. e.g. melodic, noetic, humble, etc.
build_args:
--shell: shell to use in the container. e.g. bash or zsh
Without build_args, default shell: zsh
```
```bash
Usage: dockrun <ROS_DISTRO> [options]
ROS_DISTRO:
melodic, noetic, humble, etc.
Options:
--ws: path to workspace. e.g. odin_ws
--share: resource to share with the container, e.g. video, pcan or dev
--shell: shell to use in the container. By default zsh
--parse: parse_args to use in the container, e.g. --oyr-spacenav.
By default none
Examples:
dockrun humble --ws mairon_ws
dockrun noetic --ws neurondones_ws --share pcan
dockrun melodic --ws odinrobot_ws --share video --shell bash
```
```bash
Usage: dockexec <ROS_DISTRO> [options]
ROS_DISTRO: Ros distribution. e.g. melodic, noetic, humble, etc.
options:
--ws: path to workspace. e.g. odin_ws
--shell: shell to use in the container. e.g. bash or zsh
Example:
dockexec noetic --ws neurondones_ws --shell bash
```
## Authors
- [@andres.montano](https://git.code.tecnalia.com/andres.montano)
## Feedback
If you have any feedback or suggestions about this project, please reach out to me by teams at or open an [issue](https://git.code.tecnalia.com/andres.montano/development_environment/-/issues) at the project repository.
...@@ -61,13 +61,13 @@ RUN apt-get install -y \ ...@@ -61,13 +61,13 @@ RUN apt-get install -y \
&& pip3 install sqlite_utils \ && pip3 install sqlite_utils \
&& pip3 install transforms3d && pip3 install transforms3d
# RUN if [ "$ROS_DISTRO" = "noetic" ]; \ RUN if [ "$ROS_DISTRO" = "noetic" ]; \
# then \ then \
# pip3 install conan==1.59 \ pip3 install conan==1.59 \
# && conan config set general.revisions_enabled=1 \ && conan config set general.revisions_enabled=1 \
# && conan profile new default --detect > /dev/null \ && conan profile new default --detect > /dev/null \
# && conan profile update settings.compiler=gcc default; \ && conan profile update settings.compiler=gcc default; \
# fi fi
# Install zsh if requested # Install zsh if requested
RUN if [ "$EXT_SHELL" = "zsh" ]; \ RUN if [ "$EXT_SHELL" = "zsh" ]; \
...@@ -128,15 +128,15 @@ RUN if [ -f "common_libs.txt" ]; \ ...@@ -128,15 +128,15 @@ RUN if [ -f "common_libs.txt" ]; \
fi fi
# Workaround for Azure Kinect # Workaround for Azure Kinect
# RUN if [ "$ROS_DISTRO" = "noetic" ]; \ RUN if [ "$ROS_DISTRO" = "noetic" ]; \
# then \ then \
# echo 'libk4a1.4 libk4a1.4/accepted-eula-hash string 0f5d5c5de396e4fee4c0753a21fee0c1ed726cf0316204edda484f08cb266d76' | debconf-set-selections \ echo 'libk4a1.4 libk4a1.4/accepted-eula-hash string 0f5d5c5de396e4fee4c0753a21fee0c1ed726cf0316204edda484f08cb266d76' | debconf-set-selections \
# && echo 'libk4abt1.0 libk4abt1.0/accepted-eula-hash string 03a13b63730639eeb6626d24fd45cf25131ee8e8e0df3f1b63f552269b176e38' | debconf-set-selections \ && echo 'libk4abt1.0 libk4abt1.0/accepted-eula-hash string 03a13b63730639eeb6626d24fd45cf25131ee8e8e0df3f1b63f552269b176e38' | debconf-set-selections \
# && wget https://raw.githubusercontent.com/microsoft/Azure-Kinect-Sensor-SDK/develop/scripts/99-k4a.rules \ && wget https://raw.githubusercontent.com/microsoft/Azure-Kinect-Sensor-SDK/develop/scripts/99-k4a.rules \
# && mkdir -p udev/rules.d \ && mkdir -p udev/rules.d \
# && mv 99-k4a.rules udev/rules.d/ \ && mv 99-k4a.rules udev/rules.d/ \
# && cp --parents udev/rules.d/99-k4a.rules /etc; \ && cp --parents udev/rules.d/99-k4a.rules /etc; \
# fi fi
# Extra libs, e.g. vtk-7.1_20221201-1_amd64.deb # Extra libs, e.g. vtk-7.1_20221201-1_amd64.deb
RUN if [ -f "${ROS_DISTRO}_libs.txt" ]; \ RUN if [ -f "${ROS_DISTRO}_libs.txt" ]; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment