<?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/13231" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-07-03T13:42:10+00:00</updated>

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

		<entry>
		<author><name><![CDATA[chrischii]]></name></author>
		<updated>2021-07-03T13:42:10+00:00</updated>

		<published>2021-07-03T13:42:10+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43471#p43471</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43471#p43471"/>
		<title type="html"><![CDATA[Inverse kinematic, convergence Problems only if using STL files]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43471#p43471"><![CDATA[
Hi,<br><br>I am a PhD student trying  to use PyBullet for clash simulations.<br><br>I have set up a model using an URDF file consisting of bodies with geometry described with cylinders. <br><div class="codebox"><p>Code: </p><pre><code>  &lt;link name="part6"&gt;  &lt;inertial&gt;    &lt;origin rpy="0 0 0" xyz="0 0 0"/&gt;    &lt;mass value="1e-6"/&gt;    &lt;inertia ixx="1e-6" ixy="1e-6" ixz="1e-6" iyy="1e-6" iyz="1e-6" izz="1e-6"/&gt;  &lt;/inertial&gt;  &lt;visual&gt;    &lt;origin rpy="1.57079 0 0" xyz="0 -1 0"/&gt;    &lt;geometry&gt;        &lt;cylinder radius="0.05" length="2"/&gt;    &lt;/geometry&gt;    &lt;material name="Green"/&gt;  &lt;/visual&gt;  &lt;collision&gt;    &lt;origin rpy="1.57079 0 0" xyz="0 -1 0"/&gt;    &lt;geometry&gt;        &lt;cylinder radius="0.05" length="2"/&gt;    &lt;/geometry&gt;  &lt;/collision&gt;  &lt;/link&gt;  </code></pre></div>This model converges, the residuum is very small.<br><blockquote class="uncited"><div>&gt;&gt;&gt; simulate(steps_)<br>result: ({'islandId': 8, 'numBodies': 9, 'numIterationsUsed': 13640, 'remainingResidual': 1.3439036802013416e-06},)<br>result: ({'islandId': 8, 'numBodies': 9, 'numIterationsUsed': 7394348, 'remainingResidual': 9.57627865711726e-06},)</div></blockquote><br>As soon as I replace one part with STL geometry instead of cylinders, the residuum is way too high. Result is that joints constraints are not working and bodies are moving free in space.<br><div class="codebox"><p>Code: </p><pre><code> &lt;link name="part6"&gt;  &lt;inertial&gt;    &lt;origin rpy="0 0 0" xyz="0 0 0 "/&gt;    &lt;mass value="1e-6"/&gt;    &lt;inertia ixx="1e-6" ixy="1e-6" ixz="1e-6" iyy="1e-6" iyz="1e-6" izz="1e-6"/&gt;  &lt;/inertial&gt;  &lt;visual&gt;    &lt;origin rpy="0 0 0" xyz="0 0 0"/&gt;    &lt;geometry&gt;      &lt;mesh filename="part6.stl"/&gt;    &lt;/geometry&gt;    &lt;material name="Blue"/&gt;  &lt;/visual&gt;  &lt;collision&gt;    &lt;origin rpy="0 0 0" xyz="0 0 0"/&gt;    &lt;geometry&gt;      &lt;mesh filename="part6.stl"/&gt;    &lt;/geometry&gt;  &lt;/collision&gt;  &lt;/link&gt;</code></pre></div>To be sure that the  STL geometry is not too complex, I used a simple box. It makes no difference which part I replace, the effect is the same.<br><blockquote class="uncited"><div>&gt;&gt;&gt; simulate(steps_)<br>result: ({'islandId': 8, 'numBodies': 9, 'numIterationsUsed': 1000000000, 'remainingResidual': 6700.951337930589},)<br>result: ({'islandId': 8, 'numBodies': 9, 'numIterationsUsed': 1000000000, 'remainingResidual': 5282.910818305261},)</div></blockquote>I have attached a simlified model. Some short explanations:<br>- 2 urdf files are needed since it is a closed loop system<br>- dummypart is used because PyBullet does not support revolute constraint between 2 models (createConstraint)<br><br>Any help is highly appreciated<br>Christian<dl class="file"><dt><span class="imageset icon_topic_attach"></span> <a class="postlink" href="https://pybullet.org/Bullet/phpBB3/download/file.php?id=1879">forum.zip</a></dt></dl><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13861">chrischii</a> — Sat Jul 03, 2021 1:42 pm</p><hr />
]]></content>
	</entry>
	</feed>
