Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python version error? #7

Open
JiyooonPark opened this issue Jul 16, 2021 · 2 comments
Open

python version error? #7

JiyooonPark opened this issue Jul 16, 2021 · 2 comments

Comments

@JiyooonPark
Copy link

JiyooonPark commented Jul 16, 2021

Hello,
I am trying to use this repository to use vive tracker with ROS and keep on getting errors.
I am using ubuntu 18.04 with ROS melodic.
As you know ros melodic uses python 2.7 and thus keep on giving me this error when I

roslaunch vive_tracker vive_tracker.launch

File "/home/glab/catkin_ws/src/vive_tracker/scripts/vive_tracker.py", line 6, in <module> import triad_openvr File "/home/glab/catkin_ws/src/vive_tracker/scripts/triad_openvr.py", line 3, in <module> import openvr File "/usr/local/lib/python2.7/dist-packages/openvr/__init__.py", line 2923 def getProjectionMatrix(self, eye, nearZ: float, farZ: float): ^ SyntaxError: invalid syntax [vive/vive_tracker-5] process has died [pid 11449, exit code 1, cmd /home/glab/catkin_ws/src/vive_tracker/scripts/vive_tracker.py __name:=vive_tracker __log:=/home/glab/.ros/log/1674945c-e610-11eb-be62-709cd13e9815/vive-vive_tracker-5.log]. log file: /home/glab/.ros/log/1674945c-e610-11eb-be62-709cd13e9815/vive-vive_tracker-5*.log Generating vive_world frame..........
I tried to switch my default python interpreter to python3.6 but it also didn’t work.
I also tried to use openvr 1.3.2201 which also gave me the same error...
I was wondering how you managed to run the files. Did you use python 3.5+ as ROS’s interpreter? Or am I doing something wrong?
I have been stuck here for so long.. I hope you can help me.
Thank you in advance!

@JiyooonPark
Copy link
Author

Oh, it was a simple fix. The problem was with the openvr version. The openvr 1.3.2201 was not installed properly and I had to build it from source. Thank you anyways!

@AitorMonreal
Copy link

AitorMonreal commented Aug 11, 2021

Hi @JiyooonPark , I'm facing the same issue. Can I ask, how did you build it from source? Thank you!

Edit: Answering myself:

  1. Download tar.gz from https://github.com/cmbruns/pyopenvr/releases/tag/1.3.2201
  2. cd Downloads
  3. tar -xzf pyopenvr-1.3.2201.tar.gz
  4. cd pyopenvr-1.3.2201
  5. sudo python setup.py install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants