FutureAIGuru / BrainSimII

Neural Simulator for AGI research and development
http://brainsim.org
MIT License
87 stars 25 forks source link

Configuration of ModuleRobot should be held in file named by environment variable #195

Open ghost opened 2 years ago

ghost commented 2 years ago

Is your feature request related to a problem? Please describe. Currently, the configuration string of ModuleRobot is hard coded in the program code. This means developers having different robot hardware configurations have to constantly adapt the code to their configuration. This also means there is no way to update the BrainSimII project from Github without the default configuration being restored.

Describe the solution you'd like The cleanest solution would be to assign an environment variable to name the configuration file path, and then to read it from that location. This way we can have a default config file when the environment variable is not set, which is part of the GitHub project. When the environment variable is set on a given development system, it can either point to the Github default file, or to a specific local file describing the specific robot hardware used there.

Describe alternatives you've considered Aside from the above, this configuration string might need to be stored along with the module at network save time, since the network operated with that string and won't have the ModuleRobot module complete initialization if the configuration mismatches the actual hardware.

Additional context Add any other context or screenshots about the feature request here.

ghost commented 2 years ago

The same thing holds for the serial port the robot is to use.

ghost commented 2 years ago

Commit pushed just now fixes this setting for BS2_ROBOT_CONFIG and BS2_ROBOT_COMPORT. Saving the network does not yet also save this data though.