Skip to content

Commit 183ccdc

Browse files
author
Guodong Rong
committed
Add set_speed for Pedestrian.
1 parent 1069645 commit 183ccdc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lgsvl/agent.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2019 LG Electronics, Inc.
2+
# Copyright (c) 2019-2020 LG Electronics, Inc.
33
#
44
# This software contains code licensed as described in LICENSE.
55
#
@@ -295,6 +295,10 @@ def follow(self, waypoints, loop = False):
295295
"loop": loop,
296296
})
297297

298+
@accepts(float)
299+
def set_speed(self, speed):
300+
self.remote.command("pedestrian/set_speed", {"uid": self.uid, "speed": speed})
301+
298302
@accepts(Callable)
299303
def on_waypoint_reached(self, fn):
300304
self.remote.command("agent/on_waypoint_reached", {"uid": self.uid})

0 commit comments

Comments
 (0)