Skip to content

Commit 12184db

Browse files
Update sort_fruit.py
1 parent 1175d33 commit 12184db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/applications/transporter_deployment/sort_fruit.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
"""A basic debug/poc of identifying fruits with dino and sorting them."""
2+
import os
23
import yaml
34
import numpy as np
45
import rclpy
56
from robot_workspaces.franka_table import FrankaTable
67
from scipy.spatial.transform import Rotation as R
78

9+
script_dir = os.path.dirname(os.path.abspath(__file__))
10+
yaml_file_path = os.path.join(script_dir, 'config', 'franka_table_real.yaml')
11+
812
def sort_apples(config):
913
"""
1014
Demonstrate apple sorting with basic object detection.
@@ -72,7 +76,7 @@ def sample_pose_in_rect(location, size):
7276
env.close()
7377

7478
def main(args=None):
75-
with open('./config/franka_table_real.yaml', 'r') as file:
79+
with open(yaml_file_path, 'r') as file:
7680
config = yaml.safe_load(file)
7781

7882
rclpy.init(args=args)

0 commit comments

Comments
 (0)