Git Product home page Git Product logo

vive_ros's Introduction

jntlb_logo

Vive ROS package extended, based on knorth55/vive_ros

ROS Interface package for HTC Vive and Valve Index

๐Ÿ“– Table of Contents

Table of Contents
  1. โžค About The Project
  2. โžค Requirements
  3. โžค Folder Structure
  4. โžค Installation
  5. โžค Usage
  6. โžค Troubleshoot
  7. โžค Contributors

-----------------------------------------------------

๐Ÿ“ About The Project

Vive ROS package is made by two nodes:

-vive_ctrl: Publishes the hmd and controllers poses tracked by the system into a ROS topic in geometry_msgs/PoseStamped format. In addition, it publishes also the commands coming from the controller buttons. Runs at 100Hz.

-vive_hmd: Reads two topics in sensor_msgs/ImageCompressed format and stream the input image streams into the lenses of the hmd. Runs 45 Hz.

-----------------------------------------------------

โš ๏ธ Requirements

Hardware Requirements:

  • VR-Ready GPU (>= Scheda grafica NVIDIA GeForce RTX 2070 Max-Q in our case)

System Requirements:

  • OS: Ubuntu 20.04 lts, kernel: 5.11.0-27-generic
  • Nvidia GPU Drivers : >=470.57.02
  • Compiler: cmake C/CXX GNU 7.5.0
  • Framework: Ros Noetic

Software requirements:

  • libglew-dev
  • OpenVR : 1.3.22
  • Steam API: v020 | package version: 1647446817
  • SteamVR : 1.22.6 Beta version or 1.21.12

-----------------------------------------------------

๐ŸŒต Folder Structure

vive_ros
. 
|
โ”œโ”€โ”€ conf
โ”‚ย ย  โ”œโ”€โ”€ index_param.yaml
โ”‚ย ย  โ””โ”€โ”€ vive_param.yaml
|
โ”œโ”€โ”€ images
โ”‚ย ย  โ”œโ”€โ”€ controller_frame.jpg
โ”‚ย ย  โ”œโ”€โ”€ hmd_frame.jpg
โ”‚ย ย  โ”œโ”€โ”€ jntlb_logo.png
โ”‚ย ย  โ””โ”€โ”€ lighthouse_frame.jpg
|
โ”œโ”€โ”€ include
โ”‚ย ย  โ”œโ”€โ”€ hellovr_opengl_main.h
โ”‚ย ย  โ”œโ”€โ”€ hellovr_vulkan_main.h
โ”‚ย ย  โ””โ”€โ”€ vr_interface.h
|
โ”œโ”€โ”€ launch
โ”‚ย ย  โ”œโ”€โ”€ vive_ctrl.launch
โ”‚ย ย  โ”œโ”€โ”€ vive_framework.launch
โ”‚ย ย  โ””โ”€โ”€ vive_hmd.launch
|
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ vive_ctrl.cpp
โ”‚   โ”œโ”€โ”€ vive_hmd.cpp
|   โ””โ”€โ”€ vr_interface.cpp
|
โ”œโ”€โ”€ CMakeLists.txt
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ package.xml
โ””โ”€โ”€ README.md

-----------------------------------------------------

๐Ÿ‘ฉโ€๐Ÿ’ป Installation

  • GLEW OpenGL Extension Wrangler library installation:

     ```sh
     $ sudo apt update
     $ sudo apt install libglew-dev
     ```
    
  • Valve's OpenVR SDK installation:

    1. Download Valve's OpenVR SDK

      $ cd ~
      $ mkdir libraries
      $ cd libraries
      $ git clone https://github.com/ValveSoftware/openvr.git -b v1.3.22 
    2. Build the SDK

      $ cd openvr
      $ mkdir build
      $ cd build
      $ cmake -DCMAKE_BUILD_TYPE=Release ../
      $ make
  • Steam and SteamVR installation:

    1. Download Steam latest version. You should get the file steam_latest.deb in your ~/Downloads folder

    2. Run Steam

      $ sudo apt install steam
    3. Setup or log in into your Steam account and install SteamVR from the Steam store

  • Install ROS package:

    1. Install vive_ros package in the catkin_ws

      $ cd ~/catkin_ws/src
      $ git clone https://github.com/JOiiNT-LAB/vive_ros.git
      $ cd ..
      $ catkin_make

