Hi everyone,
I met a strange problem. When I try to generate waypoints and visualize them. The Result is:
. It looks normal. But when I try to generate two sets of waypoints and visualize them. Something strange happened:
The generated waypoints have increased in number and become disorganized. The distances between some waypoints are even visibly uneven.
My codes are:
import carla
client = carla.Client('localhost', 2000)
client.set_timeout(60.0)
world = client.load_world('Town10HD')
map = world.get_map()
debug_helper = world.debug
mappoints= map.generate_waypoints(distance=10.0)
for mappoint in mappoints:
location = mappoint.transform.location
debug_helper.draw_point(location, size=0.1, color=carla.Color(255, 0, 0), life_time=0)
and
import carla
client = carla.Client('localhost', 2000)
client.set_timeout(60.0)
world = client.load_world('Town10HD')
map = world.get_map()
debug_helper = world.debug
mappoints= map.generate_waypoints(distance=10.0)
for mappoint in mappoints:
location = mappoint.transform.location
debug_helper.draw_point(location, size=0.1, color=carla.Color(255, 0, 0), life_time=0)
waypoints= map.generate_waypoints(distance=2.0)
for waypoint in waypoints:
location = waypoint.transform.location
debug_helper.draw_point(location, size=0.1, color=carla.Color(0, 255, 0), life_time=0)
Does anyone know what's going on here please? Thanks for your help!
Hi everyone, I met a strange problem. When I try to generate waypoints and visualize them. The Result is:
. It looks normal. But when I try to generate two sets of waypoints and visualize them. Something strange happened:
The generated waypoints have increased in number and become disorganized. The distances between some waypoints are even visibly uneven.
My codes are: import carla client = carla.Client('localhost', 2000) client.set_timeout(60.0) world = client.load_world('Town10HD') map = world.get_map() debug_helper = world.debug mappoints= map.generate_waypoints(distance=10.0) for mappoint in mappoints: location = mappoint.transform.location debug_helper.draw_point(location, size=0.1, color=carla.Color(255, 0, 0), life_time=0)
and import carla client = carla.Client('localhost', 2000) client.set_timeout(60.0) world = client.load_world('Town10HD') map = world.get_map() debug_helper = world.debug mappoints= map.generate_waypoints(distance=10.0) for mappoint in mappoints: location = mappoint.transform.location debug_helper.draw_point(location, size=0.1, color=carla.Color(255, 0, 0), life_time=0)
waypoints= map.generate_waypoints(distance=2.0) for waypoint in waypoints: location = waypoint.transform.location debug_helper.draw_point(location, size=0.1, color=carla.Color(0, 255, 0), life_time=0)
Does anyone know what's going on here please? Thanks for your help!