Skip to content

Latest commit

 

History

History

lpms-ros-docker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Docker for LP-Research IMUs

Author: Tobit Flatscher (May 2023)

0. Overview

This repository contains a Docker and all the documentation required to launch a RS232/USB Life Performance Research IMU connected over USB with the Robot Operating System ROS. It was tested with a LPMS-IG1.

1. Creating a Docker

It is then important to mount /dev as a volume so that the Docker can access the hardware and allow the Docker to access the corresponding allocated devices by supplying a corresponding device_cgroup_rules.

In the docker-compose.yml this is done with the options:

    volumes:
      - /dev:/dev
    device_cgroup_rules:
      - 'c 188:* rmw'

2. Launching

Allow the container to display contents on your host machine by typing

$ xhost +local:root

Then build the Docker container with

$ docker compose -f docker-compose-gui.yml build

or directly with the devcontainer in Visual Studio Code. For Nvidia graphic cards the file docker-compose-gui-nvidia.yml in combination with the nvidia-container-runtime has to be used instead. After it is done building connect the IMU, start the container

$ docker compose -f docker-compose-gui.yml up

Open a new console and start a ROS master with

$ source /opt/ros/noetic/setup.bash 
$ roscore

Open another terminal and start the driver with

$ source /opt/ros/noetic/setup.bash 
$ rosrun openzen_sensor openzen_sensor_node

Finally start the visualization from yet another terminal inside the Docker

$ source /opt/ros/noetic/setup.bash
$ rosrun rviz rviz

Set the fixed frame to imu and display the /imu/data:

RViz preview