Package: robosim
RoboSimRoboSimis a Python 3.6 based simulator for Robotics. I wrote it to test out my PhD AI algorithms and produce paper-ready result images in random mapping environments. The simulator usespygameto present realtime results for robot navigation.This project is still under construction, so you might have missing features or bugs.Please submit issues when that happens.Features:Create randomly generated map,Create paths,Create robots,Run simulation,Realistic PID controller movement,Collisions,Nice looking UI,Statistics panel,Sensor simulation,And more... when I think of something else.InstallationRoboSim is now available onpip, so you just need to run the following command in your command line:pip install robosimRequirementspygame 1.9.3(didn't test on other).Using RoboSimMapMap generation is done using theRandom Walk algorithm.To generate a new map, you need to create a newMapobject by writing the following code:fromrobosimimportMapmap=Map()You can pass the following parameters in the constructor:dimensions(tuple, default(32,24)),tunnels(int, default300),tunnel_length(int, default10).Once you create the object, the__generate_map()function is called, and you can access the 2D-array by using thegenerated_mapparameter:map=Map()my_awesome_map_array=map.generated_mapEach map object, has its own map, so you can test out your algorithm on various maps at a time. Below you can see a sample output of the generated map, where0mean that the space is used for navigation and1that an obstacle is placed there.[
    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
    [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
    [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
    [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1], 
    [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1], 
    [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1], 
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1], 
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1], 
    [1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1], 
    [1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1], 
    [1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1]
]RoboSimTo run the application, you need to create aRoboSimobject first:fromrobosimimportMap,RoboSim# Create the mapmap=Map()# Initialize the simulationsim=RoboSim(map)sim.run()TheRoboSimrequiresthe map object as a parameter, but there are also other optional parameters you can add:debug(boolean) - let's the simulator know, if you want to "click out" the paths,multipath(boolean) - allows creating multiple paths in debug mode.To start the simulation you need to use therun()method. The optional parameters are:title- sets the window title,size_mult- drawing size for obstacles (default20pixels).Therun()method, runs the pygame code on a thread, so you can easily start multiple simulations at once.ControlsFor now  the simulator doesn't have an UI that will allow you to manipulate what is happening. Here is the key list that are used with a description:KeyModeDescriptionLeft clickNormalAdds start and goalLeft clickDebugAdds path pointRight clickDebugCreates robot1AllStarts robot movement2AllPauses robot movement3AllTakes screenthosNYI4AllStart/Stop recordingNYI