0
$\begingroup$

Rosanswers logo

I am a beginner, I am making a 4dof custom arm and I am not able to understand how to add mesh objects to the existing links and code for putting the links at right places with respect to meshes? how does it work? please explain? How can I find custom mesh objects for my arm, if someone has it please provide a link?


Originally posted by Prof. xavier on ROS Answers with karma: 35 on 2018-03-16

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Check out the urdf tutorials. The tutorials explain how to add meshes to links. If you need more specific help, you will have to provide your current urdf and your meshes.


Originally posted by blasalat with karma: 51 on 2018-03-19

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by David Lu on 2018-03-19:
Particularly Step 5 here: http://wiki.ros.org/urdf/Tutorials/Building%20a%20Visual%20Robot%20Model%20with%20URDF%20from%20Scratch

Comment by Prof. xavier on 2018-03-19:
I am having trouble using mesh files in my URDF file. My main doubt is how will I specify the origin, joint origin for a complex mesh object?

$\endgroup$
0
$\begingroup$

Mesh is normally added to the link, and moves with this link. You need to specify the mesh file (ply or stl) as related to the root of the ROS package where the file resides. Meshes can be either poorly visual (for visualization) or for collision detection (RViz can show them as well). If you attach the mesh to the movable link of the robot, it will move with that link. Here is the URDF fragment:

  <link name="some_link">
    <visual>
      <!-- Let's place it one meter above the origin of the link and give a roll of -90 degrees: -->
      <origin rpy="-1.5708 0 0" xyz="0 0 1"/>
      <geometry>
        <mesh filename="package://my_package_name/my_mesh.ply"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="-1.5708 0 0" xyz="0 0 1"/>
      <geometry>
        <mesh filename="package://my_package_name/my_large_and_simplified_mesh.ply"/>
      </geometry>
    </collision>
  </link>
$\endgroup$

Your Answer

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