Gazebo | Ignition | Community
Ask Your Question

Why does an SDF model moved through /gazebo/set_model_state service doesnt colide with objects

asked 2016-09-29 16:54:48 -0500

Duckfrost gravatar image

Hi, I am moving an sdf cube setting its state through the /gazebo/set_model_state service, through python. The SDF is as follows, and is spawned through the gazebo/spawn_sdf_model service. I have tried it with and without the inertial component:

<?xml version="1.0"?>
<sdf version="1.4">
    <model name="piece">
        <link name="link">
            <collision name="collision">
                    <box><size>0.5 0.5 0.5</size></box>

            <visual name="visual">
                    <box><size>0.5 0.5 0.5</size></box>



Its moving perfectly but when a standard cube is placed in its trajectory, it just crosses as if it wasn't there. But if the movement stops and I move the standard cube a bit , then the collisions come into place. image description

Is there a way of update the physics in the same way that it gets updated when the standard cube is moved by hand? Am I missing something in how gazebo works? Extra Data: ROS Version: kinetic GAzebo Version: 7.0


edit retag flag offensive close merge delete


Could you put on your Python code which moves that object by /gazebo/set_model_state topic?

benyamin gravatar imagebenyamin ( 2019-05-24 06:59:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-05 05:53:02 -0500

Duckfrost gravatar image

Solved the issue using URDF files instead of SDF files. For some reason my SDF files dont work properly.

  • If you give the cube a 1gram mass, it just pops to a non coliding position with the 1 Kilogram Box.

image description

  • If you give the cube a 100 Kilogram mass, it moves the 1 Kilogram Box.

image description

This doesn't make any of sense to me because, although it has less mass, it's an unbreakable object with an "Infinite Force" moving it. It should do exactly the same.
Any ideas?

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-09-29 16:54:48 -0500

Seen: 564 times

Last updated: Nov 05 '16