Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## V 3.1.1

* Fix min jerk trajectory computation.

## V 3.1

* Add support for connecting multiple robots to a same VREP scene.
Expand Down
2 changes: 1 addition & 1 deletion pypot/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.1.0'
__version__ = '3.1.1'
15 changes: 5 additions & 10 deletions pypot/utils/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,10 @@ def domain(self, x):
if not isinstance(x, collections.Iterable):
x = numpy.array([x])

domain = []
for d in range(len(self.durations) - 1):
d1 = []
for xi in x:
d1.append(
(xi >= self.durations[d]) & (xi < self.durations[d + 1]))
domain.append(numpy.array(d1))

return numpy.array(domain)
return numpy.array([
self.durations[0] <= xi < self.durations[1]
for xi in x
])

def test_domain(self, x):
return [((numpy.array(x) >= self.durations[i])) for i in range(len(self.durations) - 1)]
Expand All @@ -78,7 +73,7 @@ def setup(self):
self.motor.goal_position = self.goal
self.stop()
else:
self.trajs = MinimumJerkTrajectory(self.motor.present_position, self.goal, self.duration).get_generator()
self.trajs = MinimumJerkTrajectory(self.motor.goal_position, self.goal, self.duration).get_generator()
self.t0 = time.time()

def update(self):
Expand Down