# Driving issue when using waypoints

**URL:** <https://forum.beamng.tech/t/driving-issue-when-using-waypoints/445>\
**Category:** General\
**Tags:** sensor\
**Created:** [29 January 2026 20:50 UTC](https://forum.beamng.tech/t/driving-issue-when-using-waypoints/445 "2026-01-29T20:50:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![erick1-618](https://forum.beamng.tech/user_avatar/forum.beamng.tech/erick1-618/32/94_2.png) [@erick1-618](https://forum.beamng.tech/u/erick1-618)\
**Post date:** [29 January 2026 20:50 UTC](https://forum.beamng.tech/t/driving-issue-when-using-waypoints/445/1 "2026-01-29T20:50:50Z")

</div>

Hello!

I’ve implemented driving using waypoints, but there’s something wrong with the direction. The car does not act like a ‘traffic’ car, trespassing traffic signals, hitting others cars and more. It just gives attention to the objective, which is reaching the waypoints, and ignores the rest.

Here’s the snippet:

```auto
def main(report, use_waypoints):
...

    if use_waypoints:

        waypoints = get_coordinates_list()

        vehicle.ai.drive_using_waypoints(waypoints,

        drive_in_lane=True,

        avoid_cars=True,

        no_of_laps=1,

        route_speed= 30 / 3.6,

        route_speed_mode='limit')

    else:

        vehicle.ai.set_mode('traffic')

    vehicle.ai.set_aggression(0.3)
...

```

I wonder if there is any way to have path choices while preserving the integrity of the AI

---

<div class="post-metadata">

**Author:** ![asaeed](https://forum.beamng.tech/user_avatar/forum.beamng.tech/asaeed/32/21_2.png) [@asaeed](https://forum.beamng.tech/u/asaeed)\
**Post date:** [3 February 2026 20:02 UTC](https://forum.beamng.tech/t/driving-issue-when-using-waypoints/445/2 "2026-02-03T20:02:23Z")

</div>

Hi @erick1-618,

You’ve identified a known limitation: `drive_using_waypoints()` doesn’t respect traffic signals like `'traffic'` mode does. It’s designed for path-following, not full traffic rule compliance.

**Workarounds:**

1. **Lower aggression and conservative speeds:**

```python
vehicle.ai.drive_using_waypoints(
    waypoints,
    drive_in_lane=True,
    avoid_cars=True,
    route_speed=30 / 3.6,
    route_speed_mode='limit',
    aggression=0.2 # Lower than 0.3 for more cautious driving
)

```

1. **Use `wp_speeds` to slow down at intersections:**

```python
wp_speeds = {
    'waypoint_near_intersection': 5.0 / 3.6, # Very slow at intersections
}
vehicle.ai.drive_using_waypoints(
    waypoints,
    wp_speeds=wp_speeds,
    drive_in_lane=True,
    avoid_cars=True,
    route_speed=30 / 3.6,
    route_speed_mode='limit',
    aggression=0.2
)

```

**Note:** You’re calling `vehicle.ai.set_aggression(0.3)` separately, but `drive_using_waypoints()` already accepts an `aggression` parameter, so set it directly in the method call instead.

Unfortunately, there’s no way to combine full traffic signal compliance with waypoint navigation in the current API.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![erick1-618](https://forum.beamng.tech/user_avatar/forum.beamng.tech/erick1-618/32/94_2.png) [@erick1-618](https://forum.beamng.tech/u/erick1-618)\
**Post date:** [2 March 2026 11:11 UTC](https://forum.beamng.tech/t/driving-issue-when-using-waypoints/445/3 "2026-03-02T11:11:32Z")

</div>

Hello @asaeed!

I’ve tried another approach, using a closed circuit to avoid those issues. With the world editor tool, I put aome waypoints along the given closed circuit:

 ![WhatsApp Image 2026-03-01 at 23.55.20](https://forum.beamng.tech/uploads/default/original/1X/87b18ab672452c6511d20a50039bc67a4c8ebdd4.jpeg)

. But I have faced another problems. Calling the drive\_using\_waypoints passing the list of wps, (which I labeled p1, p2, p3 etc), the following error message is shown:

![WhatsApp Image 2026-03-01 at 23.58.58](https://forum.beamng.tech/uploads/default/original/1X/131e14be745bda0198ccebfb65b0645c24f6852f.jpeg)

---

<div class="post-metadata">

**Author:** ![asaeed](https://forum.beamng.tech/user_avatar/forum.beamng.tech/asaeed/32/21_2.png) [@asaeed](https://forum.beamng.tech/u/asaeed)\
**Post date:** [3 March 2026 07:46 UTC](https://forum.beamng.tech/t/driving-issue-when-using-waypoints/445/4 "2026-03-03T07:46:09Z")

</div>

Hello @erick1-618,  
welcome back, which World Editor tool you’ve used ?

---

<div class="post-metadata">

**Author:** ![erick1-618](https://forum.beamng.tech/user_avatar/forum.beamng.tech/erick1-618/32/94_2.png) [@erick1-618](https://forum.beamng.tech/u/erick1-618)\
**Post date:** [4 March 2026 16:19 UTC](https://forum.beamng.tech/t/driving-issue-when-using-waypoints/445/5 "2026-03-04T16:19:54Z")

</div>

Road Architect. In the image I didn’t have renderized the road yet.

---

<div class="post-metadata">

**Author:** ![asaeed](https://forum.beamng.tech/user_avatar/forum.beamng.tech/asaeed/32/21_2.png) [@asaeed](https://forum.beamng.tech/u/asaeed)\
**Post date:** [5 March 2026 22:29 UTC](https://forum.beamng.tech/t/driving-issue-when-using-waypoints/445/6 "2026-03-05T22:29:54Z")

</div>

Hello @erick1-618,

When working on a custom map with no existing roads, `drive_using_waypoints` requires a valid navgraph with `drivability > 0`. first. Alternatively you could do the following:

- **Script AI Editor** — draw or record a path in-simulation, then replay it:

```python
script = vehicle.ai.import_script_ai_file("my_path.json")
vehicle.ai.set_script(script, cling=True)

```

OR

- **`set_line`** — define positions directly in Python:

```python
vehicle.ai.set_line([{'pos': (x, y, z), 'speed': 10}, ...], cling=True)

```

Hint:  
Enable the road graph and waypoint visualisation in World Editor  
World editor → View → Visualization Settings, then make sure these two are checked:

| Setting | What it shows |
| --- | --- |
| ✅ BeamNG: Draw Waypoints | Shows all BeamNGWaypoint objects as spheres in the scene — you can see their radius (which equals their scale) and whether they overlap the road graph |
| ✅ Navgraph: Road Drivability | Draws the AI road graph — green = fully drivable, red = low drivability, no line = not in graph |

---

<div class="post-metadata">

**Author:** ![asaeed](https://forum.beamng.tech/user_avatar/forum.beamng.tech/asaeed/32/21_2.png) [@asaeed](https://forum.beamng.tech/u/asaeed)\
**Post date:** [6 March 2026 10:28 UTC](https://forum.beamng.tech/t/driving-issue-when-using-waypoints/445/7 "2026-03-06T10:28:10Z")

</div>

Hi @erick1-618,

The error **“Path between waypoints ‘DR1\_2’ - ‘p1’ Not Found”** means the AI found a road network node near your vehicle (`DR1_2`) but has no graph connection to your waypoint `p1`. The most common cause is that your waypoints are either not placed on a road network, or are using the different name from the script.

* * *

**Once the road exists, add waypoints using either method:**

- **Drive Path Editor** _(World Editor → Create → Drive Path Editor)_  
It’s recommended to Set mode to **Navgraph** mode snaps each point to the nearest navigraph node, guaranteeing path-finder connectivity.

 ![Screenshot 2026-03-07 183532](https://forum.beamng.tech/uploads/default/original/1X/28895fd99cbad2a9d740c17a34fae2aa3521a2ad.jpeg)

- **Manual placement** _(World Editor → Create Object → BeamNG → Waypoint)_  
Place a `BeamNGWaypoint` directly on the road surface.

* * *

**Verify your waypoints loaded and are named correctly**

Before calling `drive_using_waypoints()`, use this snippet to print every waypoint the level actually loaded:

```python
all_wps = beamng.scenario.find_objects_class("BeamNGWaypoint")
available = {wp.name for wp in all_wps}
print(f"Found {len(available)} waypoints: {sorted(available)}")

waypoints = ["p1", "p2", "p3"] # replace with your actual names
missing = [w for w in waypoints if w not in available]
if missing:
    print(f"WARNING: not found in level: {missing}")

```

If `missing` is non-empty your waypoints either were not saved/reloaded, are named differently than expected, or are not placed on a road network.

* * *
