Hello Andrea,
It is my understanding that you are working on creating a real-time trajectory for a robot using the waypoints that are available to you.
This can be achieved by using tools from the Robotics System Toolbox and a Simulink model.
For a sample demonstration of the above process, kindly refer to the following steps:
- Start by defining your desired waypoints, which should consist of a point matrix.
- Use the ‘waypointTrajectory’ System object from the Robotic System Toolbox to generate the specific trajectory.
- The 'release' function is available to allow for the modification of any properties within the 'waypointTrajectory' object.
- Within your Simulink model, incorporate a MATLAB Function Block to compute and output the next waypoint, considering the 'speed' input parameter for the function.
- To enable the robot to repeat the trajectory from the beginning after reaching the final waypoint, you can include a conditional check within the MATLAB Function Block.
- The speed input can be given in the Simulink model using the Slider block.
- Finally, connect the output of the MATLAB Function Block to the appropriate blocks or systems that control your robot's foot movement.
Kindly refer to the following MATLAB Documentation(s) for further information on how to use the mentioned functions:
- ‘waypointTrajectory’: https://www.mathworks.com/help/robotics/ref/waypointtrajectory-system-object.html
- ‘release’: https://www.mathworks.com/help/fusion/ref/waypointtrajectory-system-object.html#mw_f148e3a4-b09a-4af8-81fb-e86297d24b01
- MATLAB Function Block: https://www.mathworks.com/help/simulink/ug/what-is-a-matlab-function-block.html
- Slider Block: https://www.mathworks.com/help/simulink/slref/slider.html
- Robotics System Toolbox: https://www.mathworks.com/help/robotics/index.html
Hope this helps.
Best Regards,
Gowtham