mirror of
https://github.com/OSURoboticsClub/Rover_2017_2018.git
synced 2025-11-08 18:21:15 +00:00
Major changes. Refactored. Drive now arbitrates between FrSky and ground station.
This commit is contained in:
17
software/ros_packages/ground_station/scripts/ground_station_launch.sh
Executable file
17
software/ros_packages/ground_station/scripts/ground_station_launch.sh
Executable 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
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
1
software/ros_packages/ground_station/src/RoverGroundStation.py → software/ros_packages/ground_station/src/ground_station.py
Executable file → Normal file
1
software/ros_packages/ground_station/src/RoverGroundStation.py → software/ros_packages/ground_station/src/ground_station.py
Executable file → Normal file
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python
|
||||
#####################################
|
||||
# Imports
|
||||
#####################################
|
||||
Reference in New Issue
Block a user