How can I apply my trajectory on a robot to simulation?

Typically: "How do I... ", "How can I... " questions
Post Reply
jianye
Posts: 46
Joined: 16 Oct 2019, 13:58

How can I apply my trajectory on a robot to simulation?

Post by jianye »

Hello,

I have waypoints for a 7-DoF from a path planner and with the help of time parameterization, I receive the time, position, velocity, and acceleration information for each joint. I hope the manipulator can run according to the information mentioned above and finish a trajectory.

How can I do the simulation? Is there a similar demo?

Thank you in advance.

Jian

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: How can I apply my trajectory on a robot to simulation?

Post by coppelia »

Hello Jian,

you have several ways to compute and also several ways to execute a trajectory.
Now let's suppose you have computed a trajectory for your robot in the configuration space. The simplest would be go from current configuration to the target configuration. And the simplest with this scenario would be to move the same amount in each simulation step, until you have reached the target configuration. Now, to go a little bit more realistic/complicated, you could decide to move to your target configuration via a specific velocity/acceleration profile. This you can do using the Reflexxes Motion Library for CoppeliaSim, i.e. functions like sim.rmlMoveToJointPositions, sim.rmlPos, sim.rmlStep, sim.rmlRemove. This is illustrated in this demo scene.
Now you can go even more complicated by having wayspoints in the configuration space. This is actually quite complex to handle, if you want to avoid infinite accelerations in joints: e.g. executing a square motion in the configuration space can only work if you decelerate to zero velocity in each corner. In that case, it would be the example described above, where you would move from one configuration to a target configuration, then execute the next trajectory section.
Typically however, such a square motion is never executed as a square motion, rather, the edges are rounded (not in the trajectory, but in the motion execution). this is not easy and there are several ways of doing this. In this case, I would probably interpolate positions near the edges and/or use the sim.rmlVel too.

Cheers

Post Reply