How to get smooth acceleration with path planning ?

Typically: "How do I... ", "How can I... " questions
Post Reply
seasandwpy
Posts: 2
Joined: 21 Mar 2017, 16:33

How to get smooth acceleration with path planning ?

Post by seasandwpy » 07 Jan 2019, 15:09

HI,

I have simulated a cube with several gyros and accelerations to test a sensor fusion algorithm. I define a trajectory and use sim.setObjectPosition to set its desired positions. But the acceleration does not seem to be smooth. It looks like it is always accelerating and then stop in one timestep, which is not the case in the real world. I want to ask how to make the acceleration smooth numbers instead of jumping numbers?

timestamp, acceleration
5081747, 2.0963110896648
5081775, -2.096555561829
5081783, 2.0964798918735
5081796, -2.0967751211156

nex
Posts: 22
Joined: 07 Nov 2016, 15:48

Re: How to get smooth acceleration with path planning ?

Post by nex » 08 Jan 2019, 12:06

You probably have to apply forces, instead of setting the position directly, so that the physics engine can compute a gradual change.

Something from the category "Dynamics functionality" should suit your needs: http://www.coppeliarobotics.com/helpFil ... ctionality

sim.addForce and sim.addForceAndTorque seem to be good candidates.

nex
Posts: 22
Joined: 07 Nov 2016, 15:48

Re: How to get smooth acceleration with path planning ?

Post by nex » 08 Jan 2019, 12:22

http://www.coppeliarobotics.com/helpFil ... owPath.htm could be a better approach, since you can specify a path object and acceleration and velocity as parameters.

See also this forum post: viewtopic.php?t=5305

seasandwpy
Posts: 2
Joined: 21 Mar 2017, 16:33

Re: How to get smooth acceleration with path planning ?

Post by seasandwpy » 14 Jan 2019, 11:22

nex wrote:
08 Jan 2019, 12:22
http://www.coppeliarobotics.com/helpFil ... owPath.htm could be a better approach, since you can specify a path object and acceleration and velocity as parameters.

See also this forum post: viewtopic.php?t=5305
Hi,
i have used a dummy to follow a defined path but I can not let the cuboid and dummy move together. The cuboid is static when the dummy is moving and it is the parent of dummy. It looks like there were some example scenes about how to use dummy but i can't find them now. How can I attach the dummy and object together?

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

Re: How to get smooth acceleration with path planning ?

Post by coppelia » 16 Jan 2019, 08:36

Maybe this scene can help.

Cheers

nex
Posts: 22
Joined: 07 Nov 2016, 15:48

Re: How to get smooth acceleration with path planning ?

Post by nex » 16 Jan 2019, 13:21

In case you find a working solution for your initial problem, moving along a trajectory/path, I'd be interested in seeing your scene.

Post Reply