# How to generate a trajectory path from a series of points

I require some advice regarding how to generate a path planning algorithm that, when provided with a start pose (x,y,z) and orientation (x,y,z,yaw), a series of intermediate points (optional) and an end pose and orientation, the algorithm generates an optimal path. I have researched possible approaches, however many of different approaches seem to implement object aversion, which is not required in this instance. The algorithm will be implemented in python and ROS and shall be used to control the movement of a robot with 6 DOF. I initially considered using the Lagrange algorithm to calculate a polynomial equation that passes through each of the specified points, however the error margin seems quite high using this approach. Does any one have any suggestions?

Hi, it seems you have the poses (start, intermediate, and final) in cartesian space, one way is to convert them into joint space points and then you can use 1. time parameterization method from moveit either iterative spline parramterization or time-optimal trajectory parameterization, then you have time, velocity, and acceleration assign for each waypoint. after that you can use the the joint_trajcetory_controller to generate control commands for the robot by sampling the trajectory with anythe same frequency of the robot controller.