From 3125effe05872514d91b81b9695a4a15d0833404 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 6 Dec 2022 18:27:59 -0500 Subject: [PATCH] laser_check --- multi_calibration/launch/auto_calibration.launch | 4 +++- multi_calibration/scrip/laser.sh | 1 + multi_calibration/scrip/vis_laser_calib_result.py | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-) mode change 100644 => 100755 multi_calibration/scrip/vis_laser_calib_result.py diff --git a/multi_calibration/launch/auto_calibration.launch b/multi_calibration/launch/auto_calibration.launch index dfa5d8f..80e031b 100644 --- a/multi_calibration/launch/auto_calibration.launch +++ b/multi_calibration/launch/auto_calibration.launch @@ -66,5 +66,7 @@ - + + + diff --git a/multi_calibration/scrip/laser.sh b/multi_calibration/scrip/laser.sh index aaa7b42..d8310b1 100755 --- a/multi_calibration/scrip/laser.sh +++ b/multi_calibration/scrip/laser.sh @@ -5,3 +5,4 @@ source devel/setup.bash echo "[INFO] Calibrating camera-laser extrinsic. " rosrun multi_calibration Extrinsic_filter.py rosrun multi_calibration laser_calib -i ~/Calibration_ws/src/UR_arm_camera_calibration/multi_calibration/laser/Target_Image -c ~/Calibration_ws/src/UR_arm_camera_calibration/multi_calibration/cfg/laser_calib.yaml +mv ./calib_results.txt ~/Calibration_ws/src/UR_arm_camera_calibration/multi_calibration/cfg/calib_results.txt \ No newline at end of file diff --git a/multi_calibration/scrip/vis_laser_calib_result.py b/multi_calibration/scrip/vis_laser_calib_result.py old mode 100644 new mode 100755 index 27ca1eb..7cf6d90 --- a/multi_calibration/scrip/vis_laser_calib_result.py +++ b/multi_calibration/scrip/vis_laser_calib_result.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding: utf-8 import numpy as np @@ -6,6 +6,8 @@ from mpl_toolkits.mplot3d import axes3d, Axes3D import math import sys +import os +import glob def draw_frame(ax, R, t): axis_len = 0.05 @@ -22,7 +24,8 @@ def draw_frame(ax, R, t): # read plane parameters and laser points -result_file = open(sys.argv[1]) +Home_path = os.path.expanduser('~') +result_file = open(Home_path +"/Calibration_ws/src/UR_arm_camera_calibration/multi_calibration/cfg/calib_results.txt") raw_data = result_file.readlines() plane_params = np.fromstring(raw_data[1].strip(), dtype=float, sep=',') print(plane_params)