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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2020-08-26T11:18:59+00:00</updated>

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

		<entry>
		<author><name><![CDATA[srkiyengar]]></name></author>
		<updated>2020-08-26T11:18:59+00:00</updated>

		<published>2020-08-26T11:18:59+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43081#p43081</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43081#p43081"/>
		<title type="html"><![CDATA[calculateInverseKinematics() crashes Python.]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43081#p43081"><![CDATA[
Hi Guys,<br><br>We have a custom robot which has been simulated within Pybullet and works very well. I notice that when I started using  calculateInverseKinematics() calls within my scripts, the scripts would fail and also crash Python. The environment is  MacOS Catalina (10.15.5), the Python version is 3.6.10 (Anaconda) and Pybullet version is 2.8.7.<br><br>Here I have provided a simple script sample which crashes as I execute the step. In other scripts I have seen the calls to the function calculateInverseKinematics() work but Python will die after the successful execution of the step. I am running the scripts within Pycharm.<br><br><br>import pybullet as p<br><br><div class="codebox"><p>Code: </p><pre><code>def test_IK(this_robot):    link_name = "left_eye_joint"    idx1 = this_robot.jointDict[link_name]   # joint ID, an int    pos = list(this_robot.initPosOrn[idx1][this_robot.POS_IDX]) # list of three floats    quat1 = [0.0,0.0,0.0871557,0.9961947]  # axis (0,0,1) angle 10 degrees    joints_pos = p.calculateInverseKinematics(this_robot.linkage, idx1, pos, quat1)  #this_robot.linkage is the return value from p.loadURDF().    return joints_pos</code></pre></div>When Python quits, it generates a problem report which is many pages long but the following statements are found in the very beginning:<br><br>Exception Type: EXC_CRASH (SIGABRT)<br>Exception Codes: 0x0000000000000000, 0x0000000000000000<br>Exception Note: EXC_CORPSE_NOTIFY<br>Application Specific Information:<br>abort() called<br>python(40868,0x700007e23000) malloc: *** error for object 0x3f95a8b47e44471a: pointer being freed was not allocated.<br><br>Any suggestions or ideas on what may be causing it. Wondering if someone else has experienced similar problem after calls to calculateInverseKinematics(). Your help or advice will be appreciated.<br><br>Rajan<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13755">srkiyengar</a> — Wed Aug 26, 2020 11:18 am</p><hr />
]]></content>
	</entry>
	</feed>
