Skip to content

Commit 1dc8197

Browse files
committed
Fixed neo example
1 parent bd26ea9 commit 1dc8197

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

examples/neo.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
env.add(target)
5050

5151
# Set the desired end-effector pose to the location of target
52-
Tep = panda.fkine()
52+
Tep = panda.fkine(panda.q)
5353
Tep.A[:3, 3] = target.base.t
5454
Tep.A[2, 3] += 0.1
5555

@@ -58,7 +58,7 @@
5858
while not arrived:
5959

6060
# The pose of the Panda's end-effector
61-
Te = panda.fkine()
61+
Te = panda.fkine(panda.q)
6262

6363
# Transform from the end-effector to desired pose
6464
eTep = Te.inv() * Tep
@@ -83,7 +83,7 @@
8383
Q[n:, n:] = (1 / e) * np.eye(6)
8484

8585
# The equality contraints
86-
Aeq = np.c_[panda.jacobe(), np.eye(6)]
86+
Aeq = np.c_[panda.jacobe(panda.q), np.eye(6)]
8787
beq = v.reshape((6,))
8888

8989
# The inequality constraints for joint limit avoidance
@@ -108,7 +108,8 @@
108108
# object on the robot to the collision in the scene
109109
c_Ain, c_bin = panda.link_collision_damper(
110110
collision, panda.q[:n], 0.3, 0.05, 1.0,
111-
panda.link_dict['panda_link1'], panda.link_dict['panda_hand'])
111+
startlink=panda.link_dict['panda_link1'],
112+
endlink=panda.link_dict['panda_hand'])
112113

113114
# If there are any parts of the robot within the influence distance
114115
# to the collision in the scene
@@ -120,7 +121,7 @@
120121
bin = np.r_[bin, c_bin]
121122

122123
# Linear component of objective function: the manipulability Jacobian
123-
c = np.r_[-panda.jacobm().reshape((n,)), np.zeros(6)]
124+
c = np.r_[-panda.jacobm(panda.q).reshape((n,)), np.zeros(6)]
124125

125126
# The lower and upper bounds on the joint velocity and slack variable
126127
lb = -np.r_[panda.qdlim[:n], 10 * np.ones(6)]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy