Gazebo | Ignition | Community
Ask Your Question
0

SDF: How to fix a model to the world?

asked 2018-07-23 15:55:15 -0600

pbelanger gravatar image

Hello,

So I've set up an arm model in an SDF file and have input correct values for mass, CoM, and inertia tensor, but am having trouble figuring out how to fix the arm to the world. I have tried giving the base of the arm an arbitrarily high mass, but this does not seem to work well. I figure that there must be a method to hold the base of the arm static relative to the default ground_plane in the gazebo world but can't seem to figure it out. All solutions seem to be using URDF, which I am not.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
-1

answered 2018-07-24 09:18:54 -0600

pbelanger gravatar image

I figured out what I was doing wrong here. When I tried to specify a link to the world, I didn't specify the model name.

A link like the following will prevent the link named base of a model named arm from moving relative to the world:

<link name="world_fix">
    <parent>world</parent>
    <child>arm::base</child>
</link>

Placing this in the root of your <model> will then prevent the base from moving.

edit flag offensive delete link more

Comments

Shouldn't it rather be a fixed type joint, as described in this tutorial? http://gazebosim.org/tutorials/?tut=ros_urdf

maksymczech gravatar imagemaksymczech ( 2018-09-11 05:45:55 -0600 )edit
0

answered 2022-04-18 09:43:46 -0600

weirdcookie gravatar image

for me, what worked was adding this inside the <model> in the .sdf file

<link name="world_fix"> 
    </link> <!-- I needed to close the link tag -->
    <joint name ="weld" type="fixed">
        <parent>world</parent> 
        <child>base</child> <!-- put here the name of the base link -->
    </joint> <!-- close the joint tag -->

Ps: Using noetic and gazebo 11 and sdf version 1.7

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-07-23 15:51:35 -0600

Seen: 3,405 times

Last updated: Apr 18 '22