Skip to content

Commit

Permalink
laser_check
Browse files Browse the repository at this point in the history
  • Loading branch information
archit2604 committed Dec 6, 2022
1 parent 9f92277 commit 3125eff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion multi_calibration/launch/auto_calibration.launch
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,7 @@
<group if="$(eval arg('laser_cam') == 2)">
<node name="foo" pkg="multi_calibration" type="laser.sh" output="screen" />
</group>

<group if="$(eval arg('laser_cam') == 3)">
<node pkg="multi_calibration" name="laser_cali" type="vis_laser_calib_result.py" output="screen"/>
</group>
</launch>
1 change: 1 addition & 0 deletions multi_calibration/scrip/laser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions multi_calibration/scrip/vis_laser_calib_result.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# coding: utf-8

import numpy as np
from matplotlib import pyplot as plt
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
Expand All @@ -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)
Expand Down

0 comments on commit 3125eff

Please sign in to comment.