diff --git a/src/add_qr.py b/src/add_qr.py index ffa485f7cb131c0cbc4127f34abf7ab47607dd64..a39f25c6ca7141afbab0eb328696c2f6890b4cce 100755 --- a/src/add_qr.py +++ b/src/add_qr.py @@ -19,6 +19,7 @@ import tf parser = OptionParser() parser.add_option ("", "--image-topic", action="store", type="string", dest="image_topic", help="Topic to take image from", default="/dji21/camera0/image_raw_orig") +parser.add_option ("", "--image-frame", action="store", type="string", dest="image_frame", help="Topic to take image from", default="/dji0/camera0/image_frame") parser.add_option ("", "--compressed", action="store_true", dest="compressed", help="If true image in is compressed.") parser.add_option ("", "--decode", action="store_true", dest="decode", help="If true test the decoding.") #parser.add_option ("", "--fifo", action="store", type="string", dest="fifo", help="Fifo to write raw images to", default="/tmp/fifo_dji21") @@ -84,7 +85,7 @@ def image_callback(data): if options.qr_transform: try: - (trans,rot) = listener.lookupTransform('/world', '/dji0/camera0/image_frame', look_up_time) + (trans,rot) = listener.lookupTransform('/world', options.image_frame, look_up_time) except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException): print("Exception lookup trans:", look_up_time) return