socialgorithm / elon-server Goto Github PK
View Code? Open in Web Editor NEWSelf-Driving Car Simulation Server
Self-Driving Car Simulation Server
Map the keyboard arrows to control the car.
Render the inputs that the car is receiving as bars (steering, throttle, braking)
The server now includes a test flag. This test flag should be used to either create a client (or simpler) create a goroutine that will send random input to a Car so that we can start to see some movement around the track.
Convex hull works fine, but it needs some displacement points so that there are both right and left turns.
Also, the number of points used for the convex hull should also be random within a range, to produce more variable shapes.
Right now the outer side of the track is calculated by "expanding" (buffering) the road line polygon.
It would be nice to also get the outer side by "shrinking" it, so that all edges are curved.
The center line of the track could be preserved in another array of points, as it could make calculating the distance easier (way less points in that one, since it doesn't have curves)
Should be fairly easy, including rendering the cars.
The server should initialise a track when starting up, and set up the comm channels.
Commands from the client
CarControlState:
{
throttle: float // -1.00 <> 1.00, where -1 = brake, +1 = full throttle
steering: float // -1.00 <> 1.00, where -1 = full left steering, +1 = full right steering
}
CarState:
{
position: {
x: float,
y: float
},
velocity: float,
sensors: [Sensor]
}
Sensor:
{
angle: int, // -90 <> +90, degree deviation from straight ahead
distance: float // 0.00 <> x, indicating distance to detected object
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.