0
$\begingroup$

I'm having troubles with model origin of coordinates location in relation to STL models. All ones are outside the models. I tried to move it to center of mass in SolidWorks, but it didn't fix the problem. It causes different issues like my wheels spin around origin of coordinates, not around own axis.

It's my wheel xacro:

<?xml version="1.0" encoding="utf-8"?>
<robot name="pushkin"
 xmlns:xacro="http://www.ros.org/wiki/xacro">
 <!-- right_wheel -->
 <link name="pushkin_right_wheel">
     <inertial>
         <!-- <origin xyz="1.9255E-10 -0.00056576 1.0414E-10" rpy="0 0 0"/> -->
                     <origin xyz="0 0 0" rpy="0 0 0"/>
         <mass value="0.050464"/>
         <inertia ixx="2.0701E-05" ixy="3.8089E-14" ixz="-1.3584E-15" iyy="3.5827E-05" iyz="2.1838E-15" izz="2.0701E-05"/>
     </inertial>
     <visual>
         <origin xyz="0 0 0" rpy="0 0 0" />
         <geometry>
             <mesh filename="package://pushkin_description/meshes/pushkin_right_wheel.STL" scale="0.01 0.01 0.01" />
         </geometry>
         <material name="Green" />
     </visual>
     <collision>
         <origin xyz="0 0 0" rpy="0 0 0" />
         <geometry>
             <mesh filename="package://pushkin_description/meshes/pushkin_right_wheel.STL" scale="0.01 0.01 0.01" />
         </geometry>
     </collision>
 </link>
 <joint name="right_wheel_to_base" type="continuous">
     <origin xyz="0.11 0.5137 -0.135" rpy="0 0 0" />
     <parent link="pushkin_base" />
     <child link="pushkin_right_wheel" />
     <axis xyz="0 1 0" />
 </joint>
</robot>

origins of coordinates are outside the models

$\endgroup$

2 Answers 2

0
$\begingroup$

In Solidworks, look for the STL output option "Do not translate output STL data to positive space."

https://help.solidworks.com/2011/english/SolidWorks/sldworks/legacyhelp/sldworks/impexp/hidd_stl.htm

I believe by default the STL coordinates are shifted so that the mesh coordinates are all positive. Useful for 3D printing, not so useful for URDF files.

$\endgroup$
2
  • $\begingroup$ Thank you, it's partly helped. Now origin of coordinates is inside the model. But it still locates not on the axis of wheel. I would be grateful if anyone knows how I can fix it. $\endgroup$ Sep 12 at 13:48
  • $\begingroup$ The wheel is properly located with respect to the part origin in Solidworks? $\endgroup$ Sep 13 at 1:05
0
$\begingroup$

So, I found an answer:

There is option in SolidWorks - add origin of coordinate.

Add origin of coordinate

You can choose initial point and axises.

Choose initial point and axes

And as you save file as .stl,

Save file as .stl

In options, at the bottom of window, you can choose your new origin of coordinate.

Choose your new origin of coordinate

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.