Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f65622b63 | ||
|
|
d7a1097299 | ||
|
|
bd046ae217 |
@@ -0,0 +1 @@
|
|||||||
|
*.pyc
|
||||||
+10
-4
@@ -3,7 +3,7 @@ import time
|
|||||||
|
|
||||||
class RobotController(object):
|
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
|
# STATE VARIABLES
|
||||||
self._fire_ext_max_capacity = fire_ext_max_capacity
|
self._fire_ext_max_capacity = fire_ext_max_capacity
|
||||||
@@ -25,8 +25,11 @@ class RobotController(object):
|
|||||||
|
|
||||||
''' CONTROL '''
|
''' CONTROL '''
|
||||||
|
|
||||||
def send_twist_cmd(self, v, w):
|
# speeds in [-1, 1] extra stuff will be cut
|
||||||
raise NotImplemented("")
|
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):
|
def send_fire_ext_burst_cmd(self):
|
||||||
if self._fire_ext_capacity > 0:
|
if self._fire_ext_capacity > 0:
|
||||||
@@ -34,8 +37,11 @@ class RobotController(object):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
# poses in [-1, 1] extra stuff will be cut
|
||||||
def send_fire_ext_pose_cmd(self, horisontal_pose, vertical_pose):
|
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):
|
def send_pick_asset_cmd(self):
|
||||||
raise NotImplemented("")
|
raise NotImplemented("")
|
||||||
|
|||||||
Reference in New Issue
Block a user