diff options
| author | Abel Tim <git@abeltim.com> | 2025-04-24 09:46:06 +0200 |
|---|---|---|
| committer | Abel Tim <git@abeltim.com> | 2025-04-24 09:46:06 +0200 |
| commit | 5dcc582c358a39e8dbfbe3b3d16b62aed9009569 (patch) | |
| tree | 05dbe9606d069cd9bd5aee91cbe8e9efe6d495ea /simulation/controllers/Soccer_Ball/Soccer_Ball.py | |
| parent | ee54d9bcb67ab1e487d886f2372773e946afb9ae (diff) | |
| download | robotica-5dcc582c358a39e8dbfbe3b3d16b62aed9009569.tar.gz robotica-5dcc582c358a39e8dbfbe3b3d16b62aed9009569.zip | |
sim for omni drive
Signed-off-by: Abel Tim <git@abeltim.com>
Diffstat (limited to 'simulation/controllers/Soccer_Ball/Soccer_Ball.py')
| -rw-r--r-- | simulation/controllers/Soccer_Ball/Soccer_Ball.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/simulation/controllers/Soccer_Ball/Soccer_Ball.py b/simulation/controllers/Soccer_Ball/Soccer_Ball.py deleted file mode 100644 index 70a26d7..0000000 --- a/simulation/controllers/Soccer_Ball/Soccer_Ball.py +++ /dev/null @@ -1,18 +0,0 @@ -from controller import Robot, Emitter -import time - -robot = Robot() -emitter = robot.getDevice("emitter") - -# Time step of the simulation -timestep = int(robot.getBasicTimeStep()) - -# Pulse emission interval (e.g., 1 pulse per second) -pulse_interval = 1.0 - -# Main loop -while robot.step(timestep) != -1: - current_time = robot.getTime() - if int(current_time) % pulse_interval == 0: - emitter.send(b'\x01') # Emit a single byte pulse - time.sleep(1.0 / pulse_interval) |
