<br><br><div class="gmail_quote">On Tue, Jun 1, 2010 at 3:58 PM, Kirila Adamova <span dir="ltr"><<a href="mailto:kirila.adamova@dfki.de">kirila.adamova@dfki.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Thank you,<br>
<br>
That placed the cylinder correctly. However, I still have the rotation<br>
problem.<br>
<div class="im">    <link name="hips"><br>
        <inertial><br>
            <origin xyz="0 0 0.570" rpy="0 2.2 0"/><br>
            <mass value="50"/><br>
            <inertia ixx="1" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/><br>
        </inertial><br>
        <visual><br>
</div>            <origin xyz="-0.169 0 0" rpy="0 2.2 0"/> </blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">            <geometry><br>
                <cylinder radius="0.060" length="0.420"/><br>
            </geometry><br>
        </visual><br>
        <collision><br>
</div>                  <origin xyz="-0.169 0 0" rpy="0 2.2 0"/><br>
<div class="im">                  <geometry><br>
                    <cylinder radius="0.060" length="0.400"/><br>
                  </geometry><br>
            </collision><br>
    </link><br>
<br>
    <joint name="knees" type="revolute"><br>
        <parent link="feet"/><br>
        <child link="hips"/><br>
        <origin xyz="0 0 0.275"/><br>
        <axis xyz="0 1 0"/><br>
        <limit lower="1.31" upper="3.22" effort="30" velocity="1.0"/><br>
    </joint><br></div></blockquote><div><br>The <axis> element is specific to a joint, not a link, and specifies the direction of motion (rotation, in your case).<br>If you are interested in orienting a link with respect to to a joint, then you should use the rpy attribute of the <origin> element. For example, in the above code, you state:<br>
