'Trajectory planning for a ball throwing robot

I m using mujoco_py to apply computed torque on a kuka iiwa14 Robot and this is my code:#computed-torque-control:

kp=750
kv=200
list=[1,1.5,0,1,0,0,0]
qsoll=np.array(list)
qacc=-kv*qvel+kp*(qsoll-qpos)
tau=np.dot(mass_matrix,qacc)+C
sim.data.ctrl[1]=tau[0]
sim.data.ctrl[4]=tau[1]
sim.data.ctrl[7]=tau[2]
sim.data.ctrl[10]=tau[3]
sim.data.ctrl[13]=tau[4]
sim.data.ctrl[17]=tau[5]
sim.data.ctrl[20]=tau[6]

Now I want to change that desired position 'qsoll' with a trajectory that the robot can follow while throwing a ball. If someone could help me I ll be so grateful.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source