From 4935245c610118dc97261ba4fa41c6bee70f4f52 Mon Sep 17 00:00:00 2001 From: Nicolas Hiillos Date: Tue, 17 Jan 2023 11:01:41 +0200 Subject: [PATCH] Set drawing controller range 0:1 for X and Y --- .../drawing_controller/drawing_controller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drawing_controller/drawing_controller/drawing_controller.py b/src/drawing_controller/drawing_controller/drawing_controller.py index beca1f8..5af76b5 100644 --- a/src/drawing_controller/drawing_controller/drawing_controller.py +++ b/src/drawing_controller/drawing_controller/drawing_controller.py @@ -58,7 +58,7 @@ class DrawingController(Node): def __init__(self, svgpath): super().__init__('drawing_controller') #self.publisher_ = self.create_publisher(PoseStamped, '/target_pose', 10) - timer_period = 20.0 # seconds + timer_period = 5.0 # seconds self.timer = self.create_timer(timer_period, self.timer_callback) self.i = 0 @@ -66,7 +66,8 @@ class DrawingController(Node): xml = ET.parse(svgpath) svg = xml.getroot() - self.map_point = map_point_function(float(svg.get('width')), float(svg.get('height')), 0.1, 0.5, -0.2, 0.2) + #self.map_point = map_point_function(float(svg.get('width')), float(svg.get('height')), 0.1, 0.5, -0.2, 0.2) + self.map_point = map_point_function(float(svg.get('width')), float(svg.get('height')), 0.0, 1.0, 0.0, 1.0) self.lines = [] for child in svg: if (child.tag == 'line'):