-----------------------------------------------------

โš™๏ธ Usage

  • [ATTENTION] Disconnect all the HMD cable from the computer before to turn it on, this is to avoid the pc and steamVR to recognize the HMD as an external monitor and trigger the extended display mode. We want our HMD to be in direct mode.

  • Launch ROS nodes:

    1. Start roscore:

        $ roscore
    2. Edit the launch file to select the desired VR-set and the topic names for the input video

        <!-- VALVE INDEX SPECS -->
        <arg name="interpupillar_distance" default="200.0"/>
        <arg name="cam_f" default="720"/>
      
        <!-- HTC VIVE SPECS -->
        <!-- <arg name="interpupillar_distance" default="100.0"/> -->
        <!-- <arg name="cam_f" default="600"/> -->
      
        <arg name="image_left" default="/camera/left/image_raw/compressed"/>
        <arg name="image_right" default="/camera/right/image_raw/compressed"/>
        <arg name="image_left_info" default="/camera/left/camera_info" />
        <arg name="image_right_info" default="/camera/right/camera_info" />
      
    3. Launch controllers node:

        $ roslaunch vive_ros vive_ctrl.launch
    4. Launch HMD node:

        $ roslaunch vive_ros vive_hmd.launch
    5. There is also a launcher dedicated to the Joiint Lab teleoperation framework called vive_framework launcher. It works similarly to the other launch files.

    6. The sensor frame orientations are shown in the images below, they are similar for the INDEX set. (DISCLAIMER) The origin of the reference frames drawn is not the real one.

    Alt text

    Alt text

    Alt text

  • Controllers tracking without HMD:

It is possible to use track the controllers without connecting the HMD, but the controllers must be connected via USB. To set this mode:

  1. Enable a null (simulated) headset editing

      gedit ~/.steam/steam/steamapps/common/SteamVR/resources/settings/default.vrsettings
  2. Change the third line from "requireHmd" : true to "requireHmd" : false

  3. Add "activateMultipleDrivers" : true

  4. Add the line "forcedDriver": "null" beneath it.

  5. Open default.vrsettings

      $ gedit ~/.steam/steam/steamapps/common/SteamVR/drivers/null/resources/settings/default.vrsettings
  6. Set "enable": true to enable it.

  7. Now launch Steam and SteamVR and then the nodes as already explained.

-----------------------------------------------------

โš™๏ธ Troubleshoot

A list of the most common problems found during installation and usage:

  • The system is using vulkan driver for the wrong graphic card, Force the system to use nvidia graphic card SteamVR takes the wrong Vulkan implementation. Try this:

    sudo mv /usr/share/vulkan/icd.d/intel_icd.x86_64.json /usr/share/vulkan/icd.d/intel_icd.x86_64.json.disabled
  • SteamVR use extended mode instead of direct mode

    1. Disconnect the HMD reboot the system, launch Steam, connect the HMD, launch SteamVR again.
    2. Check SteamVR is in the right version. To switch to 1.22.6 beta version: open Steam, go into library, right click on SteamVR icon, select properties, then in the BETA panel(select on the left side), search for beta
    3. Check the ubuntu 20 kernel version running "uname -r" inside a terminal. If the kernel version is not 5.11.0-27-generic try to reboot the system and select the right kernel when booting the os.
  • After selecting Ubuntu 20 in the grub the computer get stuck with black screen and blinking cursor on top-left side of the screen

    1. Press ctrl+alt+F3 to open a terminal, insert your credentials if needed, use the command "sudo service gdm3 restart"

vive_ros's People

Contributors

mariocorsanici avatar lcluz avatar jntlblv1 avatar angeloiapichino avatar varandaas avatar michelemaimeri avatar iory avatar tiagojdias avatar vmatos avatar aleduz avatar hiroishida avatar nuno-robosavvy avatar

Watchers

James Cloos avatar

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.