GithubHelp home page GithubHelp logo

2b-t / docker-realtime Goto Github PK

View Code? Open in Web Editor NEW
224.0 224.0 25.0 1.52 MB

Guide on how to use Docker for real-time applications with Linux and the Ubuntu realtime-kernel/PREEMPT_RT patch with a focus on robotics with ROS and ROS 2

License: MIT License

Shell 97.63% Dockerfile 2.37%
audio-development control docker docker-compose dockerfile igh-ethercat-master linux linuxcnc preempt-rt real-time real-time-operating-system realtime realtime-audio realtime-kernel robotics ros ros2 rtos soem ubuntu

docker-realtime's People

Contributors

2b-t avatar simutisernestas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-realtime's Issues

Accessing host's adapter to run SOEM's simpletest

Hi @2b-t,

I used your configuration to get my vscode dev container up and running, but I cannot get any info from the EtherCAT slaves using SOEM's simpletest tool. No matter what I do, it's always says no slaves found. I double checked it with TwinCAT and I can definitely detect them. I always get the following:

SOEM (Simple Open EtherCAT Master)
Simple test
Starting simple test
ec_init on eth0 succeeded.
No slaves found!
End simple test, close socket
End program

I'm running Windows 10 & WSL2 with the following configuration:

devcontainer.json

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
{
	"name": "Docker PREEMPT_RT real-time",
	"dockerComposeFile": "compose.yaml",
	"service": "docker_realtime",
	"workspaceFolder": "/workspace/framework",
	"shutdownAction": "stopCompose",
	// Features to add to the dev container. More info: https://containers.dev/features.
	// "features": {},
	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	// "forwardPorts": [],
	// Use 'postCreateCommand' to run commands after the container is created.
	// "postCreateCommand": "gcc -v",
	// Configure tool-specific properties.
	// "customizations": {},
	// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
	"remoteUser": "root"
}
compose.yaml

version: "3.9"
services:
  docker_realtime:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: realtime_docker
    tty: true
    cap_add:
      - SYS_NICE
    ulimits:
      rtprio: 99
      rttime: -1
      memlock: 8428281856
    network_mode: host
    volumes:
      - ..:/workspace/framework
Dockerfile

FROM mcr.microsoft.com/devcontainers/cpp:0-ubuntu-22.04

ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="3.22.2"

# Optionally install the cmake for vcpkg
COPY ./reinstall-cmake.sh /tmp/

RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \
    chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \
    fi \
    && rm -f /tmp/reinstall-cmake.sh

# [Optional] Uncomment this section to install additional vcpkg ports.
# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install <your-port-name-here>"

# [Optional] Uncomment this section to install additional packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
    && apt-get -y install --no-install-recommends net-tools iputils-ping

Missing license

Would be nice if you could add a license for your code that allows using it (e.g. MIT)

Error in gpg verfication

Thanks for your nice script! However, there seems to be a bug in the function

function sign_kernel_and_preemptrt {

It fails for kernel 5.15 for me on a fresh install:

gpg: Can't check signature: public key not found"

It seems like the public key for the rt patch cannot be retrieved.

Igh in image

Hi @2b-t
Thank you very much for the very extensive explanation.
I was able to make get an realtime image running with a RT patched host and IGH installed on host within an hour .
I was wondering if it would be possible to include the IGH master in the image as well.
As the IGH master runs on kernel modules can these be running in a container?
Have you tried anything like this and do you think this would be at all possible?

Any advice is appreciated

Latency Threshold in the example graphs

In the Example section you have two graphs. One with docker and one without.
It seems that the test without docker has a higher latency threshold than the one with docker.
Do you perhaps know the reason why this happens? I would think that a system with docker would have a higher latency threshold.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.