robosavvy / vive_ros Goto Github PK
View Code? Open in Web Editor NEWROS package for publishing HTV VIVE device locations.
License: BSD 3-Clause "New" or "Revised" License
ROS package for publishing HTV VIVE device locations.
License: BSD 3-Clause "New" or "Revised" License
I am currently working on a project that uses the HTC Vive Pro headset.
Within this project, a mechanism was developed to reproduce the head movement of the user. The HTC Vive Pro is used to maintain the angular speeds for the roll, pitch and yaw axes.
However, the data sent by the headset is not neatly separated from each other. The roll and pitch axis depend on each other. This dependence is variable and depends with a trigonometric function on the angle of the yaw axis. As soon as a motion is made around the pitch axis, the data transmitted by the headset are pitch and roll speeds.
After a 90-degree rotation around the roll axis, an angular velocity for the yaw axis is transmitted when the headset is pitched.
How is it possible that the transmitted angular velocities do not depend on each other and always fit a fixed coordinate system on the headset?
Good morning!
I have successfully connected two Vive controller. May I ask if it is also possible also to connect a Vive tracker additionally or instead of one controller?
Thanks in advance!
I thought I was making good progress on getting this library working with my robot, but not just yet...
working, as I'm very excited about using lighthouse tracked objects in ROS.
I've followed the instructions on installation and believe that I've satisfied all of the prereqs correctly
OS: Ubuntu 16.04
ROS: Kinetic (though i don't believe it matter so much in this case [yet])
I've cloned the most recent master of the Valve OpenVR commit 7fa6470f2972970859f2395f1390f6d87d4b0fc3
...And compiled it successfully per this Repos Install instructions.
Note: This repo's install.md instructions point to a depricated (per that repo owner; image shown below). So I cloned the more recent upstream OpenVR.
I've cloned this repo into my ROS workspace and run 'catkin_make'
the process succeed on all of my prior dependencies but fails compiling the vive_ros components with the following error(s)
/home/rosuser/catkin_ws/src/vive_ros/src/vr_interface.cpp:26:5: error: ‘ChaperoneCalibrationState_Error_BaseStationUninitalized’ is not a member of ‘vr’
{ vr::ChaperoneCalibrationState_Error_BaseStationUninitalized, "Tracking center hasn't be calibrated for at least one of the base stations" },
^
/home/rosuser/catkin_ws/src/vive_ros/src/vr_interface.cpp:30:1: error: no matching function for call to ‘std::map<vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> >::map(<brace-enclosed initializer list>)’
};
^
In file included from /usr/include/c++/5/map:61:0,
from /home/rosuser/catkin_ws/src/vive_ros/src/vr_interface.cpp:3:
/usr/include/c++/5/bits/stl_map.h:273:9: note: candidate: template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator, const _Compare&, const allocator_type&)
map(_InputIterator __first, _InputIterator __last,
^
/usr/include/c++/5/bits/stl_map.h:273:9: note: template argument deduction/substitution failed:
/home/rosuser/catkin_ws/src/vive_ros/src/vr_interface.cpp:30:1: note: cannot convert ‘{ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved, "A base station thinks that it might have moved"}’ (type ‘<brace-enclosed initializer list>’) to type ‘const std::less<vr::ChaperoneCalibrationState>&’
};
^
In file included from /usr/include/c++/5/map:61:0,
from /home/rosuser/catkin_ws/src/vive_ros/src/vr_interface.cpp:3:
/usr/include/c++/5/bits/stl_map.h:256:9: note: candidate: template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator)
map(_InputIterator __first, _InputIterator __last)
^
/usr/include/c++/5/bits/stl_map.h:256:9: note: template argument deduction/substitution failed:
/home/rosuser/catkin_ws/src/vive_ros/src/vr_interface.cpp:30:1: note: candidate expects 2 arguments, 10 provided
};
^
In file included from /usr/include/c++/5/map:61:0,
from /home/rosuser/catkin_ws/src/vive_ros/src/vr_interface.cpp:3:
/usr/include/c++/5/bits/stl_map.h:239:9: note: candidate: template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator, const allocator_type&)
map(_InputIterator __first, _InputIterator __last,
^
/usr/include/c++/5/bits/stl_map.h:239:9: note: template argument deduction/substitution failed:
/home/rosuser/catkin_ws/src/vive_ros/src/vr_interface.cpp:30:1: note: cannot convert ‘{ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved, "A base station thinks that it might have moved"}’ (type ‘<brace-enclosed initializer list>’) to type ‘const allocator_type& {aka const std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >&}’
};
^
In file included from /usr/include/c++/5/map:61:0,
from /home/rosuser/catkin_ws/src/vive_ros/src/vr_interface.cpp:3:
/usr/include/c++/5/bits/stl_map.h:233:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::initializer_list<std::pair<const _Key, _Tp> >, const allocator_type&) [with _Key = vr::ChaperoneCalibrationState; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<vr::ChaperoneCalibrationState>; _Alloc = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >]
map(initializer_list<value_type> __l, const allocator_type& __a)
^
/usr/include/c++/5/bits/stl_map.h:233:7: note: candidate expects 2 arguments, 10 provided
/usr/include/c++/5/bits/stl_map.h:227:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::map<_Key, _Tp, _Compare, _Alloc>&&, const allocator_type&) [with _Key = vr::ChaperoneCalibrationState; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<vr::ChaperoneCalibrationState>; _Alloc = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >]
map(map&& __m, const allocator_type& __a)
^
/usr/include/c++/5/bits/stl_map.h:227:7: note: candidate expects 2 arguments, 10 provided
/usr/include/c++/5/bits/stl_map.h:223:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const std::map<_Key, _Tp, _Compare, _Alloc>&, const allocator_type&) [with _Key = vr::ChaperoneCalibrationState; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<vr::ChaperoneCalibrationState>; _Alloc = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >]
map(const map& __m, const allocator_type& __a)
^
/usr/include/c++/5/bits/stl_map.h:223:7: note: candidate expects 2 arguments, 10 provided
/usr/include/c++/5/bits/stl_map.h:219:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const allocator_type&) [with _Key = vr::ChaperoneCalibrationState; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<vr::ChaperoneCalibrationState>; _Alloc = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >]
map(const allocator_type& __a)
^
/usr/include/c++/5/bits/stl_map.h:219:7: note: candidate expects 1 argument, 10 provided
/usr/include/c++/5/bits/stl_map.h:211:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::initializer_list<std::pair<const _Key, _Tp> >, const _Compare&, const allocator_type&) [with _Key = vr::ChaperoneCalibrationState; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<vr::ChaperoneCalibrationState>; _Alloc = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >]
map(initializer_list<value_type> __l,
^
/usr/include/c++/5/bits/stl_map.h:211:7: note: candidate expects 3 arguments, 10 provided
/usr/include/c++/5/bits/stl_map.h:196:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::map<_Key, _Tp, _Compare, _Alloc>&&) [with _Key = vr::ChaperoneCalibrationState; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<vr::ChaperoneCalibrationState>; _Alloc = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >]
map(map&& __x)
^
/usr/include/c++/5/bits/stl_map.h:196:7: note: candidate expects 1 argument, 10 provided
/usr/include/c++/5/bits/stl_map.h:185:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const std::map<_Key, _Tp, _Compare, _Alloc>&) [with _Key = vr::ChaperoneCalibrationState; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<vr::ChaperoneCalibrationState>; _Alloc = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >]
map(const map& __x)
^
/usr/include/c++/5/bits/stl_map.h:185:7: note: candidate expects 1 argument, 10 provided
/usr/include/c++/5/bits/stl_map.h:174:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const _Compare&, const allocator_type&) [with _Key = vr::ChaperoneCalibrationState; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<vr::ChaperoneCalibrationState>; _Alloc = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >]
map(const _Compare& __comp,
^
/usr/include/c++/5/bits/stl_map.h:174:7: note: candidate expects 2 arguments, 10 provided
/usr/include/c++/5/bits/stl_map.h:162:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map() [with _Key = vr::ChaperoneCalibrationState; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<vr::ChaperoneCalibrationState>; _Alloc = std::allocator<std::pair<const vr::ChaperoneCalibrationState, std::__cxx11::basic_string<char> > >]
map()
^
/usr/include/c++/5/bits/stl_map.h:162:7: note: candidate expects 0 arguments, 10 provided
vive_ros/CMakeFiles/vive_node.dir/build.make:86: recipe for target 'vive_ros/CMakeFiles/vive_node.dir/src/vr_interface.cpp.o' failed
make[2]: *** [vive_ros/CMakeFiles/vive_node.dir/src/vr_interface.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:2966: recipe for target 'vive_ros/CMakeFiles/vive_node.dir/all' failed
make[1]: *** [vive_ros/CMakeFiles/vive_node.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j12 -l12" failed
Any help/pointers much apprecaited
Problem:
I have built vive_ros from source and I got some sort of path error or node error. Not sure, pretty new to ROS.
ERROR: cannot launch node of type [vive_ros/launch_servervr.sh]: vive_ros
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/opt/ros/kinetic/share
so where is the problem? I've strictly followed the installation instrucions on the install.md data.
I've read a lil bit about the catkin workspace..is it possible the reason of the problem?
This is awesome! Just a comment that steam or something else wasn't playing nice on 16.04 whereas everything on 14.04 worked nicely.
Cc: @k-okada @ishiguroJSK
Hi, do you have some code for the visualisation as presented in the yt video?
Is it done with rviz?
Thanks!
Hello, I've attempted to compile the package on windows using this tutorial to install a terminal: http://wiki.ros.org/Installation/Windows
and changing all references to linux in the CMakelists to win (and changing uint max_devices_; to int max_devices_;)
In the end everything has compiled but when linking I get this error:
MSVCRT.lib(exe_main.obj) : error LNK2019: unresolved external symbol main referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@yahxz)
Any ideas?
Thanks.
roslaunch vive_ros check_vr.launch
says:
VR Server (v1481163074)
Using breakpad crash handler
Setting breakpad minidump AppID = 250820
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Device 0 - lighthouse.LHR-7949E0FF - Vive MV by HTC - HMD - generic_hmd
Tracking Firmware Version: 1462663157 steamservices@firmware-win32 2016-05-08 FPGA 1.6/0/0
Hardware Revision: product 128 rev 2.1.0 lot 2000/0/0 0
Left Projection: left=-1.397411, right=1.247454, top=-1.473242, bottom=1.464810
Right Projection: left=-1.249054, right=1.389481, top=-1.468210, bottom=1.463295
Lens Center: (0.545358, 0.497704), (0.457423, 0.498659)
Driver lighthouse : 1 displays
Vive MV (Serial number LHR-7949E0FF)
Driver oculus : 0 displays
Driver oculus_legacy : 0 displays
Driver null : 0 displays
So I think my HTC Vive is detected correctly.
Then launching roslaunch vive_ros server_vr.launch
:
VR Server (v1481163074)
Using breakpad crash handler
Setting breakpad minidump AppID = 250820
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
...
All the ioctl (GFEATURE): Broken pipe
messages appear when launching
roslaunch vive_ros vive.launch
, which outputs:
[ INFO] [1482220723.674755948]: [VIVE] World offset: [0.000 , 0.000, 2.000] 0.000
Using breakpad crash handler
Setting breakpad minidump AppID = 338750
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
[ERROR] [1482220724.699592438]: [VIVE] VR_Init Failed.
[ INFO] [1482220724.699632668]: [VIVE] Shutting down.
Hi, this package looks like a nice package, but unfortunately it doesn't work yet for me.
I have installed it on Ubunty 16.04.7 LTS.
I followed all the steps until Launch the node: roslaunch vive_ros vive.launch
, because this node shuts down immediately.
I get 3 messages:
[INFO] [...]: [VIVE] World offset: [0.000 , 0.000 , 2.265] 0.000
[ERROR] [...]: [VIVE] s that it might have moved
[INFO] [...]: [VIVE] Shutting down.
and on the terminal where I ran roslaunch vive_ros server_vr.launch
I see the following messages:
assert_20210422144327_3.dmp[848]: error: libcurl.so: cannot open shared object file: No such file or directory
assert_20210422144327_3.dmp[848]: file ''/tmp/dumps/assert_20210422144327_3.dmp'', upload no: ''libcurl.so: cannot open shared object file: No such file or directory
What could be the problem and how do I fix this?
ROS Melodic is probably not supported by this package yet, but it seems like it could be doable if the library issues are fixed. I currently get the following error when trying to launch the vive.launch from the vulkan-dev-2018 branch with the newest OpenVR SDK (1.0.15) in ROS Melodic:
~/catkin_ws/devel/lib/vive_ros/vive_node: ~/.steam/ubuntu12_32/steam-
runtime/amd64/lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found (required by
/usr/lib/x86_64-linux-gnu/libpng16.so.16)
================================================================================
REQUIRED process [vive_node-1] has died!
process has died [pid 8603, exit code 1, cmd ~/catkin_ws/devel/lib/vive_ros/vive_node
__name:=vive_node __log:=~/.ros/log/8923e978-7451-11e8-8ce2-
4cedfb5e997e/vive_node-1.log].
log file: ~/.ros/log/8923e978-7451-11e8-8ce2-4cedfb5e997e/vive_node-1*.log
Initiating shutdown!
================================================================================
The log file is empty
I tried the solution mentioned for a similar problem (https://ubuntuforums.org/showthread.php?t=2375927), but it didn't seem to work for this particular case.
Hi,
I am trying to use vive_ros to project the video coming from a ZEDM stereo camera into an HTC Vive HMD. I am able to stream the images but the objects far from me are doubled. Does anyone know how to fix this issue? Thanks
I am trying to get the HTC vive running using vive_ros. I am facing a couple of issues:
Thank you.
Currently, all base stations 1.0 are out of stock. We are planning to buy a base station 2.0 and a tracker for our lab. Does anyone tried it and can tell us if it works? As far as I know, the tracker has to be "2018" version but it should work. I would like to be sure before buying.
Can we get the passthrough view of the front-facing dual camera?
hi
by running this command: $roslaunch vive_ros server_vr.launch
[server_vr-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
Please could you help me fixing this problem.
Hi,
I was wondering if you know how would it be possible to get the states of the trackpad and the grip button for example? Thanks
May I know if the VIVE controller can connect to PC wirelessly? Or it must require a usb cable to do so?
Appreciate any opinions!
For the current steamvr you only need to run the following command to run your code
~/.steam/ubuntu12_32/steam-runtime/run.sh devel/lib/vive_ros/vive_node
thanks a lot for this package. we are using it to compare our custom vive tracking with steamVR
Anyone could possibly explain me where "skipping incomapible... when searching for -lopenvr_api" & "cannot find -lopenvr_api" error is coming from for the "make" command? I am new to ubuntu, so I'm having some difficulties with this installation process.
I would be extremely grateful for any help.
Hey,
the tracking is working fine. But i want to fuse an image into the HMD. When I comment out #define USE_IMAGE, the node crashes. Does anyone know a current setup under Ubuntu 18.04 that works?
Ubuntu 18.04
VR Server (v1600466902)
SteamVR 1.14.16
ROS Melodic
Terminal output:
term_out.txt
I'm noticing that Ros subscribes to the topic at 120 Hz. However the topic is full of only one transform at a time. Does this mean I can only really get information on a single sensor at 20 Hz?
Daniel
Hi and thanks for your effort,
this is great. One question, if we order two base stations, a controller and link box, will it work without the headset? It seems that it is already possible to buy the accessories separately at the htc vive shop...
Thanks again for pointing us to a Vicon for $300 :), best
Vladimir Kubelka
Is it possible to use this repo without a vr headset or controllers. We want to purchase a vive tracker and four Vive 2.0 light houses to be able to localize an object.
I have installed OpenVR SDK v1.0.5 version from https://github.com/ValveSoftware/openvr for some other project. I am getting following error:
/home/baxter2/.local/share/Steam/steamapps/common/SteamVR/tools/bin/linux64/vrmonitor:
/home/baxter2/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /usr/lib/x86_64-linux-gnu/libpulse.so.0)
/home/baxter2/.local/share/Steam/steamapps/common/SteamVR/tools/bin/linux64/vrmonitor: /home/baxter2/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libgpg-error.so.0: no version information available (required by /lib/x86_64-linux-gnu/libgcrypt.so.20)
Also the detailed error is posted: https://gist.github.com/sanketrahul/10a325667ffde7100ec8058272864872
My SteamVR version: SteamVR build from January 3rd, 2017 using download_depot 250820 250823 1008772584334738762
cc: @k-okada @ishiguroJSK
The tracking of the controller works great in ros and correctly visualizes in rviz.
But - I am currently using roslibpy in ironpython in Rhinoceros (3d modelling program) and I have some issues with receiving tf messages properly. (must be a program internal networking issue). Any other rostopic is no problem - Is there a possibility to send the current pose of each controller as a rostopic rather than a tf data tree?
I would be very thankful for any hint
What is the point of creating the world_offset new_offset = new_rot*tf::Vector3(-tf_matrix[0][3], tf_matrix[2][3], -tf_matrix[1][3]);
since this shuffles and inverts the translation and rotation axes?
Hi,
Does vive_ros work with HTC-Vive-Pro-2? I tried to launch server_vr.launch, but it failed. Have you tested it with HTC-Vive-Pro-2? Thank you very much!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.