Major changes. Refactored. Drive now arbitrates between FrSky and ground station.

This commit is contained in:
2018-02-27 21:47:23 -08:00
parent 934dd3eeb4
commit 230f64f4a3
20 changed files with 240 additions and 239 deletions

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
current_folder_name="scripts"
current_folder_name_length=`expr length $current_folder_name`
launch_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
launch_dir_length=`expr length $launch_dir`
launch_dir_length_without_current_folder=$(($launch_dir_length-$current_folder_name_length))
script_launch_path="${launch_dir:0:$launch_dir_length_without_current_folder}/src"
cd $script_launch_path
sleep 5
export DISPLAY=:0
python ground_station.py

View File

@@ -15,7 +15,7 @@ from rover_control.msg import DriveCommandMessage
#####################################
GAME_CONTROLLER_NAME = "Logitech Logitech Extreme 3D Pro"
DEFAULT_DRIVE_COMMAND_TOPIC = "command_control/groundstation_drive"
DEFAULT_DRIVE_COMMAND_TOPIC = "/rover_control/command_control/ground_station_drive"
DRIVE_COMMAND_HERTZ = 15
@@ -149,8 +149,6 @@ class RoverDriveSender(QtCore.QThread):
self.run_thread_flag = True
self.joystick = LogitechJoystick()
while not self.joystick.ready:
self.msleep(100)
# ########## Class Variables ##########
# Publishers

View File

@@ -127,6 +127,8 @@ class RoverVideoCoordinator(QtCore.QThread):
for topics_group in topics:
main_topic = topics_group[0]
if "heartbeat" in main_topic:
continue
camera_name = main_topic.split("/")[2]
names.append(camera_name)

View File

@@ -127,6 +127,8 @@ class RoverVideoReceiver(QtCore.QThread):
for topics_group in topics:
main_topic = topics_group[0]
if "heartbeat" in main_topic:
continue
camera_name = main_topic.split("/")[3]
resolution_options.append(camera_name)

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python
#####################################
# Imports
#####################################