Gazebo | Ignition | Community
Ask Your Question

why the box turn over when set velocity?

asked 2019-08-27 21:21:13 -0500

Lays gravatar image

Hi friends, I am following this tutorial Model plugins.

In this tutorial, set a volocity to the box:

this->model->SetLinearVel(ignition::math::Vector3d(.3, 0, 0));

but when simulate, the box turn over, like this: image description

so why? is it a bug? thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-08-28 05:53:31 -0500

kumpakri gravatar image

updated 2019-08-28 05:54:02 -0500

If the box and the ground has the coefficient of friction bigger than 0, this behavior is correct. The box gets caught by the floor and tripps over. Just as in real life.

edit flag offensive delete link more


thanks, but how to change the coefficient of friction? In the gui, I did not find how to change it.

Lays gravatar imageLays ( 2019-08-28 06:02:00 -0500 )edit

You can set it in GUI:

right click on the model -> Edit Model  -> right click on the link -> Open Link Inspector -> Collision tab ->  drop down the collision -> Srurface/Friction/Mu edit value

Or in SDF code:

kumpakri gravatar imagekumpakri ( 2019-08-28 07:11:09 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-08-27 21:21:13 -0500

Seen: 142 times

Last updated: Aug 28 '19