Control Cartesio - RVIZ | Control Real Robot | Workspace |
---|---|---|
![]() |
![]() |
![]() |
The following dependencies are required to use this package:
- Docker
- NVIDIA Container Toolkit (if you are using an NVIDIA GPU)
- SteamVR (optional, you can use the joystick + cable)
- OpenVR
- Hardware:
- Vive Tracker (optional)
- Vive Joystick (optional)
- Vive Base Station (mandatory, at least one)
The easiest way to get started is to use the provided Docker image. You can find the Dockerfile in the docker
folder. To build the image, run the following command:
sh build_ros1.sh
sh build_ros2.sh
To run the development container, use the following command:
sh run_ros1_dev_docker.sh
sh run_ros2_dev_docker.sh
The easiest way to install Steam is to install through a command line. To do this, run the following command:
sudo apt install steam
Once Steam is installed, open it and log in with your account. If you don't have an account, you can create one for free. Then, go to the Steam Store and search for SteamVR. Install it. Then you need to RUN the BETA Version.
Basically you need to edit the following files:
- default.vrsettings located in Steam Directory/steamapps/common/SteamVR/drivers/null/resources/settings/default.vrsettings
- On the null driver secction replace: "enable": false to "enable": true
- default.vrsettings located in Steam Directory/steamapps/common/SteamVR/resources/settings/default.vrsettings
- On the steamvr section replace: "requireHmd": true to "requireHmd": false
- On the steamvr section replace: "forcedDriver": "" to "forcedDriver": "null"
- On the steamvr section replace: "activateMultipleDrivers": true to "activateMultipleDrivers": false
On the steamvr_config
folder there are 3 examples of this files.
Once SteamVR is installed, open it and go to the settings. In the settings, go the paired devices and pair your Vive Tracker and Vive Joystick. Once the devices are paired, you will see a small window with the devices and their status. Make sure that all devices are connected. Finally, you can close SteamVR.
It is important to calibrate the workspace before using the joystick. By calibrating the workspace, you define the limites of the tracking area. To calibrate the workspace, run the following command:
rosrun ros1_vive_controller calibrate_workspace.py
The idea is to move the joystick in every direction, with this you will create a PointCloud that represents the workspace. The recomendations it's to use RVIZ to visualize
this point cloud over the topic /workspace_pointcloud
, in this way it will be more easly to see the limits of the workspace.
Once the workspace is calibrated, you can visualize the representation of it, the convexhull and the bounding box representing the workspace ( After removing the outliers). If you feel that you should remove more outliers you can change the parameter z_threshold
on the config file.
To visualize and generate the workspace, run the following command:
cd /ros_ws/src/ros1_vive_controller/tools && python visualize_workspace.py
Finally, you can run the joystick node. With the workspace calibrated, you will fell a vibration if you are near the limits of the workspace (By default is setup to 20 cm, but can be modified on the config file). To run the joystick node, run the following command:
rosrun ros1_vive_controller joystick_node.py
The tracker node is responsible for publishing the position and orientation of the vive tracker. To run the tracker node, run the following command:
ros2 run ros2_vive_controller vive_tracker