How does the basePosition argument in loadURDF() work?
Posted: Tue May 11, 2021 4:20 pm
I am new to pybullet and URDFs, so I am just playing around and get a feel of what each function does. I created a simple URDF file of a box:
and loaded it using
what I saw was the box started at [0, 0, 2] and started to fall until it collides with the ground. If so what is the purpose of setting this basePosition? I get it why you would like to change the basePosition along x and y but what is the purpose of the basePosition z?
Code: Select all
<robot name="box">
<link name="base_link">
<visual>
<geometry>
<box size="1.0 1.0 1.0"/>
</geometry>
<origin xyz="0.0 0.0 0.0"/>
</visual>
<collision>
<geometry>
<box size="1.0 1.0 1.0"/>
</geometry>
<origin xyz="0.0 0.0 0.0"/>
</collision>
</link>
</robot>
Code: Select all
p.loadURDF("box.urdf", basePosition=[0.0, 0.0, 2.0])