File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 68
68
69
69
# import pdb; pdb.set_trace()
70
70
71
- lmbda = 1
72
- eta = 1
71
+ lmbda = 1000
72
+ eta = 1000
73
73
iters = 4
74
74
# import pdb; pdb.set_trace()
75
75
114
114
# for link in robot.links:
115
115
xyz = xx .data [0 ][:3 , - 1 ]
116
116
cost = np .sum (xyz )
117
- # print(i, qt, qe)
118
117
total_cost += cost
119
- # delta := gradient of obstacle cost in work space, (6, cdim)
120
- delta = np .concatenate ([[1 , 1 , 0 ], np .zeros (3 )])
118
+ # delta := negative gradient of obstacle cost in work space, (6, cdim)
119
+ delta = - 1 * np .concatenate ([[1 , 1 , 0 ], np .zeros (3 )])
121
120
122
121
# if t == 0:
123
122
# print(JJ.T.dot(vel).dot(prj.dot(delta) - cost * kappa))
126
125
nabla_obs [cdim * i : cdim * i + k + 1 ] += JJ .T .dot (vel ).dot (prj .dot (delta ) - cost * kappa )
127
126
except :
128
127
import pdb ; pdb .set_trace ()
129
- dxi = Ainv .dot (lmbda * nabla_smooth )
130
- # dxi = Ainv.dot(nabla_obs + lmbda * nabla_smooth)
128
+ # dxi = Ainv.dot(lmbda * nabla_smooth)
129
+ dxi = Ainv .dot (nabla_obs + lmbda * nabla_smooth )
131
130
xi -= dxi / eta
132
131
print (f"Iteration { t } total cost { total_cost } " )
133
132
You can’t perform that action at this time.
0 commit comments