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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-08-01T15:08:23+00:00</updated>

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

		<entry>
		<author><name><![CDATA[djb]]></name></author>
		<updated>2021-08-01T15:08:23+00:00</updated>

		<published>2021-08-01T15:08:23+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43535#p43535</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43535#p43535"/>
		<title type="html"><![CDATA[Re: translation along link]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43535#p43535"><![CDATA[
Well I ended up doing this<br><div class="codebox"><p>Code: </p><pre><code>    pos = [pos[0] + 0.5*camera_vector[0], pos[1] + 0.5*camera_vector[1], pos[2] + 0.5*camera_vector[2]]    pos = tuple(pos) </code></pre></div>If anyone has a better way let me know<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13666">djb</a> — Sun Aug 01, 2021 3:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[djb]]></name></author>
		<updated>2021-08-01T14:38:27+00:00</updated>

		<published>2021-08-01T14:38:27+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43534#p43534</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43534#p43534"/>
		<title type="html"><![CDATA[translation along link]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43534#p43534"><![CDATA[
Hi<br><br>I've got an end effector and I'm setting up the camera on the end effector  (length is 0.618)<br><br>So far I've taken some code from a grasping project, and added 0.3 to the Z height, which is a bit better, since the camera is sitting on the link.<br><br>But I would prefer if the camera were translated from its position, along the orientation, by 0.618<br><br>Anyone with some basic matrix skills able to help?<br><br>I presume it's like the <br><br>Thanks <br><br><br><div class="codebox"><p>Code: </p><pre><code>    pos = end_effector_state[0]     ori = end_effector_state[1]    #translate a bit higher    pos = list(pos)     pos[2] += 0.3    pos = tuple(pos)    rot_matrix = self._pybullet_client.getMatrixFromQuaternion(ori)    rot_matrix = np.array(rot_matrix).reshape(3, 3)   # Initial vectors    #init_camera_vector = (0, 0, 1) # x-axis    init_camera_vector = (0, 0, -1) # x-axis   - oops it was looking backwards    init_up_vector = (0, 1, 0) # y-axis    # Rotated vectors    camera_vector = rot_matrix.dot(init_camera_vector)    up_vector = rot_matrix.dot(init_up_vector)    #end_effector_length_vector = (0.618, 0, 0)    #camera_vector = rot_matrix.dot(end_effector_length_vector)    self.view_matrix_gripper = self._pybullet_client.computeViewMatrix(pos, pos + 0.1 * camera_vector, up_vector) #why 0.1?    img = self._pybullet_client.getCameraImage(256, 256, self.view_matrix_gripper, self.projectionMatrix, shadow=0, flags = self._pybullet_client.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX, renderer=self._pybullet_client.ER_BULLET_HARDWARE_OPENGL)</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13666">djb</a> — Sun Aug 01, 2021 2:38 pm</p><hr />
]]></content>
	</entry>
	</feed>
