Skip to content

Auc7us/chrono-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker container with Chrono-main with ROS2 Humble and PyChrono

Installation


Pre-requisites:

1. Clone the repository

git clone https://github.com/Auc7us/chrono-docker/
Install Git LFS and
git lfs pull

2. Install Docker Engine

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

4. Install Python Venv

sudo apt update
sudo apt install python3-venv -y

Setup

  • Build the docker image

    chmod +x setup_chrono_docker.sh
    ./setup_chrono_docker.sh
    
  • Inside the container, build Chrono in the persistent mount directory on host using :

    cd ..
    chmod +x buildChronoInMount.sh
    ./buildChronoInMount.sh
    

Usage Instructions


  • Activate the pip3 virtual env to use atk

    cd chrono-docker
    source ../.chrono-env/bin/activate
    
  • To spin up and attach to the container

    atk dev -ua -s chrono -o x11 gpus
    
  • To docker compose down, build, spin up and attach to the container

    atk dev -dbua -s chrono -o x11 gpus
    
  • Understanding -dbua flags:

    • d : Stop and remove containers (docker compose down)
    • b : Build docker image (docker build)
    • u : Spin up a new docker container (docker compose up)
    • a : Attach to a running docker container (docker exec or docker attach)
  • atk is a simple wrapper around docker compose, additional information can be found here

7. Run Demos

  • Inside the container
    • Python demos
      cd ~/mountdir/chrono/src/demos/python/robot/
      python3 demo_ROBOT_Viper_Rigid.py
      
    • C++ demos
      cd ~/mountdir/chrono/build/bin/
      ./demo_ROBOT_Viper_Rigid
      

Advanced Users

  • For additional Chrono modules, edit the CMake flags in buildChronoInMount.sh

  • You can find information on building Chrono and available modules on our website

About

Easy setup for chrono inside a docker container with ROS2 and pychrono

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published