Hello!
I post here my scene. Inside, I created a Scara robot and a producer of pure shapes to simulate random pieces that flow on a conveyor belt. My purpose is to follow these random pieces once they pass through a proximity sensor that gives me the handle of the current piece. After some time I would like to grab the piece and to move it to the other conveyor. I hope the main idea is clear. My questions are:
- When the piece passes through the proximity sensor the Scara robot makes a sort of "jump" and I read that to avoid this issue, I should place the target dummy at the tip dummy position. I did it in the function to enable the ik mode but it seems that something is wrong.
- The suction pad doesn't grab the objects but I think there is something wrong with the high where I place the target.
- When I move my robot in the other conveyor belt It doesn't reach it but it moves in the position (0,0,0) and I am wondering why.

you are trying to solve several problems at once, you should focus on one problem at a time.
First, with your scara robot, I am not sure it is the right approach to move the end-effector in Euclidean space, since you'll have to deal with the singular configurations of your robot (typically at simulation start). I'd run the robot in configuration space.
In any case, you can't simply have the target IK dummy jump into a position instantaneously: you should gradually guide and move that dummy to where you want to be with your end-effector. You'll have to use the sim.rmlMoveToPosition for instance.

Also, if you want your sucction cup to work, it should come closer to the part (the sucction cup works with a proximity sensor that will first have to detect the part).

Thank you for your reply.
For what concern the suction pad, I supposed the problem was the distance between the pad and the object and I will solve it later. But my main issue is the other one. When a piece is created, I want to follow it with my end-effector. Why? Because I want to record the time that my scara robot takes to reach the object. After that, I would like to compare my Scara with a redundant Scara robot, always in terms of time took to reach several objects. For this reason, I thought to make my target child of the object and then, using the sim.rmlMoveToPosition, bring the end effector closed to the object with the max velocity and the max acceleration. But when I use sim.setObjectParent to put the IK target in the wanted position, the end effector jumps immediactely there, without using the sim.rmlMovetoPosition. And I'm wondering why.
Thank you.

Maybe it is a good idea to first start with something simple, and go step-by-step, since what you are trying to achieve is not that straight-forward.
Have a look at this scene, that illustrates in a simple way how the RML-functions can be used to move a joint (the approach is very similar in case you want to move an object via the RML-functions).

Because you are not using the RML functionality to move your target dummy. If you did, your target dummy would not jump (or you are using the RML functions not correctly). Of course you can also, when your robot is in dynamic mode, set the joint upper velocity limit . But then you are not in control of the end-effector trajectory, which might not be a straight line anymore.

Two posts before, you said "you can't simply have the target IK dummy jump into a position instantaneously: you should gradually guide and move that dummy to where you want to be with your end-effector". I understand the idea but I can't do that. Because my robot should know that it must follow the object where the target is attached to. If I gradually move the target dummy to the object, then the tip dummy should follow it till the object. But this is not what I want. I would like that the robot intercepts (with his tip dummy attched to the end-effector) the object ( where the target dummy should be attached to) as soon as possible , once defined his joint velocity and acceleration limits. I give you an example: when the proximity sensor sees an object, the robot should start to follow it ( which is moving on a conveyor belt) with the minimum actuation time.
I don't know if it is possible to do or if I'm not able to understand if you got the idea.
Thank you.

I replace here my question. Is it possible with V-rep to reach a moving object with the end-effector of a robot with the MINIMUM ACTUATION TIME (the minimum time used by a motor to make a movement with velocity and acceleration limits)? So, without knowing WHERE the object will be reached but just knowing the joint velocity and acceleration limits. I don't need that my end-effector follows a straight line. The trajectory followed by the end effector will be the one which allows my robot to reach as soon as possible the object. In a positive case , what would be the best way to do it?
Cheers.

You can do this, but how you do it and how the result looks like really depends on the used algorithm. It is not such an easy task. There are different approaches, but this is not dependent on V-REP. V-REP offers tools, you create the algorithms.

Here a raw example of part tracking from within a threaded child script: