Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MAEG 5755 2023-2024 PROJECT GUIDE

(DEADLINE: 2023/10/23 23:59:59)

To help you finish the project easily and not leave everything in the final week, we break down the project into several small tasks.  You are required to complete them by the given deadlines.  Given the fact that you have to finish the project anyway, I hope this guideline can reduce your pain.

1. Function Descriptions. Trajectory generation for both 3DoF and 6DoF Robot.

You are suggested to write five functions for trajectory generation, four for 3DoF, and one for 6DoF. Remember, this is just a guideline with deadlines.  The function name, input, and output are not restricted. You can define the name, input, and output on your own if you can generate the final text result correctly (the format will be introduced later).

(a)  Generate cubic trajectories for 3DoF robot

Example (Python):

generate_traj_cubic_3dof(start_point,  end_point,  freq,  total_time):

x_list  =  []

y_list  =  []

z_list  =  []

#  your  codes  here

for  . . . :

...

x_list.append(...)

y_list.append(...)

z_list.append(...)

result  =  [x_list,  y_list,  z_list]

return  result

Description: This function should generate a cubic trajectory for the given input. Assume the start velocity and the end velocity are both zero.

Input: Start position, end position, frequency, and time interval.

Output: In A 2D array, the first dimension is the axis index, and the second dimension is the value for each coordinate at each frame.

(b)  Generate cubic trajectories with intermediate points for 3DoF robot

Description: This function should generate a cubic trajectory for the given input. Assume the start velocity and the end velocity are both zero.  You should be able to choose the velocity mode for each intermediate point (i.e.  equal velocity and equal acceleration, zero velocity, and average velocity.

Input: Position list, time list, velocity mode list, frequency, and time interval.

Output: In A 2D array, the first dimension is the axis index, and the second dimension is the value for each coordinate at each frame.

(c)  Generate quintic trajectories for 3DoF robot

Description: This function should generate a quintic trajectory for the given input.

Input: Start position, end position, start velocity, end velocity, start acceleration, end acceler- ation,frequency, and time interval.

Output: In A 2D array, the first dimension is the axis index, and the second dimension is the value for each coordinate at each frame.

(d)  Generate linear trajectories with parabolic blends for 3DoF robot

Description: This function should generate linear trajectories with parabolic blends. Assume the start velocity and the end velocity are both zero.

Input: Start position, end position, time to start linear, frequency, and time interval.

Output: In A 2D array, the first dimension is the axis index, and the second dimension is the value for each coordinate at each frame.

(e)  Generate cubic trajectories with intermediate points for 6DoF robot

Description: This function should generate a cubic trajectory for the given input. Assume the start velocity and the end velocity are both zero.  You should be able to choose the velocity mode for each intermediate point (i.e.  equal velocity and equal acceleration, zero velocity, and average velocity.

Input: Position list, time list, velocity mode list, frequency, and time interval.

Output: In A 2D array, the first dimension is the axis index, and the second dimension is the value for each coordinate at each frame.

(f)  Convert 2D list to text

Example (Python):

def  save_traj(trajectories,  filename):

result  =  ""

for  trajectory  in  trajectories:

result  +=  ",".join([str(x)  for  x  in  trajectory])

result  +=  ";"

f  =  open(filename, mode="w")

f.write(result)

f.close()

Description: This function should convert the 2D array into a text form.

Input: Trajectory 2D array.

Output: A string that describes the trajectory. The format should be:

< x1  >,< x2  >,...,< xn  >;< y1  >,< y2  >,...,< yn  >;< z1  >,< z2  >,...,< zn  >;

or (in 6DoF):

< x1  >,< x2  >,...,< xn  >;< y1  >,< y2  >,...,< yn  >;< z1  >,< z2  >,...,< zn  >;< rotx1  >, < rotx2  >,...,< rotxn  >;< roty1  >,< roty2  >,...,< rotyn  >;< rotz1  >,< rotz2  >,...,< rotzn  >;

After you finish all the functions, you can generate trajectories and use the online simulator to test.

2.  Trajectory Generation.

You are required to use the functions you write to generate the following trajectories.

2.1.  3DoF Cubic Trajectory

Description: Generate a 3DoF cubic trajectory go through points p1 , p2 , p3  by time t1 , t2 , t3 , please use equal acceleration mode.

Input: p1  = (0, 0, 0), p2  = (0, 0, 0), p3  = (0, 0, 0);t1  = 0, t2  = 2, t3  = 2

Output: A text file that follows the format mentioned in section 1(f).

2.2.  3DoF Linear Trajectory with Parabolic Blends

Description:  Generate a 3DoF linear Trajectory with parabolic blends go through points p1 , p2 , p3 by time t1 , t2 , t3 , please use zero velocity mode.

Input: p1  = (0, 0, 0, 0, 0, 0), p2  = (0, 0, 0, 0, 0, 0), p3  = (0, 0, 0, 0, 0, 0);t1  = 0, t2  = 2, t3  = 2 Output: A text file that follows the format mentioned in section 1(f).

2.3.  6DoF Cubic Trajectory

Description: Generate a 6DoF cubic trajectory go through points p1 , p2 , p3  by time t1 , t2 , t3 , please use zero velocity mode.

Input: p1  = (0, 0, 0, 0, 0, 0), p2  = (0, 0, 0, 0, 0, 0), p3  = (0, 0, 0, 0, 0, 0);t1  = 0, t2  = 2, t3  = 2 Output: A text file that follows the format mentioned in section 1(f).

In light of the above-mentioned requirements, each group is expected to provide the following works by the due date:

1.  Code Files.

2.  Trajectory Files.

Please zip your files and submit them on Blackboard.