Reset (part of) simulation in VC


#1

Dear community,

Is it possible to reset a simulation (or part of a simulation such as robot position) using the virtual coach?

Reason I ask is that

  1. Not relaunching the experiment could save some overhead when repeating simulations with small modifications (e.g. in an evolutionary search)

  2. Currently I relaunch the experiment for each simulation, but it gives an error after several 100 experiments (as reported here : https://bitbucket.org/hbpneurorobotics/neurorobotics-platform/issues/9/too-many-open-files-virtual-coach )


#2

Hi Alexander,

Yes reset is now possible if you have the latest Virtual Coach code, with the command sim.reset(<type>), where <type> is:

  • 'full - Reset everything just as though you launched the simulation.
  • ‘robot_pose’ - Reset just the robot position
  • ‘world’ - Reset the environment (not the robot)
  • ‘brain’ - Reload the brain

You can read the more detailed descriptions in the frontend. @mahmoudakl can probably help answer any specific questions you may have.

Best,
Kenny

PS The simulation reset CSV line issue has been resolved in master now as well.


#3

Also, while the documentation is still being updated you can refer to $HBP/VirtualCoach/examples/integration_test/it.py which contains all of the currently supported VirtualCoach commands (with descriptions/comments) tested against a running backend. See the README for details.


#4

One last tip, make sure your timeout in the .exc file is super, super huge if you’ll be running this experiment and resetting it over a weekend or similar.


#5

Hi Kenny,

I pulled the latest VC code, but it complains about the config.json file, which seems not updated…

Best,
Alexander


#6

The config.json is managed separately in the user-scripts repository. You can pull that repository and manually copy config_files/VirtualCoach/config.json over or run $HBP/user-scripts/configure_nrp (which will override/update all of the NRP config files).

There’s also an update_nrp script in there that can be used to update all of your NRP repos in a single command.


#7

Thanks Kenny,

Is this documented somewhere? Then I could perhaps have found out myself : )

Alexander


#8

I’ll tag @mahmoudakl who is working on the first draft of the documentation to make sure to include a description of how the config file is managed and how to properly update it.

Kenny