defining a robot not defined in urdf (or sdf/MJCF) in pybullet

Post Reply
nojo
Posts: 1
Joined: Fri Mar 17, 2023 9:51 am

defining a robot not defined in urdf (or sdf/MJCF) in pybullet

Post by nojo »

I am relatively new to the world of robotic simulations, so please forgive my ignorance on the matter. I am trying to design and simulate a tetrahedral robot (like this - https://attic.gsfc.nasa.gov/ants/art.html). To simulate the robot, I chose pybullet as a simulator - as it seemed a relatively straightforward physics simulator, supports robotic simulations and I have good experience in python. However, when trying to input the .urdf file, I get the error that no root link is found because I didn't define my structure as a tree. It has further come to my attention that I will also need special joints (and perhaps links) that aren't modelled by the standard .urdf joints. I have included the error and the code (for just one base triangular face) of the robot's urdf design below. With this info, I thought defining my robot (not in urdf format) would be best in pybullet. I have been doing extensive research, but I can't seem to find out how to define a custom robot in pybullet (I have only seen it in pure bullet physics) as it seems that the standard is just to load urdf format. My question is if it is possible to define custom robot structures in urdf and how would I go about doing it if so? or otherwise if it is possible in urdf format or if I have to use a different physics simulator altogether? (Or would I have to build my own for this?)

I tried to include all the relative points and explain my thinking. Still, I am clearly very new to this so let me know if there is any more information you need and any advice/input on my problem or concept would be greatly appreciated! Thanks so much! :)

this is the code for the triangular base for the tetrahedral robot i want to create:

<link name="world"></link>

<link name="link1">
<visual>
<geometry>
<cylinder length="1" radius="0.2"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0"/>
</visual>
</link>

<link name="link2">
<visual>
<geometry>
<cylinder length="1" radius="0.2"/>
</geometry>
<origin rpy="2.0944 0 0" xyz="1 0 0"/>
</visual>
</link>

<joint name="jointA" type="continuous">
<parent link="link1"/>
<child link="link2"/>
<origin xyz="1 0 0"/>
</joint>

<link name="link3">
<visual>
<geometry>
<cylinder length="1" radius="0.2"/>
</geometry>
<origin rpy="3.66519 0 0" xyz="0.5 0.75 0"/>
</visual>
</link>

<joint name="jointB" type="continuous">
<parent link="link2"/>
<child link="link3"/>
<origin xyz="0.5 0.75 0"/>
</joint>

<joint name="jointC" type="continuous">
<parent link="link3"/>
<child link="link1"/>
<origin xyz="0 0 0"/>
</joint>

this is the error I get: URDF without root link found
Post Reply