Vive ROS package extended, based on knorth55/vive_ros
Table of Contents
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.
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
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
-
``` $ sudo apt update $ sudo apt install libglew-dev ```
-
-
$ cd ~ $ mkdir libraries $ cd libraries $ git clone https://github.com/ValveSoftware/openvr.git -b v1.3.22
-
$ cd openvr $ mkdir build $ cd build $ cmake -DCMAKE_BUILD_TYPE=Release ../ $ make
-
-
-
Download Steam latest version. You should get the file steam_latest.deb in your ~/Downloads folder
-
$ sudo apt install steam
-
$ sudo prime-select nvidia
-
$ sudo rm -r ~/.steam/steam/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libcurl*
-
-
-
$ cd ~/catkin_ws/src $ git clone https://github.com/JOiiNT-LAB/vive_ros.git $ cd .. $ catkin_make
-
-
-
$ roscore
-
<!-- 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" />
-
$ roslaunch vive_ros vive_ctrl.launch
-
$ roslaunch vive_ros vive_hmd.launch
-
The vive_ctrl node can retrieve the pose even from the Vive Trackers BUT it is fundamental to setup the trackers properly:
-
For every Vive Tracker you want to use, connect the corresponding bluetooth dongle to the computer
-
Start Steam and SteamVR
-
Go inside SteamVR menΓΉ then select: devices->pair_controllers
-
Follow the instructions on screen
-
Go inside SteamVR menu then select: devices->manage_trackers
-
Set a role for every tracker
-
Pay attention! If you select "Held in hand" you will not be able to use the controllers together with your Vive trackers
It is possible to use track the controllers without connecting the HMD, but the controllers must be connected via USB. To set this mode:
-
Enable a null (simulated) headset editing
gedit ~/.steam/steam/steamapps/common/SteamVR/resources/settings/default.vrsettings
-
Change the third line from
"requireHmd" : true
to"requireHmd" : false
-
Add
"activateMultipleDrivers" : true
-
Add the line
"forcedDriver": "null"
beneath it. -
Add the line
"enableHomeApp" : false
-
Open
default.vrsettings
$ gedit ~/.steam/steam/steamapps/common/SteamVR/drivers/null/resources/settings/default.vrsettings
-
Set
"enable": true
to enable it. -
Now launch Steam and SteamVR and then the nodes as already explained.
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
- Disconnect the HMD reboot the system, launch Steam, connect the HMD, launch SteamVR again.
- 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
- 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
- Press ctrl+alt+F3 to open a terminal, insert your credentials if needed, use the command "sudo service gdm3 restart"