Skip to content

Commit

Permalink
add filename kwarg in set camera extrinsics
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysimeonov committed Feb 22, 2022
1 parent c16fd76 commit ba647ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/airobot/utils/ros_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def get_tf_transform(tf_listener, tgt_frame, src_frame):
return list(trans), list(quat)


def read_cam_ext(robot_name):
def read_cam_ext(robot_name, filename='calib_base_to_cam.json'):
"""
Read the camera extrinsic information from calibration result.
Expand All @@ -110,7 +110,7 @@ def read_cam_ext(robot_name):
rospack = rospkg.RosPack()
data_path = rospack.get_path('hand_eye_calibration')
calib_file_path = os.path.join(data_path, 'result', robot_name,
'calib_base_to_cam.json')
filename)
with open(calib_file_path, 'r') as f:
calib_data = json.load(f)
cam_pos = np.array(calib_data['b_c_transform']['position'])
Expand Down

0 comments on commit ba647ee

Please sign in to comment.