How to add a gear ratio other than 1:1 on real robot? (Gearbox)
I work on a custom 6DOF robot arm which is powered by Dynamixel motors. The URDF model is made by me and I can control it with MoveIt, even inverse kinematics work well and are executed like they should.
There is only one problem:
Every motor is run 1:1 transmission wise and MoveIt sees it like that. Now I have figured out why it is OK except at one joint – there is a small gearbox at only one joint.
All I know is that the gear ratio is 1:1.75 and all the others are 1:1, so directly driven.
How can I include this gearbox or at least let MoveIt know to let this one joint operate differently than the others?
I tried the transmission block in the URDF but without success. The real robot movements are still 1:1 everywhere. If it helps I can provide the URDF also.
Update:
<?xml version="1.0"?>
<robot name="robotic_arm" xmlns:xacro="http://www.ros.org/wiki/xacro">
<material name="Yellow">
<color rgba="1.0 1.0 0.0 1.0"/>
</material>
<material name="Black">
<color rgba="0.0 0.0 0.0 1.0"/>
</material>
<material name="White">
<color rgba="1.0 1.0 1.0 1.0"/>
</material>
<material name="Blue">
<color rgba="0.0 0.0 1.0 1.0"/>
</material>
<property name="shoulder_yaw_len" value="0.195" />
<property name="elbow_roll_len" value="0.16" />
<property name="deg_to_rad" value="0.01745329251994329577"/>
<property name="M_SCALE" value="0.001 0.001 0.001"/>
<property name="M_PI" value="3.14159"/>
<link name="bottom_link">
<visual>
<origin xyz="0 0 0.6" rpy="0 0 0" />
<geometry>
<box size="0.16 0.3 1.2" />
</geometry>
<material name="Black" />
</visual>
</link>
<joint name="bottom_joint" type="fixed">
<parent link="bottom_link"/>
<child link="base_link"/>
<origin xyz="0 0 0.105" rpy="0 0 0" />
</joint>
<link name="base_link">
<visual>
<origin xyz="0 0.24 0.9" rpy="0 0 0" />
<geometry>
<box size="0.1 0.16 0.1" />
</geometry>
<material name="White" />
</visual>
</link>
<joint name="shoulder_pan_joint" type="revolute">
<parent link="base_link"/>
<child link="shoulder_pan_link"/>
<origin xyz="0 0.348 0.9" rpy="0 0 0" />
<axis xyz="0 1 0" />
<limit effort="300" velocity="1" lower="-1.57" upper="0"/>
</joint>
<link name="shoulder_pan_link" >
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.08 0.05 0.038"/>
</geometry>
<material name="White" />
</visual>
</link>
<joint name="shoulder_pitch_joint" type="revolute">
<parent link="shoulder_pan_link"/>
<child link="shoulder_yaw_link"/>
<origin xyz="0 0.02 0" rpy="0 0 0" />
<axis xyz="1 0 0" />
<limit effort="300" velocity="1" lower="0" upper="1.57" />
</joint>
<link name="shoulder_yaw_link" >
<visual>
<origin xyz="0 0 -0.0975" rpy="0 0 0" />
<geometry>
<cylinder radius="0.02" length="0.195"/>
</geometry>
<material name="White" />
</visual>
</link>
<joint name="elbow_pitch_joint" type="revolute">
<parent link="shoulder_yaw_link"/>
<child link="elbow_pitch_link"/>
<origin xyz="0 0 -${shoulder_yaw_len}" rpy="0 0 0" />
<axis xyz="0 1 0" />
<limit effort="300" velocity="1" lower="-1.57" upper="1.57" />
</joint>
<link name="elbow_pitch_link" >
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<sphere radius="0.02"/>
</geometry>
<material name="White" />
</visual>
</link>
<joint name="elbow_roll_joint" type="continuous">
<parent link="elbow_pitch_link"/>
<child link="elbow_roll_link"/>
<origin xyz="0 0 0" rpy="0 0 0" />
<axis xyz="0 0 1" />
<dynamics damping="50" friction="1"/>
</joint>
<link name="elbow_roll_link" >
<visual>
<origin xyz="0 0 -${elbow_roll_len/2}" rpy="0 0 0" />
<geometry>
<cylinder radius="0.02" length="${elbow_roll_len}"/>
</geometry>
<material name="White" />
</visual>
</link>
<joint name="wrist_pitch_joint" type="revolute">
<parent link="elbow_roll_link"/>
<child link="wrist_pitch_link"/>
<origin xyz="0 0 -${elbow_roll_len}" rpy="0 0 0" />
<axis xyz="1 0 0" />
<limit effort="300" velocity="1" lower="-1.57" upper="1.57" />
<dynamics damping="50" friction="1"/>
</joint>
<link name="wrist_pitch_link" >
<visual>
<origin xyz="0 0 -0.1" rpy="0 0 0" />
<geometry>
<cylinder radius="0.02" length="0.2"/>
</geometry>
<material name="White" />
</visual>
<joint name="wrist_joint" type="continuous">
<parent link="wrist_pitch_link"/>
<child link="wrist_link"/>
<origin xyz="0 0 0.01" rpy="0 0 0" />
<axis xyz="0 0 1" />
</joint>
<link name="wrist_link" >
<visual>
<origin xyz="0 0 -0.22" rpy="0 0 0" />
<geometry>
<box size="0.03 0.04 0.02"/>
</geometry>
<material name="White" />
</visual>
</link>
<transmission name="tran1">
<type>transmission_interface/SimpleTransmission</type>
<joint name="shoulder_pan_joint2">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="motor1">
<hardwareInterface>EffortJointInterface</hardwareInterface>
<mechanicalReduction>1.75</mechanicalReduction>
</actuator>
</transmission>
</robot>
Asked by shmiff on 2021-05-20 08:09:56 UTC
Comments
Here is the URDF:
https://pastebin.com/0Bt1mmJX
Asked by shmiff on 2021-05-27 17:07:45 UTC
@shmiff I've added the code for you, but in the future please include code/text in the body of the question instead of linking to external sites (they often go stale, close, move, etc.)
Asked by jayess on 2021-05-28 00:21:31 UTC