Skip to main content

Simulation tool for prototyping autonomous vehicle related algorithms. Wrapper of the PyChrono simulator.

Project description

WA Vehicle Simulator - 0.0.1

The WA Simulator is a powerful, multi-platform, lightweight and user-friendly simulation platform for testing algorithms intended for autonomous robot or vehicle applications. This project is under active development by Wisconsin Autonomous, a student organization at the University of Wisconsin - Madison.

Usage

The WA Simulator is a lightweight tool meant to facilitate algorithm development. As a result, the majority of the actual vehicle dynamics is hidden behind the wa_simulator API. All you need to do is import the module and instantiate the classes.

Default Usage

# Import the wa_simulator
import wa_simulator as wa

def main():
    # Create the system
    sys = wa.WASystem(step_size=1e-3)

    # Create an environment using a premade environment description
    env_filename = wa.WASimpleEnvironment.EGP_ENV_MODEL_FILE
    env = wa.WASimpleEnvironment(env_filename, sys)

    # Create an vehicle using a premade vehicle description
    veh_filename = wa.WALinearKinematicBicycle.GO_KART_MODEL_FILE
    veh = wa.WALinearKinematicBicycle(veh_filename)

    # Visualize the simulation using matplotlib
    vis = wa.WAMatplotlibVisualization(veh, sys)

    # Control the vehicle using the arrow keys
    ctr = wa.WAMatplotlibController(sys, vis)

    # Instantiate the simulation manager
    sim = wa.WASimulation(sys, env, veh, vis, ctr)

    # Run the simulation
    sim.Run()


if __name__ == "__main__":
    main()

With Chrono

Using Chrono is as simple as changing a few file names and importing the chrono version of the simulator. Even though wa_simulator.chrono is the new import, all default wa_simulator classes are still accessible as seen above. Background about Chrono can be found here.

# Import the wa_simulator
import wa_simulator.chrono as wa

def main():
    # Create the system
    sys = wa.WAChronoSystem(step_size=1e-3)

    # Create an environment using a premade environment description
    env_filename = wa.WAChronoEnvironment.EGP_ENV_MODEL_FILE
    env = wa.WAChronoEnvironment(env_filename, sys)

    # Create an vehicle using a premade vehicle description
    veh_filename = wa.WAChronoVehicle.GO_KART_MODEL_FILE
    veh = wa.WAChronoVehicle(veh_filename)

    # Visualize the simulation using matplotlib
    vis = wa.WAMatplotlibVisualization(veh, sys)

    # Control the vehicle using the arrow keys
    ctr = wa.WAMatplotlibController(sys, vis)

    # Instantiate the simulation manager
    sim = wa.WASimulation(sys, env, veh, vis, ctr)

    # Run the simulation
    sim.Run()


if __name__ == "__main__":
    main()

Documentation

License

wa_simulator is made available under the BSD-3 License. For more details, see LICENSE.

Support

Contact Aaron Young for any questions or concerns regarding the contents of this repository.

See Also

Stay up to date with our technical info by following our blog.

Follow us on Facebook, Instagram, and LinkedIn!


Wisconsin Autonomous Logo University of Wisconsin - Madison Crest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wa_simulator-0.0.2.tar.gz (5.2 MB view details)

Uploaded Source

Built Distribution

wa_simulator-0.0.2-py3-none-any.whl (5.2 MB view details)

Uploaded Python 3

File details

Details for the file wa_simulator-0.0.2.tar.gz.

File metadata

  • Download URL: wa_simulator-0.0.2.tar.gz
  • Upload date:
  • Size: 5.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for wa_simulator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4d3b3dc85aa9e008c44d411e1e96568ca377b67acd2fd418c92aebb3b44d61a5
MD5 97801f0a2cd7bedc9e469dcac66b5e8d
BLAKE2b-256 540ff14c03515fe9abcb11c7ec1b3e5b8a4f806b43d80e595a95b14db28f6679

See more details on using hashes here.

File details

Details for the file wa_simulator-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: wa_simulator-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for wa_simulator-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3dfecb86c0aef2015e6e32df65af77a966cba14148778195a7a19580d005ce2c
MD5 a392ea0ad72ba6ae2ddb125aadb3a2f9
BLAKE2b-256 3842e6ba40ad3d7ab3554b07ad30a95f3c64cb9fd1b80fb7e7e1857037a6f3be

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page