WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1  
Old 10-23-2009, 11:46 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Please post the error messages you receive when calling the resetHeading() command. Also, please post the code you are using. The following code should reset the intersense heading to zero:
Code:
isense = viz.add('intersense.dle')
tracker = isense.addTracker()
tracker.resetHeading()
Reply With Quote
  #2  
Old 10-23-2009, 02:44 PM
billjarrold billjarrold is offline
Member
 
Join Date: Jul 2009
Location: San Francisco Bay Area
Posts: 39
continuation of can't reset intersense

Hi,

Thanks for your reply.

Not much progress. The code you sent me does not cause the intersense to reset to 0. Details below...

My first interpretation of your message was that I should create a new .py file. Here are the entire contents of that file......

# This file, junk-test6.py is made in response to farshizzo post
# of 2009-10-23T11:46.
import viz
viz.go()
# The above two lines were not sugested by farshizzo but
# Bill thought they were required.
isense = viz.add('intersense.dle')
tracker = isense.addTracker()
tracker.resetHeading()

....when I ran this file I got no error messages....

Specifically, to run it, I hit the f5 button. I waited for the usual "world viz, we make virtual real." or whatever it says with the ball that rocks back and forth...After that finished I counted 5 seconds. Then I hit escape. Here is the output in my console window...

************************************************** ****************************
** Loading junk-test6.py
************************************************** ****************************
intersense.dle Intersense Extension
** Load Time: 3.86 seconds
InterSense Library ver. 4.04 32-bit
Copyright 1998-2007 InterSense Inc.
http://www.intersense.com
Tel: 781-541-6330

Looking for InterSense tracking device number 1.
Please wait ...

IC2 Plus device detected


......Likke you can see, no error messages.

Next I ran my code. When the world fired up, I was again not facing 0 degress. Rather I was facing -60 or so degrees.

I was hoping that running your suggested program would cause my program to run in such a way that it would start up facing 0 degrees rather than -60 degrees.

You asked to see my code...

I am a bit squeemish about sending you my code. It is more than 1k lines long. Plus, the PI may consider it proprietary I will have to check and this will induce a time lag (see Option 2 below). I could isolate the problem in a smaller set of code that reproduces this problem but that too will take time (see Option 1 below).

....If necessary we can work out a solution to the "send you my code problem".

Now I turn to a second interpretation of your message.....

You message was unclear about whether or not I should:

(A) include your code in a completely fresh independent python script that will cause my intersense to reset it self now and remain reset on all subsequent runs of whatever programs

OR

(B) whether I shoudl include your code in my original (> 1K long) program.

....As you can see from the above I have already done (A).

In addition I also did (B). Still no luck. Read on....

When I ran the resulting script I got the following red error message text (amongst many many lines of non-red presumably normal status output).....

** ERROR: Failed to auto-detect Intersense, try specifying port number
** ERROR: Failed to create extension sensor with intersense.dle

.....Well, let me know the best next step.

Some possible next steps I see:

Option 1) take my program and produce a smaller subset of it that I can send to the worldviz list for debugging

Option 2) ask the PI if I can post our > 1K lines of code to the list

Option 3) something else.

Thanks and sorry for such a long message,

Bill
Reply With Quote
  #3  
Old 10-23-2009, 03:02 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Try the following. Place your intersense on a table and don't move it. Then run the following script and post the entire output it produces. It will connect to the intersense, print some data, then automatically exit after 5 seconds.
Code:
import viz
import vizact
viz.go()

# Connect to tracker
isense = viz.add('intersense.dle')
tracker = isense.addTracker()
tracker.resetHeading()

# Print yaw every 0.1 seconds
def PrintYaw():
	print tracker.getEuler()[0]
vizact.ontimer(0.1,PrintYaw)

# Exit after 5 seconds
vizact.ontimer(5,viz.quit)
Reply With Quote
Reply

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
Linking and Intersense Question durf Vizard 1 07-23-2009 10:09 AM
intersense with 5DT glove sjp Vizard 2 04-06-2009 07:22 AM
Intersense reset Jerry Vizard 5 08-28-2007 02:32 PM
using demo with intersense G-Chan Vizard 1 02-06-2006 02:05 PM
intersense orientation jargon Vizard 2 05-14-2005 04:55 PM


All times are GMT -7. The time now is 09:58 AM.


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