<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13414" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2022-04-05T15:40:15+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13414</id>

		<entry>
		<author><name><![CDATA[rtpsf]]></name></author>
		<updated>2022-04-05T15:40:15+00:00</updated>

		<published>2022-04-05T15:40:15+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43972#p43972</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43972#p43972"/>
		<title type="html"><![CDATA[Create joint between urdf-files]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43972#p43972"><![CDATA[
Hi everyone,<br>I want to programmatically create a fixed joint between multiple quadcopters, mid-flight, using pybullet.<br><br>I used the <a href="https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/gym/pybullet_utils/examples/combineUrdf.py" class="postlink">example</a> for combining urdf-files and changed the imported urdf-files to my quadcopter model.<br>By doing so, I get an error in the <em class="text-italics">createMultiBody</em> method because <em class="text-italics">createCollisionShape</em> failed.<br><br>What do I have to change in my model and/or in the python code to achieve my described goal?<br><br><br>For the quadcopter model I used the following urdf:<div class="codebox"><p>Code: </p><pre><code>&lt;?xml version="1.0" ?&gt;&lt;robot name="cf2"&gt;  &lt;properties arm="0.0397" kf="3.16e-10" km="7.94e-12" thrust2weight="2.25" max_speed_kmh="30" gnd_eff_coeff="11.36859" prop_radius="2.31348e-2" drag_coeff_xy="9.1785e-7" drag_coeff_z="10.311e-7" dw_coeff_1="2267.18" dw_coeff_2=".16" dw_coeff_3="-.11" /&gt;  &lt;link name="base_link"&gt;     &lt;inertial&gt;      &lt;origin rpy="0 0 0" xyz="0 0 0"/&gt;      &lt;mass value="0.027"/&gt;      &lt;inertia ixx="1.4e-5" ixy="0.0" ixz="0.0" iyy="1.4e-5" iyz="0.0" izz="2.17e-5"/&gt;    &lt;/inertial&gt;    &lt;visual&gt;      &lt;origin rpy="0 0 55" xyz="0 0 0"/&gt;      &lt;geometry&gt;        &lt;mesh filename="./cf2.dae" scale=" 1 1 1"/&gt;      &lt;/geometry&gt;       &lt;material name="grey"&gt;        &lt;color rgba=".5 .5 .5 1"/&gt;      &lt;/material&gt;     &lt;/visual&gt;    &lt;collision&gt;      &lt;origin rpy="0 0 0" xyz="0 0 0"/&gt;      &lt;geometry&gt;        &lt;cylinder radius=".06" length=".025"/&gt;      &lt;/geometry&gt;    &lt;/collision&gt;    &lt;/link&gt;  &lt;link name="prop0_link"&gt;    &lt;inertial&gt;      &lt;origin rpy="0 0 0" xyz="0.028 0.028 0"/&gt;      &lt;mass value="0"/&gt;      &lt;inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/&gt;    &lt;/inertial&gt;  &lt;/link&gt;  &lt;joint name="prop0_joint" type="fixed"&gt;    &lt;parent link="base_link"/&gt;    &lt;child link="prop0_link"/&gt;  &lt;/joint&gt;  &lt;link name="prop1_link"&gt;    &lt;inertial&gt;      &lt;origin rpy="0 0 0" xyz="-0.028 0.028 0"/&gt;      &lt;mass value="0"/&gt;      &lt;inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/&gt;    &lt;/inertial&gt;  &lt;/link&gt;  &lt;joint name="prop1_joint" type="fixed"&gt;    &lt;parent link="base_link"/&gt;    &lt;child link="prop1_link"/&gt;  &lt;/joint&gt;  &lt;link name="prop2_link"&gt;    &lt;inertial&gt;      &lt;origin rpy="0 0 0" xyz="-0.028 -0.028 0"/&gt;      &lt;mass value="0"/&gt;      &lt;inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/&gt;    &lt;/inertial&gt;  &lt;/link&gt;  &lt;joint name="prop2_joint" type="fixed"&gt;    &lt;parent link="base_link"/&gt;    &lt;child link="prop2_link"/&gt;  &lt;/joint&gt;  &lt;link name="prop3_link"&gt;    &lt;inertial&gt;      &lt;origin rpy="0 0 0" xyz="0.028 -0.028 0"/&gt;      &lt;mass value="0"/&gt;      &lt;inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/&gt;    &lt;/inertial&gt;  &lt;/link&gt;  &lt;joint name="prop3_joint" type="fixed"&gt;    &lt;parent link="base_link"/&gt;    &lt;child link="prop3_link"/&gt;  &lt;/joint&gt;  &lt;link name="center_of_mass_link"&gt;    &lt;inertial&gt;      &lt;origin rpy="0 0 0" xyz="0 0 0"/&gt;      &lt;mass value="0"/&gt;      &lt;inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/&gt;    &lt;/inertial&gt;  &lt;/link&gt;  &lt;joint name="center_of_mass_joint" type="fixed"&gt;    &lt;parent link="base_link"/&gt;    &lt;child link="center_of_mass_link"/&gt;  &lt;/joint&gt;&lt;/robot&gt;</code></pre></div>Thank you for any kind of help!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14303">rtpsf</a> — Tue Apr 05, 2022 3:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
