Learning by demonstration

I was wondering if the robot can learn by demonstration.
I want to move the joints by hand and make the robot to reproduce the movement i taught it.

Hello, you can hold the free drive button on the controller, move the robot into any position by hand and then save that position as a waypoint. I find this works for large movements, for finer control or to align the robot with a fixture the move controls on the pendant with the speed turned down very low are best.

It is possible in UR robots. You can create a .urp program were you can teach the robot pose by using the MoveJ function ( make sure you check the use joint values option). Then, set the way points using the free drive mode where you can move the robot by hand. I have attached a .urp file to accomplish whatever you have asked for. All you need to do is to select the waypoint node and change the robot pose in free drive according to your requirements. Hope this helped.
ash333.urp (2.3 KB)

@aswathamang is it possible the UR robot could actually repeat the whole freedrive movement?
For example: if I move the UR on freedrive from point A-B-C then again to A in a single movement. Can it repeat the same movement?

Is there a way to do that?

Ya it is possible @thakur.28 . I have done that in multiple ways.

  1. Using Urp (teach a point using free drive and make an appropriate program to reach the recorded point).

  2. Using Remote programming I have done it in multiple ways. For instance, recording the joint movements using RTDE continuously and replaying the robot joint values using ServoJ (this gives an exact replication of the robot’s movement while freedrive) and I have even recorded the joint values at particular moments and used moveJ commands to take the robot to the recorded values.

  3. Same thing was also done using getl() command to achieve this in Cartesian space.

when using movej by numbers of joints values, is there any jerks when doing movej?

No, not really, probably you have to tweak a bit on acc and vel to rectify that in case.

That was really helpful. I will give it a try.

Not exactly, but while I use MoveJ the Linear pattern isn’t quite maintained, so I switched back to MoveL

Hi, I’m doing something similar to this and I was hoping you can help me with a problem.
a related thread I posted
Right now I am using only Tool Position to move to a recorded waypoint, made using createVariablePositionConfig, using MoveJ.
For precision, I also want to use the Joint Positions but createVariablePositionConfig does not accept Joint Positions as input.
If possible, I would like to maintain use of createVariablePositionConfig but at the same time include Joint Positions.

Can you give me a sample of your MoveJ? I have a feeling you used URScript.

I am not sure on whether I gave a correct answer to your question ., but I have given an answer as far as I could understand. Please have a look at the answer that I have put in the thread that you have mentioned above and please let me know if you face any issues.