mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-05-30 16:59:32 +00:00
Drone: Begin code organisation for GPS support
This commit is contained in:
@@ -49,7 +49,6 @@ land_timeout = float(default=10.0, min=0)
|
||||
common_offset = float_list(default=list(0, 0, 0), min=3, max=3)
|
||||
|
||||
[FLOOR FRAME]
|
||||
enabled = boolean(default=False)
|
||||
parent = string(default=map)
|
||||
# Frame translation (x, y, z)
|
||||
# __list__ x y z
|
||||
@@ -58,6 +57,11 @@ translation = float_list(default=list(0.0, 0.0, 0.0), min=3, max=3)
|
||||
# __list__ roll pitch yaw
|
||||
rotation = float_list(default=list(0.0, 0.0, 0.0), min=3, max=3)
|
||||
|
||||
[GPS FRAME]
|
||||
lat = float(default=0)
|
||||
lon = float(default=0)
|
||||
yaw = float(default=0)
|
||||
|
||||
[ANIMATION]
|
||||
takeoff_detection = boolean(default=True)
|
||||
land_detection = boolean(default=True)
|
||||
|
||||
@@ -99,10 +99,9 @@ class CopterClient(client.Client):
|
||||
LedLib.init_led(self.config.led_pin)
|
||||
task_manager_instance.start() # TODO move to self
|
||||
if self.config.copter_frame_id == "floor":
|
||||
if self.config.floor_frame_enabled:
|
||||
self.start_floor_frame_broadcast()
|
||||
else:
|
||||
rospy.logerr("Can't make floor frame!")
|
||||
self.start_floor_frame_broadcast()
|
||||
elif self.config.copter_frame_id == "gps":
|
||||
self.start_gps_frame_broadcast()
|
||||
start_subscriber()
|
||||
|
||||
telemetry.start_loop()
|
||||
@@ -120,6 +119,8 @@ class CopterClient(client.Client):
|
||||
trans.child_frame_id = self.config.copter_frame_id
|
||||
static_bloadcaster.sendTransform(trans)
|
||||
|
||||
def start_gps_frame_broadcast(self):
|
||||
return
|
||||
|
||||
def restart_service(name):
|
||||
os.system("systemctl restart {}".format(name))
|
||||
|
||||
Reference in New Issue
Block a user