Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions cflib/positioning/position_hl_commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def __init__(self, crazyflie,
self._controller = controller

self._activate_controller()
self._activate_high_level_commander()
self._hl_commander = self._cf.high_level_commander

self._x = x
Expand Down Expand Up @@ -278,9 +277,6 @@ def get_position(self):
"""
return self._x, self._y, self._z

def _activate_high_level_commander(self):
self._cf.param.set_value('commander.enHighLevel', '1')

def _activate_controller(self):
if self._controller is not None:
value = str(self._controller)
Expand Down
5 changes: 0 additions & 5 deletions examples/autonomy/autonomous_sequence_high_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ def reset_estimator(cf):
wait_for_position_estimator(cf)


def activate_high_level_commander(cf):
cf.param.set_value('commander.enHighLevel', '1')


def activate_mellinger_controller(cf):
cf.param.set_value('stabilizer.controller', '2')

Expand Down Expand Up @@ -161,7 +157,6 @@ def run_sequence(cf, trajectory_id, duration):
cf = scf.cf
trajectory_id = 1

activate_high_level_commander(cf)
# activate_mellinger_controller(cf)
duration = upload_trajectory(cf, trajectory_id, figure8)
print('The sequence is {:.1f} seconds long'.format(duration))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ def reset_estimator(cf):
wait_for_position_estimator(cf)


def activate_high_level_commander(cf):
cf.param.set_value('commander.enHighLevel', '1')


def activate_mellinger_controller(cf):
cf.param.set_value('stabilizer.controller', '2')

Expand Down Expand Up @@ -158,7 +154,6 @@ def run_sequence(cf, trajectory_id, duration):
cf = scf.cf
trajectory_id = 1

activate_high_level_commander(cf)
# activate_mellinger_controller(cf)
duration = upload_trajectory(cf, trajectory_id, trajectory)
print('The sequence is {:.1f} seconds long'.format(duration))
Expand Down
5 changes: 0 additions & 5 deletions examples/qualisys/qualisys_hl_commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,6 @@ def activate_kalman_estimator(cf):
cf.param.set_value('locSrv.extQuatStdDev', 0.06)


def activate_high_level_commander(cf):
cf.param.set_value('commander.enHighLevel', '1')


def activate_mellinger_controller(cf):
cf.param.set_value('stabilizer.controller', '2')

Expand Down Expand Up @@ -296,7 +292,6 @@ def run_sequence(cf, trajectory_id, duration):

adjust_orientation_sensitivity(cf)
activate_kalman_estimator(cf)
activate_high_level_commander(cf)
# activate_mellinger_controller(cf)
duration = upload_trajectory(cf, trajectory_id, figure8)
print('The sequence is {:.1f} seconds long'.format(duration))
Expand Down
5 changes: 0 additions & 5 deletions examples/swarm/hl-commander-swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
from cflib.crazyflie.swarm import Swarm


def activate_high_level_commander(scf):
scf.cf.param.set_value('commander.enHighLevel', '1')


def activate_mellinger_controller(scf, use_mellinger):
controller = 1
if use_mellinger:
Expand Down Expand Up @@ -87,6 +83,5 @@ def run_shared_sequence(scf):
cflib.crtp.init_drivers()
factory = CachedCfFactory(rw_cache='./cache')
with Swarm(uris, factory=factory) as swarm:
swarm.parallel_safe(activate_high_level_commander)
swarm.reset_estimators()
swarm.parallel_safe(run_shared_sequence)
5 changes: 0 additions & 5 deletions examples/swarm/synchronizedSequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@
]


def activate_high_level_commander(scf):
scf.cf.param.set_value('commander.enHighLevel', '1')


def activate_mellinger_controller(scf, use_mellinger):
controller = 1
if use_mellinger:
Expand Down Expand Up @@ -185,7 +181,6 @@ def control_thread():
cflib.crtp.init_drivers()
factory = CachedCfFactory(rw_cache='./cache')
with Swarm(uris, factory=factory) as swarm:
swarm.parallel_safe(activate_high_level_commander)
swarm.reset_estimators()

print('Starting sequence!')
Expand Down
1 change: 0 additions & 1 deletion examples/tuning/PID_controller_tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ def __init__(self, pid_gui, scf):
self.update_scale_info()

self.commander = cf.high_level_commander
self.cf.param.set_value('commander.enHighLevel', '1')
self.take_off(STANDARD_HEIGHT)

def update_scale_info(self):
Expand Down
11 changes: 0 additions & 11 deletions test/positioning/test_position_hl_commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,6 @@ def setUp(self):

self.sut = PositionHlCommander(self.cf_mock)

def test_that_the_hi_level_commander_is_activated_on_creation(
self, sleep_mock):
# Fixture

# Test

# Assert
self.param_mock.set_value.assert_has_calls([
call('commander.enHighLevel', '1')
])

def test_that_controller_is_selected_on_creation(
self, sleep_mock):
# Fixture
Expand Down