Hi
attached my robot arm xacro. Currently just has base, waist and shoulder joints.
after launching the publisher and rviz I can only see base and waist in white. There should be shoulder joint in grey and the rest in orange.
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="my_robot_arm_joint">
<xacro:property name="robot_stand_width" value="0.5"/>
<xacro:property name="robot_stand_lenght" value="0.5"/>
<xacro:property name="robot_stand_height" value="0.2"/>
<xacro:property name="waist_height" value="0.1" />
<xacro:property name="waist_radius" value="0.2" />
<xacro:property name="arm_joint_width" value="0.2" />
<xacro:property name="arm_joint_radius" value="0.03" />
<material name="orange">
<color rgba="1.0 0.423529411765 0.0392156862745 1.0"/>
</material>
<material name="grey">
<color rgba="0.2 0.2 0.2 1.0"/>
</material>
<!-- arm part macro -->
<xacro:macro name="arm_part" params="arm_part_name parent_name">
<link name="${arm_part_name}">
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<cylinder length="${arm_joint_width}" radius="${arm_joint_radius}"/>
</geometry>
<material name="grey" />
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<cylinder length="${arm_joint_width}" radius="${arm_joint_radius}"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 0 0" xyz="0 0 0"/>
<mass value="0.05"/>
<inertia ixx="1.531666666666667e-05" ixy="0" ixz="0" iyy="1.531666666666667e-05" iyz="0" izz="3.0625000000000006e-05"/>
</inertial>
</link>
<joint name="${arm_part_name}-joint" type="continuous">
<parent link="${parent_name}" />
<child link="${arm_part_name}" />
<origin xyz="0 0 0.1" rpy="0 -1.5708 0" />
</joint>
</xacro:macro>
<!-- init end -->
<link name="world" />
<joint name="world_to_root" type="fixed">
<parent link="world" />
<child link="robot_stand" />
<origin xyz="0 0 0.1" rpy="0 0 0" />
</joint>
<link name="robot_stand">
<visual>
<geometry>
<box size="${robot_stand_width} ${robot_stand_lenght} ${robot_stand_height}"/>
</geometry>
<material name="orange"/>
</visual>
<collision>
<geometry>
<box size="${robot_stand_width} ${robot_stand_lenght} ${robot_stand_height}"/>
</geometry>
</collision>
<inertial>
<mass value="1.0"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia ixx="0.0008333333333333335" ixy="0" ixz="0" iyy="0.0008333333333333335" iyz="0" izz="0.0008333333333333335"/>
</inertial>
</link>
<!-- waist -->
<link name="robot_waist">
<visual>
<origin rpy="0 0 0" xyz="0 0 ${robot_stand_height}"/>
<geometry>
<cylinder length="${waist_height}" radius="${waist_radius}"/>
</geometry>
<material name="orange"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<cylinder length="${waist_height}" radius="${waist_radius}"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 0 0" xyz="0 0 0"/>
<mass value="0.05"/>
<inertia ixx="1.531666666666667e-05" ixy="0" ixz="0" iyy="1.531666666666667e-05" iyz="0" izz="3.0625000000000006e-05"/>
</inertial>
</link>
<joint name="stand_to_waist" type="continuous">
<parent link="robot_stand" />
<child link="robot_waist" />
<origin xyz="0 0 0" rpy="0 0 0" />
</joint>
<!-- arm joints -->
<xacro:arm_part arm_part_name="shoulder" parent_name="robot_waist" />
</robot>
Any hint why the shoulder is missing and parts are white ?
Regards,
Volker