WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-17-2014, 07:01 AM
befl0 befl0 is offline
Member
 
Join Date: Jun 2014
Posts: 13
Problem viztracker values

Hi,

I used a tracker with a vrpn. Sometimes when I do a tracker.getData() and I put it in 8 values, a mistake appears because there are " too many values to unpack" but sometimes it's working perfectly. I realy don't understand why and where I can fixed the problem. I think it's a problem of connection but I am not sure. If you can help me how to find the solution.

Thanks,
Reply With Quote
  #2  
Old 06-19-2014, 06:52 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Can you post the code you're using to access the VRPN tracker and save the data to the 8 values? Also, can you post the Vizard output and error messages?
Reply With Quote
  #3  
Old 07-14-2014, 09:08 AM
befl0 befl0 is offline
Member
 
Join Date: Jun 2014
Posts: 13
The code to access to the vrpn tracker is :

Code:
def bigAndSmall():
	while True:
		yield viztask.waitTime(0.0001)
		x, z, y, h, p, r, ang_der, ang_izq = tracker.getData()
And the error is : File "viztracker.py", line 56, in bigAndSmall
x, z, y, h, p, r, ang_der, ang_izq = tracker.getData()
ValueError: too many values to unpack
check_vrpn_cookie(): VRPN Note: minor version number doesn't match: (prefer 'vrpn: ver. 07.31', got 'vrpn: ver. 07.30 0'). This is not normally a problem.

Thanks,
Reply With Quote
  #4  
Old 07-14-2014, 11:51 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
That error means there are more than 8 values being returned. You could save the values to a list and then extract the first 8.

Code:
data = tracker.getData()
x = data[0]
Reply With Quote
  #5  
Old 07-15-2014, 02:33 AM
befl0 befl0 is offline
Member
 
Join Date: Jun 2014
Posts: 13
Hello,

Thanks for this answer, of course this is the solution.

It's working perfectly

Bérengère
Reply With Quote
Reply

Tags
tracker, viztracker

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cave Collision problem TopazFrost Vizard 2 02-13-2014 03:34 PM
Vizard problem mizutani_jun Vizard 4 01-09-2011 04:39 PM
Problem with getEuler and setEuler Sandro Holzer Vizard 6 10-21-2008 06:01 AM
onkeydown list of values Cheff Vizard 2 07-02-2008 03:00 AM
problem with female animations vmonkey Vizard 1 10-07-2005 11:36 AM


All times are GMT -7. The time now is 01:27 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC