Make the robot move along a path

Typically: "How do I... ", "How can I... " questions
Post Reply
lumeqi
Posts: 32
Joined: 04 Dec 2023, 06:20

Make the robot move along a path

Post by lumeqi »

Hello,
May I ask how to make the end of the UR10 robotic arm move along a path, ensuring that the position and direction of the robotic arm move along the path. I referred to https://manual.coppeliarobotics.com/en/paths.htm. The example in the link is to make an object move along a path. Although I successfully tried to move the object along the Path, my robotic arm did not move well along the Path, and the position and direction of the end of the robotic arm were both offset.
My method is to merge pos and quat into pose and call sim.moveToPose.

Code: Select all

pos = sim.getPathInterpolatedConfig(self.pathPositions, self.pathLengths, self.posAlongPath)
quat = sim.getPathInterpolatedConfig(self.pathQuaternions, self.pathLengths, self.posAlongPath, None, [2, 2, 2, 2])
Is there a better way to move the end of the robotic arm along the Path? Thank you.

fferri
Posts: 1242
Joined: 09 Sep 2013, 19:28

Re: Make the robot move along a path

Post by fferri »

Simply move the IK target dummy onto the (interpolated) pose returned by sim.getPathInterpolatedConfig.

The script of the robot will handle IK, e.g. moving the arm so that IK tip's pose matches IK target's pose (you have to create such script / add IK handling to such script: there's plenty of example scenes and tutorials).

mecabot
Posts: 3
Joined: 07 May 2024, 05:34

Re: Make the robot move along a path

Post by mecabot »

Please could you explain a little bit how to Simply move the IK target dummy onto the (interpolated) pose returned by sim.getPathInterpolatedConfig.?

lumeqi
Posts: 32
Joined: 04 Dec 2023, 06:20

Re: Make the robot move along a path

Post by lumeqi »

fferri wrote: 06 May 2024, 13:13 Simply move the IK target dummy onto the (interpolated) pose returned by sim.getPathInterpolatedConfig.

The script of the robot will handle IK, e.g. moving the arm so that IK tip's pose matches IK target's pose (you have to create such script / add IK handling to such script: there's plenty of example scenes and tutorials).
Hello,
Thank you very much for providing the solution. I conducted the experiment and achieved success.

lumeqi
Posts: 32
Joined: 04 Dec 2023, 06:20

Re: Make the robot move along a path

Post by lumeqi »

mecabot wrote: 07 May 2024, 05:38 Please could you explain a little bit how to Simply move the IK target dummy onto the (interpolated) pose returned by sim.getPathInterpolatedConfig.?
Apply the pos and quat obtained from sim.getPathInterpolatedConfiguration to the target dummy of the robot, that is, set the position and quaternion for the target dummy.

mecabot
Posts: 3
Joined: 07 May 2024, 05:34

Re: Make the robot move along a path

Post by mecabot »

Could you please provide a piece of code I can use to use the path information? thanks

fferri
Posts: 1242
Joined: 09 Sep 2013, 19:28

Re: Make the robot move along a path

Post by fferri »

mecabot wrote: 07 May 2024, 20:43 Could you please provide a piece of code I can use to use the path information? thanks
https://manual.coppeliarobotics.com/en/paths.htm

Post Reply