You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CARLA ignores speed values over 10 and speed values are interpreted as mp/h.
For example the value of 10 ends up at 16-17 km/h when checked inside CARLA, but a value of 20 also gets converted to ~16-17 km/h. Lower values affect the vehicle as expected, but are still interpreted as mp/h.
Neither do FollowLaneBehavior(EGO_SPEED) or do FollowLaneBehavior(20) from the example script work as expected.
param map = localPath('../../../tests/formats/opendrive/maps/CARLA/Town01.xodr')
param carla_map = 'Town01'
model scenic.simulators.carla.model
## CONSTANTS
EGO_MODEL = "vehicle.lincoln.mkz_2017"
EGO_SPEED = 15
EGO_BRAKING_THRESHOLD = 12
LEADCAR_BRAKING_THRESHOLD = 10
BRAKE_ACTION = 1.0
## DEFINING BEHAVIORS
# EGO BEHAVIOR: Follow lane, and brake after passing a threshold distance to the leading car
behavior EgoBehavior():
try:
do FollowLaneBehavior(EGO_SPEED)
interrupt when withinDistanceToAnyCars(self, EGO_BRAKING_THRESHOLD):
take SetBrakeAction(BRAKE_ACTION)
# LEAD CAR BEHAVIOR: Follow lane, and brake after passing a threshold distance to obstacle
behavior LeadingCarBehavior():
try:
do FollowLaneBehavior(20)
interrupt when withinDistanceToAnyObjs(self, LEADCAR_BRAKING_THRESHOLD):
take SetBrakeAction(BRAKE_ACTION)
## DEFINING SPATIAL RELATIONS
# make sure to put '*' to uniformly randomly select from all elements of the list, 'lanes'
lane = Uniform(*network.lanes)
obstacle = Trash on lane.centerline
leadCar = Car following roadDirection from obstacle for Range(-50, -30),
with blueprint EGO_MODEL,
with behavior LeadingCarBehavior()
ego = Car following roadDirection from leadCar for Range(-15, -10),
with blueprint EGO_MODEL,
with behavior EgoBehavior()
require (distance to intersection) > 80
terminate when ego.speed < 0.1 and (distance to obstacle) < 30
The text was updated successfully, but these errors were encountered:
Issue
CARLA ignores speed values over 10 and speed values are interpreted as mp/h.
For example the value of 10 ends up at 16-17 km/h when checked inside CARLA, but a value of 20 also gets converted to ~16-17 km/h. Lower values affect the vehicle as expected, but are still interpreted as mp/h.
Neither
do FollowLaneBehavior(EGO_SPEED)
ordo FollowLaneBehavior(20)
from the example script work as expected.Env
OS: Ubuntu 21.04
Carla: 0.9.12
Python 3.7
scenic: 2.1.0b1
Steps to reproduce
scenic example.scenic --simulate
Example script
The example script I used which is a slightly modified version from this one: https://carla.readthedocs.io/en/latest/tuto_G_scenic/
The text was updated successfully, but these errors were encountered: