How to add a tool from a STL file
Hello,
I'm new at ROS (kinetic 1.12.17, Ubuntu 16.04 LTS) and I want to know how can I add a tool to a robot, having the tool in STL format.
I'm working with the Robotnik's RB-Kairos robot with the UR10 arm and I am lost with all the URDF files that are in the packages (you can see my workspace at https://github.com/DavidRedrejo/test_ws/tree/main)
I want to add the tool.stl (found in my main branch) to the robot xacro (access here) but I don't know where and how I have to add the tool in the robot's xacro file.
The tool is suposed to be a "static holder" for a real tool, but I think that it is not necesary to represent that tool, just the "holder piece".
Hope somebody could help me. Many thanks for your time!
EDIT: I have made an URDF file for the tool, it looks like this:
<?xml version="1.0"?>
<robot name="spray_tool" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="spray_tool" params="prefix parent *origin ">
<joint name="${prefix}_base_joint" type="fixed">
<origin xyz="0 0 0" rpy="0 0 0"/>
<parent link="${parent}"/>
<child link="${prefix}_base_link"/>
</joint>
<!-- BASE LINK -->
<link name="${prefix}_base_link">
<inertial>
<mass value="0.25" />
<origin xyz="0 0 0" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0" />
</inertial>
<visual>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
<geometry>
<mesh filename="package://spray_tool_description/meshes/tool.stl" scale="10 10 10"/>
</geometry>
<!-- <material name="grey">
<color rgba="0.5 0.5 0.5 1"/>
</material> -->
</visual>
<collision>
<origin xyz="0.0 0 0" rpy="0 0 0" />
<geometry>
<!--box size="0.146 0.05 0.0735"/-->
<mesh filename="package://spray_tool_description/meshes/tool.stl" scale="10 10 10"/>
</geometry>
</collision>
</link>
</xacro:macro>
</robot>
And in the rbkairos.urdf.xacro I also added the include line at the top and this other line.
When I run the simulation, there is no tool, but the link rbkairos_spray_tool_base_link is created, as seen in this frame. (Sorry, I don't have points to post pics here!)
So, the frame is correct but there is no visual display? Or any file is not properly done?