openravepy not drawing lines when running inside a script [closed]
Hello,
I have a very simple one pendulum example. I can plot it in python with the following code I borrowed from a website and called it plotfile.py :
import openravepy
import numpy as np
if __name__ == "__main__":
env = openravepy.Environment()
env.Load('env.xml')
env.SetViewer('qtcoin')
viewer = env.GetViewer()
robot = env.GetRobots()[0]
T = robot.GetLinks()[-1].GetTransform()
colors = np.array([[1,0,0], [1,0,0]])
linelist = np.array([T[0:3,3], T[0:3,3]+1.0])
env.drawlinelist(linelist, 1, colors)
The drawlinelist from the script doesn't do anything. However, if I type
env.drawlinelist(linelist, 1, colors)
from the ipython console, the lines show up.
Any help would be greatly appreciated!!
This forum is dedicated to ROS support. OpenRAVE is not related to ROS. We do sometimes use parts of it, but I'd suggest you ask your question elsewhere (the OpenRAVE issue tracker perhaps?).