Coder Social home page Coder Social logo

geoscenarioserver's Introduction

GeoScenario Server

Includes: GeoScenario Parser, Checker, Sim Vehicle Planner with Behavior Trees and Maneuver Models.

Dependencies

  • Ubuntu 20.04

Apt packages

  • python3.8
  • python3.8-dev
  • python3.8-venv
  • python3-tk
  • python3-pip
  • python3-pil
  • python3-pil.imagetk

Python packages

  • numpy
  • glog
  • matplotlib
  • scipy
  • py_trees
  • tk
  • sysv-ipc
  • antlr4-python3-runtime==4.9.3 (later versions cause a parsing error Exception: Could not deserialize ATN with version (expected 4).)
  • antlr-denter

To automatically install the dependencies, execute

bash scripts/install_dependencies.bash

Running

  • run python3.8 GSServer.py -s scenarios/<geoscenario_file> to start the Server.
optional arguments:
  -h, --help            show this help message and exit
  -s [FILE [FILE ...]], --scenario [FILE [FILE ...]]
                        GeoScenario file. If no file is provided, the GSServer will load a scenario from code
  -q VERBOSE, --quiet VERBOSE
                        don't print messages to stdout
  -m, --map-path
                        Set the prefix to append to the value of the attribute `globalconfig->lanelet`
                        e.g. --map-path $HOME/anm_unreal_test_suite/maps
  -b, --btree-locations
                        Add higher priority locations to search for btrees by agent btypes
                        e.g. --btree-locations $HOME/anm_unreal_test_suite/btrees
  • GeoScenario files (2.0 required) must be placed inside scenarios/
  • If a file is not given, you must provide a manual problem startup from code.
  • LaneletMap files must be placed inside scenarios/maps (a map file is mandatory).
  • Co-Simulator (Unreal or other) is optional.

Loading multiple scenario files

  • The --scenario option can take more than one .osm file as its arguments
  • For example,
python3.8 GSServer.py --scenario scenarios/test_scenarios/gs_straight_obstacles.osm scenarios/test_scenarios/gs_straight_pedestrian.osm
  • With the exception of globalconfig and origin, the elements from each scenario are loaded and combined at runtime
  • The globalconfig and origin are used from the first .osm file that is specified (which is gs_straight_obstacles.osm in the example)
  • Multiple scenarios can define vehicles and pedestrians with the same vids and pids
  • If these scenarios are passed to the --scenario option, then an error will be reported
  • All vid and pid conflicts must be resolved before running GSServer.py
  • Scenarios can contain vehicles with no vid and pedestrians with no pid
  • These vehicles and pedestrians will be auto-assigned vids and pids
  • Auto-assigned vids and pids will start from 1 and won't conflict with the other vids and pids

Configuration:

  • Check SimConfig.py for configuration options.
  • Adjust FRAME_RATE based on hardware performance to avoid drift (Recommended 30Hz).
  • Adjust PLANNER_RATE based on hardware performance and what scenario requirements.
  • Use SHOW_DASHBOARD = True for GUI. Adjust dashboard refresh rate according to performance.
  • Simulations can only run in Real Time (so far).

Co-Simulation:

  • Use the shared memory keys inside SimConfig to read/write the server shared memory blocks.
  • We provide a GeoScenario Client for Unreal in /unreal.

Documentation

GeoScenario documentation can be found here.

[email protected] [email protected]

geoscenarioserver's People

Contributors

divitsharma avatar icolwell-as avatar mantkiew avatar mchlswyr avatar rdinizcal avatar rodrigoqueiroz avatar scott-larter avatar waeliasmith avatar

geoscenarioserver's Issues

Ctrl-C isn't handled cleanly

When I Ctrl-C geoscenario server, it often results in a bunch of unrelated and random errors. This is somewhat expected, but it would be nice to shut down more cleanly, to avoid confusion and keep errors/exceptions out of any possible logs.

Fix TV velocities

The x_vel and y_vel tags don't exist for trajectory points, but the code seems to think they do. Fix the follow_trajectory function.

ROS2 Foxy Client

Create two ROS2 packages:

  • geoscenario_client
  • geoscenario_msgs

Add a distance param to PVs

Path Vehicles already have a starting heading parameter, but they should also have a starting distance or s parameter to indicate how far along the path they should start.

This will make it easier to put a bunch of PVs on the same path.

Add 3rd Dimension

For now just add the ability to read OSM elevation tags from path nodes, and expand shared memory to include z_vel.
No need for full lanelet2 elevation support yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.