{"id":30583062,"url":"https://github.com/personalrobotics/openvr_ros_bridge","last_synced_at":"2025-10-04T18:59:00.671Z","repository":{"id":70899357,"uuid":"82601953","full_name":"personalrobotics/openvr_ros_bridge","owner":"personalrobotics","description":"Publish from openvr/windows to ROS over rosbridge","archived":false,"fork":false,"pushed_at":"2018-12-13T16:11:34.000Z","size":318,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-29T10:21:59.454Z","etag":null,"topics":["openvr","ros","vive"],"latest_commit_sha":null,"homepage":null,"language":"Terra","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/personalrobotics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-02-20T20:57:51.000Z","updated_at":"2024-09-30T16:14:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc4a40db-8694-4b6e-bdf4-94ed0df359ef","html_url":"https://github.com/personalrobotics/openvr_ros_bridge","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/personalrobotics/openvr_ros_bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personalrobotics%2Fopenvr_ros_bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personalrobotics%2Fopenvr_ros_bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personalrobotics%2Fopenvr_ros_bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personalrobotics%2Fopenvr_ros_bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/personalrobotics","download_url":"https://codeload.github.com/personalrobotics/openvr_ros_bridge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personalrobotics%2Fopenvr_ros_bridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278358483,"owners_count":25973949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openvr","ros","vive"],"created_at":"2025-08-29T08:10:07.109Z","updated_at":"2025-10-04T18:59:00.633Z","avatar_url":"https://github.com/personalrobotics.png","language":"Terra","funding_links":[],"categories":[],"sub_categories":[],"readme":"![HMD display and console output](screenshot.png?raw=true)\n\n# openvr_ros_bridge\nPublishes poses from HMD/controllers/anything trackable from OpenVR on Windows\nto ROS. It can also publish JSON to a generic websocket target, or log poses\nto a file.\n\n# Prerequisites\n\n* Windows: 64 bit windows and directx 11 support (e.g., a VR\n  capable machine)\n* Linux: 64 bit Linux with real graphics drivers (NOT MESA)\n* [optional] ROS: the [rosbridge suite](http://wiki.ros.org/rosbridge_suite)\n\n# Installation\n\nWindows: download [the binary release](https://github.com/personalrobotics/openvr_ros_bridge/releases/tag/v0.3.0)\nand unzip somewhere convenient.\n\nLinux: download the binary release. Then compile the `renderimprovements` \nbranch of [truss](https://github.com/PyryM/truss).\n\nE.g.,\n```\ngit clone --single-branch -b renderimprovements https://github.com/PyryM/truss \nmkdir build\ncd build\ncmake ..\nmake\n```\n\nThen from `dist/` copy the truss binary `truss` and the `libs/` folder\n (hopefully populated with .so files) into the directory where you extracted\n `openvr_ros_bridge`.\n\n# Usage\n\n## General / File logging\n\nSteamVR should be started before the bridge, otherwise the bridge will itself\ntry to start SteamVR, which is unreliable and may lead to a freeze or a crash.\n\n`truss url_or_filename config_script_name.t`\n\nFor example, the config script `config/default.t` will log to a text file in\ncsv format. To log to \"my_log.txt\", run\n\n`truss my_log.txt default.t`\n\n## Running without an HMD\n\nIt is possible to run without the HMD connected, if you have Vive trackers,\nor if you have paired the controllers to a Bluetooth adaptor (normally the\ncontrollers pair to the built-in Bluetooth of the HMD, which is why it must\nbe plugged in).\n\nThe [steamvr.vrsettings file](https://developer.valvesoftware.com/wiki/SteamVR/steamvr.vrsettings)\nmust be edited so that\n```\n\"requireHmd\": false,\n```\n\n## AMD Ryzen note\n\nIf you have an AMD Ryzen or other exotic CPU, you will probably need to edit\n`scripts/core/core.t` within `truss.zip` and change line 8 to:\n```lua\nlocal use_ryzen_hack = true\n```\n\n## Linux notes\n\nIf you see the message `Going to create window; if you get an LLVM crash on linux at this point, the mostly likely reason is that you are using the mesa software renderer.` and then truss crashes, then you are probably using Mesa\ndrivers. The solution is to install real drivers. You can also try to disable\nMesa/llvmpipe by setting the `DRAW_USE_LLVM` environment variable to 0.\n\nSteamVR has special requirements to run on Linux: see \n[the SteamVR Linux readme](https://github.com/ValveSoftware/SteamVR-for-Linux/blob/master/README.md).\nIn particular, you will need to invoke truss like\n```\n~/.steam/steam/ubuntu12_32/steam-runtime/run.sh ./truss [bridge options]\n```\n\n## ROS\n\nOn a machine with ROS:\n\n1. Start a roscore\n2. Launch the ros web bridge: `roslaunch rosbridge_server rosbridge_websocket.launch`\n\nOn the VR machine (can be the same as the ROS machine):\n\n1. Start SteamVR (optional, but greatly speeds up startup)\n2. In a command prompt/terminal, navigate to the openvr_ros_bridge folder\n3. In prompt run: `truss \"ws://[host]:[port]\" ros.t`. Note that the\ndefault rosbridge port is 9090, so this will look something like\n`truss \"ws://othercomp:9090\" ros.t`. (For Linux, see the note above regarding\nrunning with the Steam runtime).\n\n# Configuration\n\nConfig scripts should be placed in `scripts/config/`.\nThe file `scripts/config/default.t` contains the default configuration that will\nlog poses to a file in CSV format. By default only controllers and generic\ntrackables are logged.\n\n## File logging configuration\n\n```lua\nlocal publishers = require(\"file_publishers.t\")\nlocal config = {}\nconfig.Connection = publishers.FileConnection\nconfig.Controller = {\n  topic = \"controller_%d\",\n  publisher = publishers.Pose,\n  display = true\n}\nreturn config\n```\n\nThe file Pose publisher accepts the following additional options\n\n| Option        | Description           | Default  |\n| ------------- |---------------------- | -------- |\n| decimate      | Publish only 1 in n frames | 9 |\n| field_order   | Ordered list of fields to write to CSV | {\"time\", \"position\", \"quaternion\"} |\n| divider       | Field divider      | \",\" |\n| precision     | Numerical precision to write | 4 |\n| format        | Numerical format string (overrides precision) | \"%.4f\" |\n\n## ROS publishing configuration\n\n```lua\nlocal publishers = require(\"ros_publishers.t\")\nlocal config = {}\nconfig.Connection = publishers.ROSConnection\nconfig.Controller = {\n  topic = \"/vr/controller_%d\",\n  publisher = publishers.Pose,\n  display = true\n}\nreturn config\n```\n\nThe ROS Pose publisher accepts the following additional options\n\n| Option        | Description           | Default  |\n| ------------- |---------------------- | -------- |\n| decimate      | Publish only 1 in n frames | 9 |\n| tf_frame   | ROS TF frame to associate PoseStamped messages with | \"0\" |\n| queue_size       | Maximum ROS queue size  | 10 |\n\n\n## Visualization configuration\n\nVisualization options are independent of publishing/logging, and are specified\nin the `display` options in a configuration. Setting `display = true` uses the\ndefault visualization option, which is to just show the model. Likewise,\n`display = false` will not display anything (but will still publish if publication\noptions are set).\n\nAdditional visualization options can be included by setting `display`.\n```lua\nlocal vis = require(\"visualizers.t\")\n\nconfig.Controller = {\n  -- [...]\n  display = {vis.BasicModel(), vis.LineHistory()} -- show model and trails\n}\n```\n\nNote the slightly unconventional syntax of having to actually call/construct\nthe visualizer options, which is to allow additional options to be passed to\na specific visualizer.\n\n### LineHistory\nAdds a trail to a trackable.\n\n```lua\nvis.LineHistory({\n  history_length = 900,    -- how many points the line can have\n  decimate = 3,            -- only push a new point every n frames\n  color = {0.8, 0.3, 0.3}, -- line color, in [0,1] RGB format\n  thickness = 0.005        -- line thickness, in m\n})\n```\n\n### BasicModel\nShows a mesh model for the trackable, loaded from OpenVR.\n\n```lua\nvis.BasicModel({\n  diffuse = {0.03,0.03,0.03,1.0},   -- diffuse color\n  specular = {0.001, 0.001, 0.001}, -- specular color\n  roughness = 0.7                   -- roughness\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersonalrobotics%2Fopenvr_ros_bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpersonalrobotics%2Fopenvr_ros_bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersonalrobotics%2Fopenvr_ros_bridge/lists"}