This is a guide to using the HTC vive headset and controllers to teleop the robot in simulation or using hardware.
- Follow the HTC Vive Installation Guide
- Install Steam and SteamVR
- Install Spartan using docker and checkout branch vive-teleop
Run the following commands to install required packages
sudo apt-get install libudev-dev libvulkan-dev libsdl2-dev libglfw3-dev libssl-dev zlib1g-dev python-pip ros-kinetic-tf ros-kinetic-tf2*
pip install openvr
Additionally, clone the OpenVR repository into a known location
The Plugin is build using catkin. You have to create a catkin workspace first. Open up a terminal and:
mkdir -p catkin_ws/src
cd catkin_ws/src
catkin_init_workspace
Next clone the RVIZ Plugin and the Controller Tracking Node into the src folder.
After cloning the RVIZ Plugin, open the CMakeLists.txt file in the rviz_vive folder and change the OpenVR path in line 30 to the location that you cloned OpenVR to.
Finally, build the plugins and source them
cd ..
catkin_make
source devel/setup.bash
- Start SteamVR and ensure that headset and controllers are tracking
- Start spartan and run simulation or robot setup through procman
- Source your catkin workspace and run
roslaunch htc_vive_teleop_stuff htc_vive_tf_and_joy.launch
- Close the instance of rviz opened by procman and start it outside the docker container
- Source your catkin workspace
- cd to your spartan folder and run
source build/setup_environment.sh
- Run
rosrun rviz rviz -d $SPARTAN_SOURCE_DIR/src/catkin_projects/station_config/RLG_iiwa_1/rviz_vive.rviz";
- Through procman start the process vive-teleop