<br><origin xyz="-0.169 0 0" rpy="0 2.2 0"/><br><br>Here you are specifying a pitch angle of 2.2 radians. You can choose a suitable roll, pitch, yaw triplet that will reorient your cylinder as you would expect.<br>
I'm not sure if I understood your question correctly... Does this solve your issue?<br><br>Adolfo<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">
<br>
</div>If in the joint, <axis xyz="0 0 1">, the cylinder rotates around the z<br>
axis. When I set it to <axiz xyz="0 1 0">, it rotates around the y axis<br>
as I want it to, but the whole robot also jumps and rotates and falls to<br>
its side...<br>
<br>
Kirila<br>
<div class="im"><br>
Adolfo Rodríguez Tsouroukdissian wrote:<br>
> On Tue, Jun 1, 2010 at 3:32 PM, Kirila Adamova <<a href="mailto:kirila.adamova@dfki.de">kirila.adamova@dfki.de</a><br>
</div><div><div></div><div class="h5">> <mailto:<a href="mailto:kirila.adamova@dfki.de">kirila.adamova@dfki.de</a>>> wrote:<br>
><br>
>     Hi all,<br>
><br>
>     I am currently writing a 3D model in urdf. I have two cylinders, which<br>
>     are connected with a joint. The second cylinder, however, is<br>
>     rotated and<br>
>     can be rotated further in the same direction. When I visualize them in<br>
>     gazebo, the joint is in the center of the second cylinder. Is there a<br>
>     way to make it at the end of the cylinder because that is the point<br>
>     around which I need to rotate it. To make it more clear (or even more<br>
>     confusing), here is sample code:<br>
><br>
>     <link name="feet"><br>
>            <inertial><br>
>                <origin xyz="0 0 0.275" rpy="0 0 0"/><br>
>                <mass value="100"/><br>
>                <inertia ixx="1" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/><br>
>            </inertial><br>
>            <visual><br>
>                <origin xyz="0 0 0" rpy="0 0 0"/><br>
>                <geometry><br>
>                    <cylinder radius="0.100" length="0.250"/><br>
>                </geometry><br>
>            </visual><br>
>            <collision><br>
>                      <origin xyz="0 0 0" rpy="0 0 0"/><br>
>                      <geometry><br>
>                        <cylinder radius="0.100" length="0.230"/><br>
>                      </geometry><br>
>                </collision><br>
>        </link><br>
><br>
>        <link name="hips"><br>
>            <inertial><br>
>                <origin xyz="0 0 0.570" rpy="0 2.2 0"/><br>
>                <mass value="50"/><br>
>                <inertia ixx="1" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/><br>
>            </inertial><br>
>            <visual><br>
>                <origin xyz="0 0 0" rpy="0 2.2 0"/><br>
>                <geometry><br>
>                    <cylinder radius="0.060" length="0.420"/><br>
>                </geometry><br>
>            </visual><br>
>            <collision><br>
>                      <origin xyz="0 0 0" rpy="0 2.2 0"/><br>
>                      <geometry><br>
>                        <cylinder radius="0.060" length="0.400"/><br>
>                      </geometry><br>
>                </collision><br>
>        </link><br>
><br>
>        <joint name="knees" type="revolute"><br>
>            <parent link="feet"/><br>
>            <child link="hips"/><br>
>            <origin xyz="0 0 0.275"/><br>
>            <axis xyz="0 0 1"/><br>
>            <limit lower="1.31" upper="3.22" effort="30" velocity="1.0"/><br>
>        </joint><br>
><br>
><br>
>     Currently, the axis xyz is set to z, although it needs to be y,<br>
>     because<br>
>     when it's set somewhere else, the whole model goes crazy (jumps and<br>
>     turns around) in gazebo.<br>
><br>
><br>
><br>
> Kirila,<br>
><br>
> The cylinder primitive makes its center coincide with the<br>
> corresponding origin (visualization, collision) and is aligned with<br>
> the z axis. For your robot, it should suffice to specify an<br>
> appropriate origin for your visualization and collision geometries<br>
> (with respect to the joint origin). For more details refer to the<br>
> available documentation:<br>
><br>
> <a href="http://www.ros.org/wiki/urdf/XML/Link" target="_blank">http://www.ros.org/wiki/urdf/XML/Link</a><br>
> <a href="http://www.ros.org/wiki/urdf/XML/Joint" target="_blank">http://www.ros.org/wiki/urdf/XML/Joint</a><br>
><br>
> HTH,<br>
><br>
> Adolfo<br>
><br>
><br>
>     Help will be greatly appreciated,<br>
><br>
>     Kirila<br>
><br>
>     p.s. End result must rotate the second cylinder around the point<br>
>     between<br>
>     the two cylinders around the y axis.<br>
>     _______________________________________________<br>
>     ros-users mailing list<br>
</div></div>>     <a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a> <mailto:<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a>><br>
<div class="im">>     <a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Adolfo Rodríguez Tsouroukdissian, Ph. D.<br>
><br>
> Robotics engineer<br>
> PAL ROBOTICS S.L<br>
> <a href="http://www.pal-robotics.com" target="_blank">http://www.pal-robotics.com</a><br>
> Tel. +34.93.414.53.47<br>
> Fax.+34.93.209.11.09<br>
> AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos,<br>
> pueden contener información privilegiada y/o confidencial que está<br>
> dirigida exclusivamente a su destinatario. Si usted recibe este<br>
> mensaje y no es el destinatario indicado, o el empleado encargado de<br>
> su entrega a dicha persona, por favor, notifíquelo inmediatamente y<br>
> remita el mensaje original a la dirección de correo electrónico<br>
> indicada. Cualquier copia, uso o distribución no autorizados de esta<br>
> comunicación queda estrictamente prohibida.<br>
><br>
> CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s)<br>
> may contain confidential information which is privileged and intended<br>
> only for the individual or entity to whom they are addressed.  If you<br>
> are not the intended recipient, you are hereby notified that any<br>
> disclosure, copying, distribution or use of this e-mail and/or<br>
> accompanying document(s) is strictly prohibited.  If you have received<br>
> this e-mail in error, please immediately notify the sender at the<br>
> above e-mail address.<br>
</div>> ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">><br>
> _______________________________________________<br>
> ros-users mailing list<br>
> <a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
> <a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
><br>
<br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</div></div></blockquote></div>