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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2019-05-14T18:39:01+00:00</updated>

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

		<entry>
		<author><name><![CDATA[arpastrana]]></name></author>
		<updated>2019-05-14T18:39:01+00:00</updated>

		<published>2019-05-14T18:39:01+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42092#p42092</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42092#p42092"/>
		<title type="html"><![CDATA[Re: Position control for robot base?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42092#p42092"><![CDATA[
<blockquote class="uncited"><div>Maybe you can add a small piece of code with the strange behavior you see. Preferably code without dependencies on other files that we can try directly. There could be a problems with the delta_t or maybe with some friction or too-small force or secondary contraints or other. </div></blockquote>I have attached a folder with some code that replicates the behaviour. If you run base_constraint.py, the script will print out in different colours the sent velocity, the read velocity at the robot base, as well as the division of the two, which is around 5.0 for all the 6 velocity degrees of freedom (linear xyz, angular xyz). <br><br>Basically, the environment consists of a shortened cylinder which can be moved around via userDebugParameters. The commanded velocity is then transformed into deltas, added up to the robot base position/orientation, and then used to change the constraint at the base via p.changeConstraint.<dl class="file"><dt><span class="imageset icon_topic_attach"></span> <a class="postlink" href="https://pybullet.org/Bullet/phpBB3/download/file.php?id=1712">robotless_base_constraint.zip</a></dt></dl><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13224">arpastrana</a> — Tue May 14, 2019 6:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[richardbloemenkamp]]></name></author>
		<updated>2019-05-09T17:29:14+00:00</updated>

		<published>2019-05-09T17:29:14+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42063#p42063</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42063#p42063"/>
		<title type="html"><![CDATA[Re: Position control for robot base?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42063#p42063"><![CDATA[
<blockquote class="uncited"><div>"However, when comparing read vs. sent velocities at the base, they were constantly downscaled by a factor of 5, and rotations around x and y had to be multiplied by -1 to make them comply with the right-hand-rule."</div></blockquote>Maybe you can add a small piece of code with the strange behavior you see. Preferably code without dependencies on other files that we can try directly. There could be a problems with the delta_t or maybe with some friction or too-small force or secondary contraints or other. The right-hand-rule-issue may be related to the other two angles of your object and the order in which the rotations are applied or something else. So far I have not seen these kinds of issues myself but if there are indeed issues then I'm sure that there is motivation to solve them.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13031">richardbloemenkamp</a> — Thu May 09, 2019 5:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[steven]]></name></author>
		<updated>2019-05-08T13:33:00+00:00</updated>

		<published>2019-05-08T13:33:00+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42061#p42061</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42061#p42061"/>
		<title type="html"><![CDATA[Re: Position control for robot base?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42061#p42061"><![CDATA[
<blockquote class="uncited"><div> Moreover, the fact that resetBaseVelocity overrides was confirmed by erwin coumans here: <a href="https://github.com/bulletphysics/bullet3/issues/1845#issuecomment-463617025" class="postlink">https://github.com/bulletphysics/bullet ... -463617025</a></div></blockquote>my understanding is that we shouldn't use the resetBaseVelocity ()  during a running simulation, but can be used freely before stepsimulation.<br><br>i still think it is weird that we use a constraint to control the velocity, this should be the basic function for a physic engine.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13075">steven</a> — Wed May 08, 2019 1:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arpastrana]]></name></author>
		<updated>2019-05-08T10:02:01+00:00</updated>

		<published>2019-05-08T10:02:01+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42059#p42059</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42059#p42059"/>
		<title type="html"><![CDATA[Re: Position control for robot base?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42059#p42059"><![CDATA[
<blockquote class="uncited"><div>hi arpastrana,<br>i understand calling the resetBasePositionAndOrientation()  will ignore the dynamic of the simulation, but why the resetBaseVelocity() also "override<br>the effects of the physics simulation". it only change the base velocity. i think the resetBaseVelocity() should can meet your requirement.  is it right?  thanks.</div></blockquote>Hi steven. resetBaseVelocity() did move our base nicely, but the problem was that when checking i.e. force-torque sensor readings when colliding our object onto something, these values were very very small. Moreover, the fact that resetBaseVelocity overrides was confirmed by erwin coumans here: <a href="https://github.com/bulletphysics/bullet3/issues/1845#issuecomment-463617025" class="postlink">https://github.com/bulletphysics/bullet ... -463617025</a><br><br>On the other hand, we have tried using p.CreateConstraint() at the base to move it around. That worked as well to move the base, and provided with more reasonable force-torque readings, though we had to transform velocities to position and orientations to change the constraint at the base via p.ChangeConstraint() as pointed out earlier in this thread. <br><blockquote class="uncited"><div>If you want to give velocities and angular velocities instead of position and orientation, then I think you can calculate the position and orientation in the next time step from your velocities and angular velocities and the time step duration (delta_t) . e.g.:<br>x_new = x_current + delta_t* x_velocity<br>y_new = y_current + delta_t* y_velocity<br>theta_new = theta_current + delta_t* theta_velocity</div></blockquote>However, when comparing read vs. sent velocities at the base, they were constantly downscaled by a factor of 5, and rotations around x and y had to be multiplied by -1 to make them comply with the right-hand-rule.<br><br>We are now looking into setJointMotorControl2 because we think it is more elegant to send directly velocities to joints (either linear or angular), but we're having a hard time to set this up properly. Any thoughts? Thanks in advance!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13224">arpastrana</a> — Wed May 08, 2019 10:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[steven]]></name></author>
		<updated>2019-05-08T07:56:44+00:00</updated>

		<published>2019-05-08T07:56:44+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42058#p42058</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42058#p42058"/>
		<title type="html"><![CDATA[Re: Position control for robot base?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42058#p42058"><![CDATA[
<blockquote class="uncited"><div>The way I've temporarily got around this issue is by calling<strong class="text-strong"> resetBaseVelocity()</strong>, although I'm aware that as Erwin stated, these reset commands will override the effects of the physics simulation. </div></blockquote>hi arpastrana,<br><br>    i understand calling the resetBasePositionAndOrientation()  will ignore the dynamic of the simulation, but why the resetBaseVelocity() also "override<br>the effects of the physics simulation". it only change the base velocity. i think the resetBaseVelocity() should can meet your requirement.  is it right?  thanks.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13075">steven</a> — Wed May 08, 2019 7:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arpastrana]]></name></author>
		<updated>2019-05-07T08:00:16+00:00</updated>

		<published>2019-05-07T08:00:16+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42057#p42057</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42057#p42057"/>
		<title type="html"><![CDATA[Re: Position control for robot base?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42057#p42057"><![CDATA[
<blockquote class="uncited"><div>You can attach the base to the (fixed) world frame with a couple of degrees of freedom. Then you can apply setJointMotorContro2 in POSITION_CONTROL mode, or VELOCITY_CONTROL mode to those degrees of freedom to move the base.</div></blockquote>We are having a look at applying setJointMotorControl2 in VELOCITY_CONTROL model. How could we implement attaching the base with a couple few degrees of freedom? Would this imply loading a custom urdf with "virtual" joints per degree of freedom, assembling a multiBody, or creating a constraint?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13224">arpastrana</a> — Tue May 07, 2019 8:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2019-03-09T01:24:19+00:00</updated>

		<published>2019-03-09T01:24:19+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41919#p41919</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41919#p41919"/>
		<title type="html"><![CDATA[Re: Position control for robot base?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41919#p41919"><![CDATA[
You can attach the base to the (fixed) world frame with a couple of degrees of freedom. Then you can apply setJointMotorContro2 in POSITION_CONTROL mode, or VELOCITY_CONTROL mode to those degrees of freedom to move the base.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Sat Mar 09, 2019 1:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[richardbloemenkamp]]></name></author>
		<updated>2019-03-06T17:33:57+00:00</updated>

		<published>2019-03-06T17:33:57+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41909#p41909</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41909#p41909"/>
		<title type="html"><![CDATA[Re: Position control for robot base?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41909#p41909"><![CDATA[
If you want to give velocities and angular velocities instead of position and orientation, then I think you can calculate the position and orientation in the next time step from your velocities and angular velocities and the time step duration (delta_t) . e.g.:<br>x_new = x_current + delta_t* x_velocity<br>y_new = y_current + delta_t* y_velocity<br>theta_new = theta_current + delta_t* theta_velocity<br>etc.<br>Once calculated you can set these values as position and orientation. If you do it each time step then it should result in the object moving with the desired velocity and angular velocity.<br>There are library functions for the conversion between Quaternions and Euler-angles back and forth and the order of angles is sometimes important but I think not if the time steps and/or the angular velocities remain small. Also the current position and orientation can be obtained with library functions.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13031">richardbloemenkamp</a> — Wed Mar 06, 2019 5:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arpastrana]]></name></author>
		<updated>2019-02-27T17:10:18+00:00</updated>

		<published>2019-02-27T17:10:18+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41900#p41900</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41900#p41900"/>
		<title type="html"><![CDATA[Re: Position control for robot base?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41900#p41900"><![CDATA[
Hi everyone, I wanted to reactivate the discussion since I'm looking for a way to move a robot's base during simulation by specifying <strong class="text-strong">velocities instead of positions</strong>. <br><br>So far, the proposed way to go via<strong class="text-strong"> changeConstraint()</strong> currently takes in frame positions and orientations, but not linear or angular velocities. On the other hand, as victoriax pointed out, <strong class="text-strong">setJointMotorControl2()</strong> has an option for velocity control, but it seems to control joint position relative to the robot base, rather than moving the robot base itself.<br><br>The way I've temporarily got around this issue is by calling<strong class="text-strong"> resetBaseVelocity()</strong>, although I'm aware that as Erwin stated, these reset commands will override the effects of the physics simulation. <br><br>Is there another alternative from your experience to move the robot base with velocities (linear, angular) while keeping the coherency of the simulation? Thanks in advance!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13224">arpastrana</a> — Wed Feb 27, 2019 5:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[keithmgould]]></name></author>
		<updated>2018-06-08T16:51:25+00:00</updated>

		<published>2018-06-08T16:51:25+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40950#p40950</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40950#p40950"/>
		<title type="html"><![CDATA[Re: Position control for robot base?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40950#p40950"><![CDATA[
Ah, I missed that it was happening *during* the simulation. Sorry for the bad advice! Hope you have it all sorted now <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12742">keithmgould</a> — Fri Jun 08, 2018 4:51 pm</p><hr />
]]></content>
	</entry>
	</feed>
