Skip to content

SHOP4CF/shakeit

Repository files navigation

Shakeit!

shakeit_overview

Table of Contents

Setup and Start

Windows

Prerequisites

There are three main prerequisties to running this project:

  • Windows WSL
  • Docker Desktop - wsl Backend
  • VcXsrv Windows X server

Installing WSL

You can install WSL either by following the documentation or the steps written here:

  1. Run the following command in an administrator PowerShell or Windows Command Prompt
wsl --install

The first time you launch a newly installed Linux distribution, a console window will open and you'll be asked to wait for files to de-compress and be stored on your machine. All future launches should take less than a second.

If you run wsl --install and see the WSL help text, you already have WSL installed

  1. Restart your machine

Installing Docker Desktop WSL Backend

You can install Docker Desktop either by following the documentation or the steps written here:

  1. Download and install Docker Desktop (2.3.0.2 or a newer release)

  2. Start Docker desktop

  3. Go to Setting → General Skærmbillede_dockerDesktopWSL

  4. Select the Use the WSL 2 based engine checkbox

  5. Click Apply & Restart

Installing Xserver

The Xserver is used to connect to the display.

You can install Windows Xserver either by following this guide or the steps written here:

  1. Install VcXsrv Windows X Server

  2. run Xlaunch from the start menu

  3. Setup the configuration by following the steps shown in the pictures below

1 2 3 4

  1. Save the configuration file before you finish!
    • Save it to one of the following locations:
      • %appdata%\Xming
      • %userprofile%\Desktop
      • %userprofile%

Build

Clone the repository

Build the docker image using the following command:

docker build -t shakeit .

Run

Run VsXrsv server by opening the config file that was saved during installation. When an Xserver is running you can find the logo in the taskbar as shown below.

Skærmbillede_Xserver


Run the following line in Windows PowerShell to start the docker container.
$shakeip = Get-NetIPAddress -InterfaceAlias "vEthernet (WSL)" | select -exp "IPAddress"; docker run -it --rm --name shakeit -e DISPLAY=${shakeip}:0.0 shakeit ros2 launch shakeit_experiments run_sim_experiment.launch.py

If PowerShell shows the error exec /ros_entrypoint.sh: no such file or directory then:

  1. Open the ros_entrypoint.sh file loacted in root

  2. Click on CRLF and change it to LF CRLF-to-LF

  3. Rebuild image and run container again


Run with docker-compose together with moni2, remember to set DISPLAY_IP in .env and to run the command in the same folder as docker-compose.yml

docker-compose up

Requirements/dependencies

Configure ROS

In ~/.bashrc define environment variables for your ROS2 installation, e.g:

export ROS_VERSION=2
export ROS_PYTHON_VERSION=3
export ROS_DISTRO=foxy

source /opt/ros/foxy/setup.bash

Source ~/.bashrc

$ source ~/.bashrc

Install dependencies

$ cd ros_pkg_ws
$ sudo apt install python3-wstool
$ sudo apt-get install python3-rosdep2
$ rosdep update
$ wstool init src/ src/src_dependencies.rosinstall --shallow
$ rosdep install --default-yes --ignore-packages-from-source --from-path ./src

NOTE: If the rosdep update gives errors change the following export in the bashrc file (Solution found here rosdep error)

Replace the following line:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COPPELIASIM_ROOT

with the following:

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH:$COPPELIASIM_ROOT

Build

Install Colcon

sudo apt install python3-colcon-common-extensions

Check how to source Corppelia stuff: ros_pkg_ws/setup.bash_example

$ cd ros_pkg_ws
$ source setup.bash
$ colcon build

If you're not using CoppeliaSim skip the sim packages by:

colcon build --packages-skip sim_ros2_interface

Now go into the launch file and edit the path in L24 to the path of the src folder in this repo.

Pycharm

To open PyCharm with code-completion and imports working:

$ cd ros_pkg_ws
$ source setup.bash
$ pycharm

Packages

Notes

Link to sensopart camera pc-software here

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published