How to add tool to URDF for robot to account for it during process
Please help! I'm trying to add a tool (camera) to the end of the robot so it can take pictures of the object I put beneath it. The problem is, the way the camera is mounted to the robot, I need to set an offset. I'm trying to add the tool to the URDF file but I'm unsure how or where to add it, as well as what to add with it. I'd assume I need to include the origin, the length/width?
I'm using the ABB irb2400 robot. I cannot attach the URDF files since I do not have points but here is a link:
https://github.com/ros-industrial/abb...
In the picture below, the red arrow represents where the camera lens will be facing and the blue arrow represents how/where the puck will connected to the case of the camera. I need to see the offset so that the puck itself isn't facing the object but instead it angles the camera so that it can scan the object. Here is a link to the picture of the robot and "camera" (object I used in place of camera):
I'm using ROS Noetic on Ubuntu 20.04
Any help would be appreciated!!!
EDIT -- Adding images after last comment Images added correspond to my last comment:
--> I made a new xacro:macro file with the end effector in it: <robot <a="" href="http://xmlns:xacro="http://ros.org/wiki/xacro%22">xmlns:xacro="http://ros.org/wiki/xacro"> <xacro:include filename="$(find abb_resources)/urdf/common_materials.xacro"> <xacro:include filename="$(find abb_irb2400_support)/urdf/end_effector_macro.xacro"></xacro:include></xacro:include></robot>
<xacro:macro name="abb_irb2400_end_effector" params="prefix">
<link name="${prefix}tool0">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="1 1 1" />
</geometry>
</visual>
</link>
</xacro:macro>
</robot>
--> However, I do not think I linked them correctly. There is no box showing up in the RVIZ simulation:
--> I have the new xacro:macro inside this URDF folder (attaching github repo so those helping can access it too to hopefully have a better idea how to help): https://github.com/ros-industrial/abb...
but I think I linked it wrong? It's in the code above
Please attach all of your images directly to this question. I've given you sufficient karma to do that.
Note: do not post screenshots of code. That's not needed, as it's all text. Just copy-paste the text.
Gotcha, thank you. I edited the original question and attached the images and code. I tried the link you sent about combining the robot and the EEF model. However I'm not sure what package I would need to create for the camera. I really just need the object in there and the program to account for it when moving to the positions.
I still think I linked my new xacro:macro incorrectly, but I could be wrong and it's failing somewhere else. I appreciate all your time and help.