Hey Everyone, My Name Is Nehoray
I Started Working on a project ‘Autonomous Car’
Self-driving car
My Question: What’s The Best Way To Do It. (AI, Pathfinding)
Thanks Everyone.
Hey Everyone, My Name Is Nehoray
I Started Working on a project ‘Autonomous Car’
Self-driving car
My Question: What’s The Best Way To Do It. (AI, Pathfinding)
Thanks Everyone.
What features are you looking for in this car?
Self-driving car, Autonomous car
You Press A Button And Its Start Driving On Its Own
Kinda Like AutoPilot
![]()
Is it expected to only drive on a road? What does that road look like? Can you specify bounds with special parts, or must it find the bounds using a sensor? Does it have goals locations / directions? Should it avoid obstacles? Is it like the self driving car shown as an example for that neural network library you recently posted a question regarding?
Yes, Like A Road, Sensor, No, Yes, Yes
The most common solution is to use a LiDAR combined with visual data. Since Roblox doesn’t allow you to make additional cameras and sample pixels, you’ll just have to use a LiDAR. This is implemented as you saw in the neural network’s library as raycasts. I believe only two raycasts are required if you use heighted borders as in the example. You also do not need a neural network to solve the problem, if the ray on the right becomes longer, steer right. Otherwise, steer left. If you control steering velocity and not the angle directly, you’ll want an epsilon point bicycle controller to avoid overshooting.
Avoiding obstacles is more difficult, you’ll have to use the angle of the ray and the magnitude to determine if the detected obstacle is going to be hit by the car, and decide on which direction to turn to avoid until it is out of the trajectory.
With much more lidar data and a cache (say, an occupancy octree / quadtree) you could use RRT* to perform more rigorous planning, however this would be computationally intensive for Roblox.
Thanks Very Useful Information
Can You Explain To Me What LiDAR Is.
It’s a device which shoots many lasers and sees the reflection to judge distances of the objects hit by all of the rays. It forms a relatively accurate point cloud and is a standard sensor for modern robotics.
Its Available On Roblox?
How Should I Implement This?
I’d check the implementation of the neural network library you saw. The best way to do it is to use the Workspace’s Raycasting functionality. Cast a bunch of rays (minimum two) at a 45 degree angle from the travel direction (WorldRoot | Documentation - Roblox Creator Hub)