47 views

Skip to first unread message

Feb 5, 2022, 2:25:13 AM2/5/22

to Robotics & Machine Vision Toolboxes

Hi,

I try to set the limits of the joints of the UR5 robot but can't assign a value.

I use Anaconda jupyter notebook with Python 3.8.12.

I initialized a UR robot as robot and tried it with these:

print(robot.qlim)

a=np.array([[0,0,0,0,0,0],[math.pi,math.pi,math.pi,math.pi,math.pi,math.pi]])

print(a)

robot.qlim=a

a=np.array([[0,0,0,0,0,0],[math.pi,math.pi,math.pi,math.pi,math.pi,math.pi]])

print(a)

robot.qlim=a

but receive the following error:

AttributeError Traceback (most recent call last)
C:\****\AppData\Local\Temp/ipykernel_7228/2796920760.py in <module>
2 a=np.array([[0,0,0,0,0,0],[math.pi,math.pi,math.pi,math.pi,math.pi,math.pi]])
3 print(a)
----> 4 robot.qlim=a
AttributeError: can't set attribute

Can someone give me a hint what to do to set the joint limits correctly?

BR

Hannes

Feb 7, 2022, 5:06:20 AM2/7/22

to Robotics & Machine Vision Toolboxes

Hi,

BR

problem solved.

I have to assigne it to the links and not to the robot. For Link number 4:

robot.links[3].qlim=[-math.pi/2,0]

BR

Hannes

Feb 7, 2022, 5:06:24 AM2/7/22

to Robotics & Machine Vision Toolboxes

Hello,

Can you tell how did you initialized UR5 in python?

Feb 7, 2022, 9:15:42 AM2/7/22

to Robotics & Machine Vision Toolboxes

Hi umara,

for initialisation just enter:

robot = rtb.models.DH.UR5()

Reply all

Reply to author

Forward

0 new messages

Search

Clear search

Close search

Google apps

Main menu