diff --git a/jsk_pr2_robot/jsk_pr2_accessories/pr2_hand_apriltag/Makefile b/jsk_pr2_robot/jsk_pr2_accessories/pr2_hand_apriltag/Makefile index 1abf8b9be3..7731412c25 100644 --- a/jsk_pr2_robot/jsk_pr2_accessories/pr2_hand_apriltag/Makefile +++ b/jsk_pr2_robot/jsk_pr2_accessories/pr2_hand_apriltag/Makefile @@ -16,9 +16,9 @@ build/tag_plate.stl: tag_plate.scad openscad -o $@ $< echo "Generated $@" -build/tag_with_margin.png: add_margin.py +build/tag_with_margin.png: rotate_and_add_margin.py mkdir -p build - python3 ./add_margin.py tag41_12_00000.png $@ + python3 ./rotate_and_add_margin.py tag41_12_00000.png $@ echo "Generated $@" build/april_tag_print.pdf: april_tag_print.tex build/tag_with_margin.png diff --git a/jsk_pr2_robot/jsk_pr2_accessories/pr2_hand_apriltag/add_margin.py b/jsk_pr2_robot/jsk_pr2_accessories/pr2_hand_apriltag/rotate_and_add_margin.py similarity index 97% rename from jsk_pr2_robot/jsk_pr2_accessories/pr2_hand_apriltag/add_margin.py rename to jsk_pr2_robot/jsk_pr2_accessories/pr2_hand_apriltag/rotate_and_add_margin.py index 5f5ee893c1..29d4aaf709 100755 --- a/jsk_pr2_robot/jsk_pr2_accessories/pr2_hand_apriltag/add_margin.py +++ b/jsk_pr2_robot/jsk_pr2_accessories/pr2_hand_apriltag/rotate_and_add_margin.py @@ -10,7 +10,8 @@ def main(): args = parser.parse_args() img = Image.open(args.input) - + img = img.rotate(90) + if img.width != img.height: raise ValueError("Input image must be square")