You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was able to install the lib and run some of the samples... I tried to create a simple animation for a RRR manipulator but I get the following error
line 106, in fkine actor_list[self.length].SetUserMatrix(transforms.np2vtk(t)) IndexError: list index out of range
I really appreciate if you can guide me... The code that I create is the following
import robopy as r
import numpy as np
from robopy import transforms as tr
a = np.transpose(np.asmatrix(np.linspace(0, 6, 500)))
b = np.transpose(np.asmatrix(np.linspace(0, 6, 500)))
c = np.transpose(np.asmatrix(np.linspace(0, 6, 500)))
@lfcastro Hope this helps, I just encountered the same error. I tracked it down to not providing enough STL files in my SerialLink. So in my case I had configured a 6 DOF robot, and only provided 6 STL files. Adding a 7th in at the beginning as link0 to represent the robot base and incrementing the remaining STL numbers resolved the problem
Hi, I was able to install the lib and run some of the samples... I tried to create a simple animation for a RRR manipulator but I get the following error
line 106, in fkine actor_list[self.length].SetUserMatrix(transforms.np2vtk(t)) IndexError: list index out of range
I really appreciate if you can guide me... The code that I create is the following
import robopy as r
import numpy as np
from robopy import transforms as tr
base = tr.trotx(-90, unit='deg')
L = r.serial_link.Revolute(0,theta=0,d=0,a=0.1,alpha=0,offset=0,qlim=(-180np.pi/180, 180np.pi/180)) #qlim=0
L2 = r.serial_link.Revolute(0,theta=0,d=0,a=0.1,alpha=0,offset=0,qlim=(-180np.pi/180, 180np.pi/180)) #qlim=0
L3 = r.serial_link.Revolute(0,theta=0,d=0,a=0.1,alpha=0,offset=0,qlim=(-180np.pi/180, 180np.pi/180)) #qlim=0
a = np.transpose(np.asmatrix(np.linspace(0, 6, 500)))
b = np.transpose(np.asmatrix(np.linspace(0, 6, 500)))
c = np.transpose(np.asmatrix(np.linspace(0, 6, 500)))
f = np.concatenate((a,b,c), axis=1)
robot = r.SerialLink([L,L2,L3],colors=[[100,100,100],[100,50,50],[100,50,50]],stl_files=['link0.stl','link1.stl','link1.stl'], q=[0,0,0],base=base)
robot.plot(f, unit='deg')
robot.animate(stances=f, frame_rate=30, unit='deg')
The text was updated successfully, but these errors were encountered: