1
$\begingroup$

I'm trying to spawn my robot urdf in gazebo, but some links are not showing, although they appear in the left menu bar. They also show in Rviz and Moveit, so it has to be something with gazebo visuals :/ There is also no appearing error in the terminal where launched gazebo.. I spent hours on this and still nothing. Any idea? (ROS1 noetic)

Context: I'm researching the mycobot_ros moveit package and doing simulations in MoveIt with different scripts, but I want to represent the motions in Gazebo.

(Image uploader is not working so: https://ibb.co/3Tz7F0Y)

URDF file (apologies for long files):

<?xml version="1.0" ?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="firefighter">
    <xacro:property name="width" value=".2" />
    
    <link name="base_footprint" />
    <link name="base">
        <visual>
            <geometry>
                <!--- 0.0 0 -0.04  1.5708 3.14159-->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/base.dae" />
            </geometry>
            <origin xyz="0.0 0 0 " rpy=" 0 0 3.1415926" />
        </visual>
        <collision>
            <geometry>
                <!--- 0.0 0 -0.04  1.5708 3.14159-->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/base.dae" />
            </geometry>
            <origin xyz="0.0 0 0 " rpy=" 0 0 3.1415926" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="link1">
        <visual>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link1.dae" />
            </geometry>
            <origin xyz="0 0 0 " rpy=" 0 0 0" />
        </visual>
        <collision>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link1.dae" />
            </geometry>
            <origin xyz="0 0 0 " rpy=" 0 0 0" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="link2">
        <visual>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link2.dae" />
            </geometry>
            <origin xyz="0 0 0.0587 " rpy=" 0 0 3.1415926" />
        </visual>
        <collision>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link2.dae" />
            </geometry>
            <origin xyz="0 0 0.0587 " rpy=" 0 0 3.1415926" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="link3">
        <visual>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link3.dae" />
            </geometry>
            <origin xyz="0 0 0.038 " rpy=" 0 0 3.1415926" />
        </visual>
        <collision>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link3.dae" />
            </geometry>
            <origin xyz="0 0 0.038 " rpy=" 0 0 3.1415926" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="link4">
        <visual>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link4.dae" />
            </geometry>
            <origin xyz="0 -0.001 0 " rpy=" 0 0 0" />
        </visual>
        <collision>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link4.dae" />
            </geometry>
            <origin xyz="0 -0.001 0 " rpy=" 0 0 0" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="link5">
        <visual>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link5.dae" />
            </geometry>
            <origin xyz="0 0.002  0 " rpy=" 0  0 3.1415926" />
        </visual>
        <collision>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link5.dae" />
            </geometry>
            <origin xyz="0 0.002  0 " rpy=" 0  0 3.1415926" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="link6">
        <visual>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link6.dae" />
            </geometry>
            <origin xyz="-0.502 -0.090 -0.096 " rpy=" 0 1.5708 0" />
        </visual>
        <collision>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/link6.dae" />
            </geometry>
            <origin xyz="-0.502 -0.090 -0.096 " rpy=" 0 1.5708 0" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="gripper_base">
        <visual>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_base.dae" />
            </geometry>
            <origin xyz="-0.02 0.012 -0.018 " rpy=" 0 0 1.5708" />
        </visual>
        <collision>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_base.dae" />
            </geometry>
            <origin xyz="-0.02 0.012 -0.018 " rpy=" 0 0 1.5708" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="gripper_left1">
        <visual>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_left1.dae" />
            </geometry>
            <origin xyz="0.036 -0.052 0.0 " rpy=" 0 0 1.5708" />
        </visual>
        <collision>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_left1.dae" />
            </geometry>
            <origin xyz="0.036 -0.052 0.0 " rpy=" 0 0 1.5708" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="gripper_left2">
        <visual>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_left2.dae" />
            </geometry>
            <origin xyz="0.03 0.024 -0.018 " rpy=" 0 0 1.5708" />
        </visual>
        <collision>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_left2.dae" />
            </geometry>
            <origin xyz="0.03 0.024 -0.018 " rpy=" 0 0 1.5708" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="gripper_left3">
        <visual>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_left3.dae" />
            </geometry>
            <origin xyz="0.034 0.0 -0.012 " rpy=" 0 3.14159 -1.5708" />
            <!-- <origin xyz = "0.0 0 0 " rpy = " 0 0 0"/> -->
        </visual>
        <collision>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_left3.dae" />
            </geometry>
            <origin xyz="0.034 0.0 -0.012 " rpy=" 0 3.14159 -1.5708" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="gripper_right1">
        <visual>
            <geometry>
                <!--- 0.0 0 -0.04 -->
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_right1.dae" />
            </geometry>
            <origin xyz="-0.072 -0.05 0.0 " rpy=" 0 0 1.5708" />
        </visual>
        <collision>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_right1.dae" />
            </geometry>
            <origin xyz="-0.036 -0.052 0.0 " rpy=" 0 0 1.5708" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="gripper_right2">
        <visual>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_right2.dae" />
            </geometry>
            <origin xyz="-0.066 0.023 -0.018 " rpy=" 0 0 1.5708" />
        </visual>
        <collision>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_right2.dae" />
            </geometry>
            <origin xyz="-0.03 0.024 -0.018 " rpy=" 0 0 1.5708" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>
    <link name="gripper_right3">
        <visual>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_right3.dae" />
            </geometry>
            <origin xyz="0 0.0 -0.012 " rpy=" 0 3.14159 -1.5708" />
        </visual>
        <collision>
            <geometry>
                <mesh filename="package://mycobot_description/urdf/mycobot_320_m5_2020/gripper_right3.dae" />
            </geometry>
            <origin xyz="-0.034 0.0 -0.012 " rpy=" 0 3.14159 -1.5708" />
        </collision>
        <inertial>
            <mass value="0.1" />
            <origin xyz="0 0 0" rpy="0 0 0" />
            <inertia ixx="0.03" iyy="0.03" izz="0.03" ixy="0.0" ixz="0.0" iyz="0.0" />
        </inertial>
    </link>

    
    <joint name="base_footprint_joint" type="fixed">
        <parent link="base_footprint" />
        <child link="base" />
    </joint>

    <joint name="joint2_to_joint1" type="revolute">
        <axis xyz="0 0 1" />
        <limit effort="1000.0" lower="-3.14" upper="3.14159" velocity="0" />
        <parent link="base" />
        <child link="link1" />
        <origin xyz="0 0 0.17846" rpy="0 0 0" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="joint3_to_joint2" type="revolute">
        <axis xyz="0 0 1" />
        <limit effort="1000.0" lower="-3.14" upper="3.14159" velocity="0" />
        <parent link="link1" />
        <child link="link2" />
        <origin xyz="0 0 0" rpy="0 -1.5708 1.5708" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="joint4_to_joint3" type="revolute">
        <axis xyz=" 0 0 1" />
        <limit effort="1000.0" lower="-3.14" upper="3.14159" velocity="0" />
        <parent link="link2" />
        <child link="link3" />
        <origin xyz="0.13635 0 0   " rpy="0 0 0" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="joint5_to_joint4" type="revolute">
        <axis xyz=" 0 0 1" />
        <limit effort="1000.0" lower="-3.14" upper="3.14159" velocity="0" />
        <parent link="link3" />
        <child link="link4" />
        <origin xyz="0.1 0 0.09 " rpy=" 0 0 1.57080" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="joint6_to_joint5" type="revolute">
        <axis xyz="0 0 1" />
        <limit effort="1000.0" lower="-3.14" upper="3.14159" velocity="0" />
        <parent link="link4" />
        <child link="link5" />
        <origin xyz="0 -0.07318 0" rpy="1.5708 -1.5708 0" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="joint6output_to_joint6" type="revolute">
        <axis xyz="0 0 1" />
        <limit effort="1000.0" lower="-3.14" upper="3.14159" velocity="0" />
        <parent link="link5" />
        <child link="link6" />
        <origin xyz="0.00 0.06635 0" rpy="-1.5708 0 0" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="joint6output_to_gripper_base" type="fixed">
        <!-- <axis xyz="0 0 1"/>
    <limit effort = "1000.0" lower = "-3.05" upper = "3.05" velocity = "0"/> -->
        <parent link="link6" />
        <child link="gripper_base" />
        <origin xyz="0 0.0 0.034" rpy="1.5708 0 2.6178" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="gripper_controller" type="revolute">
        <axis xyz="0 0 1" />
        <limit effort="1000.0" lower="-0.7" upper="0.3" velocity="0" />
        <parent link="gripper_base" />
        <child link="gripper_left3" />
        <origin xyz="-0.018 0.016 0" rpy="0 0 0" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="gripper_base_to_gripper_left2" type="revolute">
        <axis xyz="0 0 1" />
        <limit effort="1000.0" lower="-0.8" upper="0.5" velocity="0" />
        <parent link="gripper_base" />
        <child link="gripper_left2" />
        <origin xyz="-0.05 -0.01 0" rpy="0 0 0" />
        <mimic joint="gripper_controller" multiplier="1.0" offset="0" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="gripper_left3_to_gripper_left1" type="revolute">
        <axis xyz="0 0 1" />
        <limit effort="1000.0" lower="-0.5" upper="0.5" velocity="0" />
        <parent link="gripper_left3" />
        <child link="gripper_left1" />
        <origin xyz="-0.0356 0.051 -0.018" rpy="0 0 0" />
        <mimic joint="gripper_controller" multiplier="-1.0" offset="0" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="gripper_base_to_gripper_right3" type="revolute">
        <axis xyz="0 0 1" />
        <limit effort="1000.0" lower="-0.3" upper="0.7" velocity="0" />
        <parent link="gripper_base" />
        <child link="gripper_right3" />
        <origin xyz="0.018 0.016 0" rpy="0 0 0" />
        <mimic joint="gripper_controller" multiplier="-1.0" offset="0" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="gripper_base_to_gripper_right2" type="revolute">
        <axis xyz="0 0 1" />
        <limit effort="1000.0" lower="-0.5" upper="0.8" velocity="0" />
        <parent link="gripper_base" />
        <child link="gripper_right2" />
        <origin xyz="0.046 -0.01 0" rpy="0 0 0" />
        <mimic joint="gripper_controller" multiplier="-1.0" offset="0" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>
    <joint name="gripper_right3_to_gripper_right1" type="revolute">
        <axis xyz="0 0 1" />
        <limit effort="1000.0" lower="-0.5" upper="0.5" velocity="0" />
        <parent link="gripper_right3" />
        <child link="gripper_right1" />
        <origin xyz="0.033 0.051 -0.018" rpy="0 0 0" />
        <mimic joint="gripper_controller" multiplier="1.0" offset="0" />
        <dynamics damping="1.0e-6" friction="2.0e-1" />
    </joint>


    <xacro:if value="$(arg gazebo_plugin)">
        <transmission name="trans_joint2_to_joint1">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="joint2_to_joint1">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="joint2_to_joint1_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        <transmission name="trans_joint3_to_joint2">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="joint3_to_joint2">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="joint3_to_joint2_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        <transmission name="trans_joint4_to_joint3">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="joint4_to_joint3">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="joint4_to_joint3_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        <transmission name="trans_joint5_to_joint4">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="joint5_to_joint4">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="joint5_to_joint4_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        <transmission name="trans_joint6_to_joint5">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="joint6_to_joint5">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="joint6_to_joint5_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        <transmission name="trans_joint6output_to_joint6">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="joint6output_to_joint6">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="joint6output_to_joint6_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        <transmission name="trans_gripper_controller">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="gripper_controller">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="gripper_controller_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        <transmission name="trans_gripper_base_to_gripper_left2">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="gripper_base_to_gripper_left2">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="gripper_base_to_gripper_left2_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        <transmission name="trans_gripper_left3_to_gripper_left1">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="gripper_left3_to_gripper_left1">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="gripper_left3_to_gripper_left1_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        <transmission name="trans_gripper_base_to_gripper_right3">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="gripper_base_to_gripper_right3">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="gripper_base_to_gripper_right3_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        <transmission name="trans_gripper_base_to_gripper_right2">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="gripper_base_to_gripper_right2">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="gripper_base_to_gripper_right2_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        <transmission name="trans_gripper_right3_to_gripper_right1">
            <type>transmission_interface/SimpleTransmission</type>
            <joint name="gripper_right3_to_gripper_right1">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            </joint>
            <actuator name="gripper_right3_to_gripper_right1_motor">
                <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
                <mechanicalReduction>1</mechanicalReduction>
            </actuator>
        </transmission>
        

        <gazebo>
            <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
                <robotNamespace>/</robotNamespace>
                <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
                <legacyModeNS>false</legacyModeNS>
            </plugin>
        </gazebo>
        
        
    </xacro:if>
    
</robot>

Here is the launch file:

<?xml version="1.0"?>
<launch>
  <!-- Definitions of arguments that you can pass this launch file, for example paused:=true -->
  <arg name="model" default="$(find mycobot_description)/urdf/mycobot_320_m5_2020/mycobot_pro_320_m5_2020_gripper.urdf" />
  <arg name="paused" default="false" />
  <arg name="use_sim_time" default="true" />
  <arg name="gui" default="true" />
  <arg name="headless" default="false" />
  <arg name="debug" default="false" />
  <arg name="world_name" default="$(find mycobot_gazebo)/worlds/empty.world" />
  <arg name="xacro_option" default="" />
  <arg name="robot_namespace" default="" />

  <!-- Initial position in Gazebo -->
  <arg name="x0" default="0" />
  <arg name="y0" default="0" />
  <arg name="z0" default="0.01" />

  <!-- Load the Gazebo simulator with specified world file -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(arg world_name)" />
    <arg name="debug" value="$(arg debug)" />
<arg name="gui" value="$(arg gui)" />
    <arg name="paused" value="$(arg paused)" />
<arg name="use_sim_time" value="$(arg use_sim_time)" />
    <arg name="headless" value="$(arg headless)" />
  </include>

  <!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
  <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
    args="-urdf -model firefighter -param robot_description -x $(arg x0) -y $(arg y0) -z $(arg z0)" />

  <!-- Publish robot's link & joint status -->
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />

  <!-- Load the URDF into the ROS Parameter Server -->
  <param name="robot_description" command="$(find xacro)/xacro '$(arg model)' gazebo_plugin:=true
            robot_namespace:='$(arg robot_namespace)'
        $(arg xacro_option)" />

  <include file="$(find mycobot_control)/launch/mycobot_fake_control.launch" />

</launch>
$\endgroup$
1
  • $\begingroup$ What do you see in console when you add verbose arg to the empty_world.lauch include? $\endgroup$ Commented Jun 20 at 20:58

1 Answer 1

0
$\begingroup$

I see you haven't used this tag.

<gazebo reference="my_link">
    <material>Gazebo/Black</material>
</gazebo>

Can you add this tag for the "links" in your file?

$\endgroup$

Your Answer

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

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