# Matlab smooth transition between stored configurations (rigid body tree robot )

I currently have a few joint configurations stored for a robot model in Matlab. When I play back and show the robot in different configurations, there is of course no smooth, but abrupt transition. Is there a way to generate all joint configurations in between 2 configurations, so it transitions smoothly? Or if there is any other ideas on how to reach a smooth trajectory, please let me know. Thanks!

I don't know how you're storing or recalling your presets, but you can put a Rate Limiter block between it and your joint and limit how quickly your joint reference changes.

I made a short clip for you - here I'm using a square wave set to 45*(pi/180) as the amplitude, with a frequency of 0.25 Hz. The net result is 90 degree motion (-45 to +45 degrees) and it switches position every 2 seconds.

You can see at the start that it flips immediately from one position to another. I then add a Rate Limiter block and set the rising and falling slew rates to 90*(pi/180) or 90 degrees per second. This means it takes a full second to go from -45 to +45 degrees, then stays in that position for another second (2 seconds total) before toggling position. Again the transition from +45 to -45 degrees is limited to 90 degrees per second, so it takes a full second to transition.