Sorry, one more thing....I now see that when you asked me to send the resetHeading code I had used last night, there is a much simpler way to interpret your request.
I will now follow that much simpler interpretation...
This is the simple test program last night I wrote containing resetHeading.  (You'll see I took your program and commented out the stuff I thought was not needed) My guess is that the problem is that I did not do an addTracker....farther below you will see the output to running this program (there were no errors).....
import viz
viz.go()
#Add ground
# ground = viz.add('tut_ground.wrl')
#Add intersense
PORT_INTERSENSE = 1
isense = viz.add('intersense.dls')
#Add node
#node = viz.add('marker.wrl')
#node.translate(0,1.5,4)
#viz.startlayer(viz.LINES)
#viz.vertexcolor(viz.RED)
#viz.vertex(0,0,0)
#viz.vertex(0,0.5,0)
#viz.endlayer(parent=node)
#Link sensor to node
#link = viz.link(isense,node)
#Create keyboard events
vizact.onkeydown('r',isense.reset)
#vizact.onkeydown('1',link.reset,viz.RESET_ORI_LOC  AL)
#vizact.onkeydown('2',link.reset,viz.RESET_ORI_WOR  LD)
#vizact.onkeydown('3',link.reset,viz.RESET_ORI_RAW  )
.......This is the output when I ran that program and hit 'r' key a few times waiting about 1 second in between each press of the 'r' key.....
**************************************************  ****************************
** Loading junk-test-reset5.py
**************************************************  ****************************
intersense.dls           	Intersense Driver v4.0.4
**Connected to Intersense device on port 1
  Type:     IS Precision Series 
  Model:    Unknown
  Station	State	Time	Cube  Enhancement  Sensitivity  Compass  Prediction
  1	ON	ON	1	   2		3	  2	  0
** Load Time: 3.83 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