File tree Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 13
13
panda = rp .models .Panda ()
14
14
panda .q = panda .qr
15
15
16
- Tep = panda .fkine () * sm .SE3 .Tx (0.2 ) * sm .SE3 .Ty (0.2 ) * sm .SE3 .Tz (0.45 )
16
+ Tep = panda .fkine (panda . q ) * sm .SE3 .Tx (0.2 ) * sm .SE3 .Ty (0.2 ) * sm .SE3 .Tz (0.45 )
17
17
18
18
arrived = False
19
19
env .add (panda )
22
22
23
23
while not arrived :
24
24
25
- v , arrived = rp .p_servo (panda .fkine (), Tep , 1 )
26
- panda .qd = np .linalg .pinv (panda .jacobe ()) @ v
25
+ v , arrived = rp .p_servo (panda .fkine (panda . q ), Tep , 1 )
26
+ panda .qd = np .linalg .pinv (panda .jacobe (panda . q )) @ v
27
27
env .step (dt )
28
28
29
29
# Uncomment to stop the browser tab from closing
Original file line number Diff line number Diff line change 32
32
n = 7
33
33
34
34
# Set the desired end-effector pose
35
- Tep = panda .fkine () * sm .SE3 (0.3 , 0.2 , 0.3 )
35
+ Tep = panda .fkine (panda . q ) * sm .SE3 (0.3 , 0.2 , 0.3 )
36
36
37
37
arrived = False
38
38
39
39
while not arrived :
40
40
41
41
# The pose of the Panda's end-effector
42
- Te = panda .fkine ()
42
+ Te = panda .fkine (panda . q )
43
43
44
44
# The manipulator Jacobian in the end-effecotr frame
45
- Je = panda .jacobe ()
45
+ Je = panda .jacobe (panda . q )
46
46
47
47
# Calulate the required end-effector spatial velocity for the robot
48
48
# to approach the goal. Gain is set to 1.0
52
52
Y = 0.01
53
53
54
54
# The manipulability Jacobian
55
- Jm = panda .jacobm ()
55
+ Jm = panda .jacobm (panda . q )
56
56
57
57
# Project the gradient of manipulability into the null-space of the
58
58
# differential kinematics
Original file line number Diff line number Diff line change 8
8
import numpy as np
9
9
import os
10
10
11
- # Launch the simulator Swift
12
- env = rtb .backends .ROS ()
13
- env .launch (ros_master_uri = 'http://localhost:11311' )
11
+ env = rtb .backends .Swift ()
12
+ env .launch ()
14
13
15
- os .system ('rostopic list' )
14
+ r = rtb .models .UR5 ()
15
+ env .add (r )
16
+ env .hold ()
17
+
18
+ # # Launch the simulator Swift
19
+ # env = rtb.backends.ROS()
20
+ # env.launch(ros_master_uri='http://localhost:11311')
21
+
22
+ # os.system('rostopic list')
16
23
17
24
# # Create a Panda robot object
18
25
# panda = rtb.models.Panda()
You can’t perform that action at this time.
0 commit comments