From e6334a79b8ee8857ace10b43715611de281bbdb5 Mon Sep 17 00:00:00 2001 From: Tommy Persson <tommy.persson@liu.se> Date: Wed, 24 Aug 2022 15:22:06 +0200 Subject: [PATCH] Work on qr code. --- src/add_qr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/add_qr.py b/src/add_qr.py index ffa485f..a39f25c 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 -- GitLab