Skip to content

Commit e44a2df

Browse files
committed
async problem fixed
1 parent 896fea5 commit e44a2df

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

examples/mmc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
# Add the Panda to the simulator
2323
env.add(panda)
24-
time.sleep(1)
2524

2625
# Number of joint in the panda which we are controlling
2726
n = 7

roboticstoolbox/backend/Swift/Swift.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import roboticstoolbox as rp
1111
import numpy as np
1212
import spatialmath as sm
13+
import time
1314

1415

1516
class Swift(Connector): # pragma nocover
@@ -169,6 +170,12 @@ def add(self, ob, show_robot=True, show_collision=False):
169170
robot['show_robot'] = show_robot
170171
robot['show_collision'] = show_collision
171172
id = self.swift.robot(robot)
173+
174+
loaded = False
175+
while not loaded:
176+
loaded = self.swift.is_loaded(id)
177+
time.sleep(0.1)
178+
172179
self.robots.append(ob)
173180
return id
174181
elif isinstance(ob, rp.Shape):

roboticstoolbox/robot/ERobot.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,27 +1120,27 @@ def joint_velocity_damper(self, ps=0.05, pi=0.1, n=None, gain=1.0):
11201120
:param gain: The gain for the velocity damper
11211121
:type gain: float
11221122
1123-
:returns: Ain, bin as the inequality contraints for an optisator
1123+
:returns: Ain, Bin as the inequality contraints for an optisator
11241124
:rtype: ndarray(6), ndarray(6)
11251125
'''
11261126

11271127
if n is None:
11281128
n = self.n
11291129

11301130
Ain = np.zeros((n, n))
1131-
bin = np.zeros(n)
1131+
Bin = np.zeros(n)
11321132

11331133
for i in range(n):
11341134
if self.q[i] - self.qlim[0, i] <= pi:
1135-
bin[i] = -gain * (
1135+
Bin[i] = -gain * (
11361136
((self.qlim[0, i] - self.q[i]) + ps) / (pi - ps))
11371137
Ain[i, i] = -1
11381138
if self.qlim[1, i] - self.q[i] <= pi:
1139-
bin[i] = gain * (
1139+
Bin[i] = gain * (
11401140
(self.qlim[1, i] - self.q[i]) - ps) / (pi - ps)
11411141
Ain[i, i] = 1
11421142

1143-
return Ain, bin
1143+
return Ain, Bin
11441144

11451145
# def link_collision_damper(self, links=None, col, ob, q):
11461146
# dii = 5

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