File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -73,20 +73,27 @@ class MotionClient(Node):
7373
7474 def __init__ (self ):
7575 super ().__init__ ("motion_client" )
76+ toolpath_default = os .path .join (
77+ get_package_share_directory ("snp_motion_planning" ),
78+ "config" ,
79+ "toolpath.yaml" ,
80+ )
81+ self .declare_parameter ("toolpath_file" , toolpath_default )
82+ self .toolpath_file = self .get_parameter ("toolpath_file" ).get_parameter_value ().string_value
83+
7684 self .planner = self .create_client (GenerateMotionPlan , "/generate_motion_plan" )
7785 self .controller = ActionClient (
7886 self ,
7987 FollowJointTrajectory ,
8088 "/scaled_joint_trajectory_controller/follow_joint_trajectory" ,
8189 )
8290
91+
8392 def request_plan (self ):
8493 """Request a motion plan from the motion planning service."""
8594 req = GenerateMotionPlan .Request ()
86- inspection_toolpath = create_toolpath_from_yaml (
87- "/workspace/src/scan_n_plan_workshop/snp_motion_planning/config/toolpath.yaml"
88- )
89- # print(inspection_toolpath)
95+ inspection_toolpath = create_toolpath_from_yaml (self .toolpath_file )
96+
9097 req .tool_paths = [inspection_toolpath ]
9198 req .motion_group = "manipulator"
9299 req .tcp_frame = "tcp"
You can’t perform that action at this time.
0 commit comments