# [moveit] how to plan a trajectory using offset values in a subframe?

I have a tool (say a spoon) attached to a panda robot as its end effector, and it has a subframe "spoon/tip"

I would like to plan a series of waypoints relative to the subframe, i.e. relative to the spoon tip. So that I can generate a full trajectory going through these different waypoints.

For example, a waypoint that is -0.5 away from the "spoon/tip" frame on the y axis, followed by another waypoint that is offset by pi/2 on the pitch, then +1.2 on the x axis.

Is there any good way I can do this by using offset values relative to the "spoon/tip" frame, instead of doing translation/rotation calculations relative to the base frame first? I understand that a simple trajectory plan between only 2 points can be accomplished by using something like

  geometry_msgs::Pose target_pose1;
target_pose1.orientation.w = 1.0;
target_pose1.position.x = 0.28;
target_pose1.position.y = -0.2;
target_pose1.position.z = 0.5;
move_group_interface.setPoseTarget(target_pose1);
moveit::planning_interface::MoveGroupInterface::Plan my_plan;

bool success = (move_group_interface.plan(my_plan) == moveit::planning_interface::MoveItErrorCode::SUCCESS);


as this is part of the tutorial. But how to gracefully plan a trajectory for a tool/subframe only using offset values? I was trying to use group.computeCartesianPath(waypoints, eef_step, jump_threshold, trajectory) but it seems that I have to give the waypoints in the base frame instead of the subframe?