diff --git a/cfg/Tello.cfg b/cfg/Tello.cfg index 307499e..b4afb5f 100755 --- a/cfg/Tello.cfg +++ b/cfg/Tello.cfg @@ -20,7 +20,7 @@ gen.add("video_req_sps_hz", double_t, 0, # Limit altitude control (Jordy) gen.add("altitude_limit", int_t, 0, "Limit altitude of Tello", 10, 1, 100) # Limit attitude control (Jordy) -gen.add("attitude_limit", int_t, 0, "Limit attitude of Tello", 15, 1, 90) +gen.add("attitude_limit", int_t, 0, "Limit attitude of Tello", 15, 15, 25) # Set low battery threshold (Jordy) gen.add("low_bat_threshold", int_t, 0, "Set low battery threshold of Tello", 7, 1, 100) # Scale velocity control (Jordy) diff --git a/launch/joy_teleop.launch b/launch/joy_teleop.launch index 86e84b4..1e95ceb 100644 --- a/launch/joy_teleop.launch +++ b/launch/joy_teleop.launch @@ -9,7 +9,7 @@ - + diff --git a/launch/tello_node.launch b/launch/tello_node.launch index fbf33f1..03c01d1 100644 --- a/launch/tello_node.launch +++ b/launch/tello_node.launch @@ -9,7 +9,7 @@ - + diff --git a/nodes/tello_driver_node b/nodes/tello_driver_node index b4678fa..eab4efb 100755 --- a/nodes/tello_driver_node +++ b/nodes/tello_driver_node @@ -35,12 +35,6 @@ from tellopy._internal.protocol import * # Add 'EVENT_VIDEO_FRAME_H264' to collect h264 images from tellopy._internal import event -## Added statics to 'Tello' object, leave 'TelloPy' package untouched (Jordy) ## -THROW_AND_GO_CMD = 0x005d -ATTITUDE_MSG = 0x1056 -ATTITUDE_LIMIT_CMD = 0x1059 -EMERGENCY_CMD = 'emergency' - ########################################END####################################### class RospyLogger(logger.Logger): @@ -151,8 +145,6 @@ class TelloNode(tello.Tello): #########################################BEGIN##################################### - # video zoom state - self.zoom = False # Reconstruction H264 video frames self.prev_seq_id = None self.seq_block_count = 0 @@ -284,22 +276,7 @@ class TelloNode(tello.Tello): else: frame = b''.join(self.frame_pkts[:sub_id+1]) self._Tello__publish(event=self.EVENT_VIDEO_FRAME_H264, - data=(frame, self.seq_block_count*256+seq_id, self.frame_t)) - - # video mode command - def __send_video_mode(self, mode): - pkt = Packet(VIDEO_MODE_CMD) - pkt.add_byte(mode) - pkt.fixup() - return self.send_packet(pkt) - - def set_video_mode(self, zoom=False): - """Tell the drone whether to capture 960x720 4:3 video, or 1280x720 16:9 zoomed video. - 4:3 has a wider field of view (both vertically and horizontally), 16:9 is crisper.""" - self.log.info('set video mode zoom=%s (cmd=0x%02x seq=0x%04x)' % ( - zoom, VIDEO_START_CMD, self.pkt_seq_num)) - self.zoom = zoom - return self.__send_video_mode(int(zoom)) + data=(frame, self.seq_block_count*256+seq_id, self.frame_t)) def send_req_video_sps_pps(self): """Manually request drone to send an I-frame info (SPS/PPS) for video stream.""" diff --git a/src/TelloPy b/src/TelloPy index 9738d66..b52b98c 160000 --- a/src/TelloPy +++ b/src/TelloPy @@ -1 +1 @@ -Subproject commit 9738d66d6cb4ec7bcf5aefae00f0abd042299676 +Subproject commit b52b98c2da57af69bb6fbf1c4389cfe9704a96aa