How to change the pivot point of a link in URDF joint?
I have built simple robotic arm, where the Link1 is joined to the base_link through a revolute joint. When i try to move the link1 it is revolving on its own center instead pivoting the bottom to base_link. Here, how to change the pivot point from the center of link1 to its bottom and fix it to the base_link.
My urdf:
<?xml version="1.0"?>
<robot name="myfirst" xmlns:xacro="http://www.ros.org/wiki/xacro">
<link name="base_link">
<visual>
<geometry>
<box size="0.5 0.5 0.5"/>
</geometry>
</visual>
</link>
<joint name="joint1" type="revolute">
<axis xyz="0 1 0"/>
<limit effort="1000.0" lower="-0.548" upper="0.548" velocity="0.5"/>
<parent link="base_link"/>
<child link="arm2"/>
<origin xyz="0 0 0.5" rpy="0 0 0" />
</joint>
<link name="arm2">
<origin xyz="0 0 -0.3" rpy="0 0 0" />
<visual>
<geometry>
<cylinder length="0.6" radius="0.04"/>
</geometry>
</visual>
</link>
</robot>
Result initial pose:
Result end pose: