Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Layer #180

Closed
14 of 17 tasks
stonier opened this issue Jan 3, 2018 · 7 comments
Closed
14 of 17 tasks

Python Layer #180

stonier opened this issue Jan 3, 2018 · 7 comments

Comments

@stonier
Copy link
Collaborator

stonier commented Jan 3, 2018

This is a meta-issue identifying the tasks required for Milestone #2. Some more detailed notetaking here.

Scenarios as a python script which is responsible for instantiating and configuring the simulator, agents, callback and evaluation functions, as well as ultimately starting and stepping through the simulation.

Simulator

Be able to instantiate the simulator with options so that the same script can be used in both interactive and CI modes.

  • Instantiate the simulator
  • able to start the simulation in paused mode
  • able to start the simulation in 'as fast as possible' mode (i.e. non-realtime)
  • able to run the simulation for a finite duration
  • command-line options framework for pause, non-realtime, duration modes

Road Network

Agents

  • add a simple car
  • add a lane following car
  • add a lane changing & merging (MOBIL) car

Dynamic Scripting

Infra

Documentation

  • User and Developer notes in the Delphyne Guide. Document the caveats in the developer's section (i.e. new type, expose it in python_bindings.cc)

Demo Goal

  • Multilane world with lane changing cars and finite amount of time
  • One parked car (external), one simple car that collides into the parked car, aborts simulation (moved to Collision Detection #372)

Priorities

From least to highest

  • Vehicle collisions : might be some work if we go the c++ route, also pending what robotics does
  • External cars : since it's blocking on Chris' work anyway
  • Remaining : should all be unblocked and not needing any design

Risks

  • The python bindings bucket since it's very beta and we may need many parameter bindings
  • Not yet finalised how we transport maliput and view it in the visualisers
@stonier stonier added this to the Milestone #2 milestone Jan 3, 2018
@stonier
Copy link
Collaborator Author

stonier commented Jan 3, 2018

@basicNew I just worked through this with @clalancette. Please rant/improve it with your recommendations :)

@stonier stonier mentioned this issue Jan 9, 2018
12 tasks
@basicNew
Copy link

Weekly update:

Got a first working version of realtime factor configuration in the core (c++) classes and python bindings. There is an issue though with dynamically changing it while the sim is running (see video). Some options:

  • Do not allow dynamic reconfiguration.
  • Allow it, but leave it as is.
  • Raise the issue and, if considered a bug, send a fix to Drake.
  • Handle the sim loop delay on the simulation runner (i.e. on the delphyne side).

@basicNew
Copy link

Weekly update:

@basicNew
Copy link

basicNew commented Mar 8, 2018

Weekly update:

All the items under Simulator are covered. Below is a description of the demos showing them:

  • Instantiate the simulator. All the python demos do this. python_bindings_example.py shows the basics of instantiating a simulator with a callback on each simulation step.
  • Able to start the simulation in paused mode:
    • paused_mode_example.py shows how to start the simulator paused.
    • python_bindings_example.py takes an optional command line flag to start the simulation paused.
    • keyboard_controlled_simulation.py reads the terminal keyboard while the simulation is running and can toggle play/pause.
  • Able to start the simulation in 'as fast as possible' mode (i.e. non-realtime):
    • time_bounded_simulation.py can take the real-time factor as an optional command-line parameter.
    • realtime_rate_changer.py shows how to change dynamically the real-time factor while the simulation is running.
  • Able to run the simulation for a finite duration:
    • time_bounded_simulation.py can take the the time to run the simulation as an optional command-line parameter (otherwise it just runs for 15 secs) and quit.
  • Command-line options framework for pause, non-realtime, duration modes. Done as depicted above.

Currently working on the dragway demo. Have an initial implementation working, including a python example.

@stonier
Copy link
Collaborator Author

stonier commented Apr 9, 2018

@basicNew one item we should add here is the STATIC simulator runner issue, #341
(relevant since it looks like a python gil problem).

And thanks! That helped get me up to speed very quickly, especially w.r.t. demo_launcher and the growing library of python examples.

@basicNew
Copy link

basicNew commented Apr 9, 2018

+1, will do. And yw, happy to help :).

@stonier
Copy link
Collaborator Author

stonier commented May 21, 2018

Looking good. Transferred remaining jobs to the Final M2 meta: #378.

@stonier stonier closed this as completed May 21, 2018
@basicNew basicNew removed their assignment Apr 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants