syuntoku14 / fusion2urdf

A Fusion 360 Script to export URDF
MIT License
453 stars 151 forks source link

offset in teleoperation #63

Open nksas opened 2 years ago

nksas commented 2 years ago

so, whenever i export a robot model and try using it with key_teleop , the key bindings are flipped by an offset of 90 degree. forward key goes left , left goes back, etc Is this issue common to all or it's just some minor mistak i am making while modelling the robot.

nilutpolkashyap commented 2 years ago

Hi, I am assuming you made a two-wheel robot. You need to make a minor change in the main XACRO file of your robot inside the urdf folder.

You would need to change the direction of the joint axis for revolute joints. By default, the axis is inverted for one of your joints. Just removed the "negative" sign from the tag inside the element.

Below is an example.

<joint name="right_joint" type="continuous">
  <origin xyz="-0.07 -0.115 0.05" rpy="0 0 0"/>
  <parent link="base_link"/>
  <child link="right_wheel_1"/>
  <axis xyz="0.0 -1.0 0.0"/>
</joint>

Removed the "-" from the element and make it <axis xyz="0.0 1.0 0.0"/>

Hope this helps. Nilutpol Kashyap