Compare commits

...
3 Commits
Author SHA1 Message Date
moscowsky 9f65622b63 twist -> speed 2026-06-15 13:12:22 +03:00
moscowsky d7a1097299 ignore and def params 2026-06-15 12:20:56 +03:00
moscowsky bd046ae217 updated with unitiy 2026-06-15 11:52:07 +03:00
2 changed files with 11 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
*.pyc
+10 -4
View File
@@ -3,7 +3,7 @@ import time
class RobotController(object):
def __init__(self, fire_ext_max_capacity, collision_damage = 1, k_sof = 1, k_cas = 1, k_asset = 1):
def __init__(self, fire_ext_max_capacity = 5, collision_damage = 1, k_sof = 1, k_cas = 1, k_asset = 1):
# STATE VARIABLES
self._fire_ext_max_capacity = fire_ext_max_capacity
@@ -25,8 +25,11 @@ class RobotController(object):
''' CONTROL '''
def send_twist_cmd(self, v, w):
raise NotImplemented("")
# speeds in [-1, 1] extra stuff will be cut
def send_speed_cmd(self, v, w):
v = min(max(-1, v), 1)
w = min(max(-1, w), 1)
return v, w
def send_fire_ext_burst_cmd(self):
if self._fire_ext_capacity > 0:
@@ -34,8 +37,11 @@ class RobotController(object):
return True
return False
# poses in [-1, 1] extra stuff will be cut
def send_fire_ext_pose_cmd(self, horisontal_pose, vertical_pose):
raise NotImplemented("")
horisontal_pose = min(max(-1, horisontal_pose), 1)
vertical_pose = min(max(-1, vertical_pose), 1)
return horisontal_pose, vertical_pose
def send_pick_asset_cmd(self):
raise NotImplemented("")