A planar minimal robot simulator. A simulated differential-drive robot lives on a metric occupancy-grid map and is driven over a small TCP/UDP network protocol, with a Python client and a browser-based map editor alongside it.
Install the simulator and its Python client from PyPI:
pip install playareaLaunch the simulator (opens control on TCP port 9000):
playarea run simplayarea exposes a small command tree:
playarea run sim # the 3D robot simulator (also the default: bare `playarea`)
playarea run map-editor # the map editor in a native window
playarea run --help # list available targetsBare
playarea(and any simulator flags, e.g.playarea --tcp_port 9001) still launches the simulator, so existing usage keeps working. Passplayarea run map-editor --no-windowto serve the editor to your browser instead of opening a native window.
Then drive the robot from Python:
from playarea import Robot
with Robot() as robot: # connects to localhost:9000
robot.set_speed(v=0.2, w=0.5) # linear m/s, angular rad/s
robot.subscribe_odom()
print(robot.odom) # latest Odometry(x, y, theta, v, w, seq, t)- Map Editor — design and export occupancy maps in the browser.
