Skip to content
Snippets Groups Projects
Commit e6334a79 authored by Tommy Persson's avatar Tommy Persson
Browse files

Work on qr code.

parent 41bd8f00
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ import tf ...@@ -19,6 +19,7 @@ import tf
parser = OptionParser() 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-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 ("", "--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 ("", "--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") #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): ...@@ -84,7 +85,7 @@ def image_callback(data):
if options.qr_transform: if options.qr_transform:
try: 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): except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException):
print("Exception lookup trans:", look_up_time) print("Exception lookup trans:", look_up_time)
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment