Skip to content

vikrammeyer/av-project

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VehicleSim

VehicleSim

Loading / instantiating code

It is recommended to start julia with multiple threads, since many concurrent tasks will be executing.

julia --project --threads=auto
(VehicleSim) pkg> instantiate
(VehicleSim) pkg> add https://github.com/forrestlaine/MeshCat.jl
(VehicleSim) pkg> add https://github.com/forrestlaine/RigidBodyDynamics.jl
julia> using VehicleSim

Running Simulation

julia> s = server();
[ Info: Server can be connected to at 1.2.3.4 and port 4444
[ Info: Server visualizer can be connected to at 1.2.3.4:8712

This will spin up the server / simulation engine. For now, the server will instantiate a single vehicle.

Connecting a keyboard client

julia> using Sockets # to allow ip strings
julia> keyboard_client(ip"1.2.3.4") # ip address specified by @info statement when starting server
[ Info: Client accepted.
[ Info: Client follow-cam can be connected to at 1.2.3.4:8713
[ Info: Press 'q' at any time to terminate vehicle.

Shutting down server

julia> shutdown!(s)

Development workflow

  • Pre-compiling everything takes a while so we want to minimize time spent here
    • Use Revise to let you make code changes without having to reload in the pkg: using Revise, VehicleSim
    • the project code is setup with a shutdown_channel that worker threads use to kill themselves when you press q. this lets us use Revise since the threads don't keep running making us terminate the entire julia instance and restart it and the precompilation again

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 100.0%