I modified your script to work with the built-in relative transform modes. Hopefully this should work better:
Code:
import viz
viz.go()
viz.clearcolor(0.1,0.1,1)
ground = viz.add('tut_ground.wrl')
ANCHOR_POS= (0.5,1.8005,6)
bar2 = viz.add('bar.obj',pos=ANCHOR_POS)
bar = bar2.add('bar.obj')
MOVE_SPEED = 60 # degrees/sec
def UpdateBars():
if viz.iskeydown('t'):
bar.setEuler([0,MOVE_SPEED*viz.elapsed(),0],viz.REL_LOCAL)
if viz.iskeydown('b'):
bar.setEuler([0,-MOVE_SPEED*viz.elapsed(),0],viz.REL_LOCAL)
if viz.iskeydown('f'):
bar2.setEuler([MOVE_SPEED*viz.elapsed(),0,0],viz.REL_PARENT)
if viz.iskeydown('h'):
bar2.setEuler([-MOVE_SPEED*viz.elapsed(),0,0],viz.REL_PARENT)
vizact.ontimer(0,UpdateBars)