Disabling momentum so that a body stops instantaneously
Posted: Fri Jun 19, 2015 8:57 am
Hi everyone,
I'm working with a robot simulator called ARGoS https://github.com/ilpincy/argos3, which uses Chipmunk2D Physics. Given a two-wheeled robot, I can set the velocities of each wheel, and the simulator will calculate the linear and angular velocities of the body that represents the robot.
If a robot is moving in a straight line at a constant speed, and I suddenly set the wheel speeds to zero, the robot does not come to an immediate stop. It takes one or two updates of the physics engine for the robot to come to a complete stop, because the body has inertia.
Is there any way to disable the momentum of a body, such that it has no inertia and therefore stops instantaneously?
Thanks!
I'm working with a robot simulator called ARGoS https://github.com/ilpincy/argos3, which uses Chipmunk2D Physics. Given a two-wheeled robot, I can set the velocities of each wheel, and the simulator will calculate the linear and angular velocities of the body that represents the robot.
If a robot is moving in a straight line at a constant speed, and I suddenly set the wheel speeds to zero, the robot does not come to an immediate stop. It takes one or two updates of the physics engine for the robot to come to a complete stop, because the body has inertia.
Is there any way to disable the momentum of a body, such that it has no inertia and therefore stops instantaneously?
Thanks!