File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,9 @@ def get_velocity(actor):
160
160
"""
161
161
returns the absolute velocity for the given actor
162
162
"""
163
+ if actor in CarlaDataProvider ._actor_velocity_map :
164
+ return CarlaDataProvider ._actor_velocity_map [actor ]
165
+ # Look for same actor, but stored as different python object
163
166
for key in CarlaDataProvider ._actor_velocity_map :
164
167
if key .id == actor .id :
165
168
return CarlaDataProvider ._actor_velocity_map [key ]
@@ -174,6 +177,8 @@ def get_location(actor):
174
177
"""
175
178
returns the location for the given actor
176
179
"""
180
+ if actor in CarlaDataProvider ._actor_location_map :
181
+ return CarlaDataProvider ._actor_location_map [actor ]
177
182
for key in CarlaDataProvider ._actor_location_map :
178
183
if key .id == actor .id :
179
184
return CarlaDataProvider ._actor_location_map [key ]
@@ -189,6 +194,8 @@ def get_transform(actor):
189
194
"""
190
195
returns the transform for the given actor
191
196
"""
197
+ if actor in CarlaDataProvider ._actor_transform_map :
198
+ return CarlaDataProvider ._actor_transform_map [actor ] or actor .get_transform ()
192
199
for key in CarlaDataProvider ._actor_transform_map :
193
200
if key .id == actor .id :
194
201
# The velocity location information is the entire behavior tree updated every tick
You can’t perform that action at this time.
0 commit comments