0
$\begingroup$

Rosanswers logo

I'm new to ros, I exported urdf from solidworks. when I add transmission to urdf and launch it gazebo is not opening it's giving me error as

[ INFO] [1597656176.792430594, 0.245000000]: Loading gazebo_ros_control plugin
[ INFO] [1597656176.793072386, 0.245000000]: Starting gazebo_ros_control plugin in namespace: /
[ INFO] [1597656176.794135347, 0.245000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server.
Segmentation fault (core dumped)
[gazebo-1] process has died [pid 16223, exit code 139, cmd /home/xxxxx/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/scripts/gzserver -e ode worlds/empty.world __name:=gazebo __log:=/home/xxxx/.ros/log/5c2a3c2a-e069-11ea-a169-28d2447fbe91/gazebo-1.log].
log file: /home/xxxxx/.ros/log/5c2a3c2a-e069-11ea-a169-28d2447fbe91/gazebo-1*.log

but if I launch removing transmission tags it's launch perfectly.

I also tried with rrbot it gives me same error

edit: I've noticed it's because of this

<gazebo>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
        <robotNamespace>/</robotNamespace>
    </plugin>
</gazebo>

edit 2:

urdf:

<?xml version="1.0" encoding="utf-8"?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner ([email protected]) 
     Commit Version: 1.5.1-0-g916b5db  Build Version: 1.5.7152.31018
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot
  name="myrobot">
  <link
    name="base_link">
    <inertial>
      <origin
        xyz="-9.8696E-13 1.9623E-12 0.0045914"
        rpy="0 0 0" />
      <mass
        value="0.42609" />
      <inertia
        ixx="0.00066906"
        ixy="9.8933E-19"
        ixz="-1.1435E-20"
        iyy="0.00066906"
        iyz="-4.86E-20"
        izz="0.0013313" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/base_link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.0549 0.8352941 0.05 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>
  <link
    name="axis_1">
    <inertial>
      <origin
        xyz="-1.9188529907279E-05 0.0408070112537518 -5.16123564547961E-05"
        rpy="0 0 0" />
      <mass
        value="1.0766304222928" />
      <inertia
        ixx="0.00448300046656785"
        ixy="-3.42116795702848E-07"
        ixz="-4.62222489752297E-07"
        iyy="0.00764833990366456"
        iyz="-9.51387517754669E-07"
        izz="0.00478779956731877" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_1.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.96078 0.9490196 0.196078 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_1.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="CS1_JY"
    type="revolute">
    <origin
      xyz="0 0 -0.007418"
      rpy="1.5708 0 0" />
    <parent
      link="base_link" />
    <child
      link="axis_1" />
    <axis
      xyz="0 1 0" />
    <limit
      lower="-3.1416"
      upper="3.1416"
      effort="16.65"
      velocity="1.0472" />
  </joint>
  <link
    name="axis_2">
    <inertial>
      <origin
        xyz="0.000584059554378004 0.0287533737382525 0.00295671723448659"
        rpy="0 0 0" />
      <mass
        value="0.605345156556413" />
      <inertia
        ixx="0.00261234709569383"
        ixy="4.5980780114133E-06"
        ixz="7.92379593078752E-08"
        iyy="0.000455231208205277"
        iyz="-4.1286471862465E-05"
        izz="0.00228496027770769" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_2.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.788235 0.0470588 0.0470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_2.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="CS2_JX"
    type="revolute">
    <origin
      xyz="0 0.098418 0"
      rpy="-0.5236 0 0" />
    <parent
      link="axis_1" />
    <child
      link="axis_2" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="0"
      upper="2.0944"
      effort="16.65"
      velocity="1.0472" />
  </joint>
  <link
    name="axis_3">
    <inertial>
      <origin
        xyz="0.000128226197855751 0.0146819954602909 0.0160853286443578"
        rpy="0 0 0" />
      <mass
        value="0.196627852021408" />
      <inertia
        ixx="0.000289021312704464"
        ixy="-6.53312202419969E-07"
        ixz="-3.68984055220104E-07"
        iyy="0.000133778182953445"
        iyz="-3.90755330630791E-06"
        izz="0.000205857020457709" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_3.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.788235 0.0470588 0.0470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_3.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="CS3_JX"
    type="revolute">
    <origin
      xyz="-0.000825 0.2 0"
      rpy="0.16184 0 0" />
    <parent
      link="axis_2" />
    <child
      link="axis_3" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-3.6826"
      upper="0"
      effort="16.65"
      velocity="1.0472" />
  </joint>
  <link
    name="axis_4">
    <inertial>
      <origin
        xyz="0.00131830590087079 -3.24283722097363E-08 0.0584468806925138"
        rpy="0 0 0" />
      <mass
        value="0.135666131166316" />
      <inertia
        ixx="0.000171648323961738"
        ixy="7.84809768098463E-11"
        ixz="1.67427905148078E-06"
        iyy="0.000169180928551479"
        iyz="1.3515484895195E-10"
        izz="9.63179317550672E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_4.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.788235 0.0470588 0.0470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_4.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="CS4_JZ"
    type="revolute">
    <origin
      xyz="0 0 0.0485"
      rpy="0 0 0" />
    <parent
      link="axis_3" />
    <child
      link="axis_4" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="-3.1416"
      upper="3.1416"
      effort="0.13333"
      velocity="1.0472" />
  </joint>
  <link
    name="axis_5">
    <inertial>
      <origin
        xyz="0.00240941764072521 -0.00323918544806262 0.00183944664365857"
        rpy="0 0 0" />
      <mass
        value="0.00962563982922243" />
      <inertia
        ixx="1.04077939599365E-06"
        ixy="-7.61747322053136E-08"
        ixz="3.48083690608222E-08"
        iyy="3.08381331325869E-06"
        iyz="-1.3948000676181E-07"
        izz="2.30153871190481E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_5.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.96078 0.9490196 0.196078 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_5.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="CS5_JX"
    type="revolute">
    <origin
      xyz="0 7.7657E-05 0.10782"
      rpy="0.36176 0 0" />
    <parent
      link="axis_4" />
    <child
      link="axis_5" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-3.5709"
      upper="0"
      effort="0.7"
      velocity="1.0472" />
  </joint>
  <link
    name="axis_6">
    <inertial>
      <origin
        xyz="-0.00349269153511097 -0.000919361913902864 0.0342998328213469"
        rpy="0 0 0" />
      <mass
        value="0.0699688456604863" />
      <inertia
        ixx="1.5098477820153E-05"
        ixy="-1.49698854518899E-07"
        ixz="-9.08281190378363E-07"
        iyy="3.6379829500024E-05"
        iyz="-6.77574294129646E-07"
        izz="3.15779666601805E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_6.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.047058823 0.2313725 0.960784313 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/axis_6.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="CS6_JZ"
    type="revolute">
    <origin
      xyz="0 -0.005947 0.0007956"
      rpy="1.4378 0 0" />
    <parent
      link="axis_5" />
    <child
      link="axis_6" />
    <axis
      xyz="0 0 -1" />
    <limit
      lower="-3.1416"
      upper="3.1416"
      effort="0.08"
      velocity="1.0472" />
  </joint>
  <link
    name="EFR">
    <inertial>
      <origin
        xyz="-0.0105042612898266 -0.00799999999999999 0.0167121095536187"
        rpy="0 0 0" />
      <mass
        value="0.0163419673619417" />
      <inertia
        ixx="3.78651345813218E-06"
        ixy="2.54749891582919E-23"
        ixz="-5.94003603520545E-07"
        iyy="4.23427816319959E-06"
        iyz="-2.24993126614424E-22"
        izz="1.08102197917692E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/EFR.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.047058823 0.156862 0.584313725 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/EFR.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="CSEF_RXminus"
    type="prismatic">
    <origin
      xyz="-0.0013297 0.02 0.0582"
      rpy="0 0 0" />
    <parent
      link="axis_6" />
    <child
      link="EFR" />
    <axis
      xyz="-1 0 0" />
    <limit
      lower="-0.0013297"
      upper="0.01367"
      effort="0.7"
      velocity="0.02" />
  </joint>
  <link
    name="EFL">
    <inertial>
      <origin
        xyz="0.0105042612898266 -0.00800000000000002 0.0167121095536187"
        rpy="0 0 0" />
      <mass
        value="0.0163419673619417" />
      <inertia
        ixx="3.78651345813217E-06"
        ixy="-2.18308948311422E-22"
        ixz="5.94003603520544E-07"
        iyy="4.23427816319958E-06"
        iyz="6.88214269644119E-22"
        izz="1.08102197917692E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/EFL.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.047058823 0.156862 0.584313725 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://myrobot/meshes/EFL.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="CSEF_LXplus"
    type="prismatic">
    <origin
      xyz="0.0013297 0.02 0.0582"
      rpy="0 0 0" />
    <parent
      link="axis_6" />
    <child
      link="EFL" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-0.0013297"
      upper="0.01367"
      effort="0.7"
      velocity="0.02" />
  </joint>
    
<transmission name="trans_CS1_JY">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="CS1_JY">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
        </joint>
        <actuator name="CS1_JY_motor">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_CS2_JX">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="CS2_JX">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
        </joint>
        <actuator name="CS2_JX_motor">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_CS3_JX">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="CS3_JX">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
        </joint>
        <actuator name="CS3_JX_motor">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_CS4_JZ">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="CS4_JZ">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
        </joint>
        <actuator name="CS4_JZ_motor">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_CS5_JX">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="CS5_JX">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
        </joint>
        <actuator name="CS5_JX_motor">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_CS6_JZ">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="CS6_JZ">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
        </joint>
        <actuator name="CS6_JZ_motor">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_CSEF_RXminus">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="CSEF_RXminus">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
        </joint>
        <actuator name="CSEF_RXminus_motor">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_CSEF_LXplus">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="CSEF_LXplus">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
        </joint>
        <actuator name="CSEF_LXplus_motor">
            <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <gazebo>
        <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
            <robotNamespace>/myrobot</robotNamespace>
            <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
            <robotParam>/myrobot/robot_description</robotParam>
            <legacyModeNS>true</legacyModeNS>
        </plugin>
    </gazebo>
</robot>

controller:

myrobot:
  # Publish all joint states -----------------------------------
  joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 50  

  # Position Controllers ---------------------------------------
  joint1_position_controller:
    type: effort_controllers/JointEffortController
    joint: CS1_JY
    pid: {p: 100.0, i: 0.01, d: 10.0}
  joint2_position_controller:
    type: effort_controllers/JointEffortController
    joint: CS2_JX
    pid: {p: 100.0, i: 0.01, d: 10.0}
  joint3_position_controller:
    type: effort_controllers/JointEffortController
    joint: CS3_JX
    pid: {p: 100.0, i: 0.01, d: 10.0}
  joint4_position_controller:
    type: effort_controllers/JointEffortController
    joint: CS4_JZ
    pid: {p: 100.0, i: 0.01, d: 10.0}
  joint5_position_controller:
    type: effort_controllers/JointEffortController
    joint: CS5_JX
    pid: {p: 100.0, i: 0.01, d: 10.0}
  joint6_position_controller:
    type: effort_controllers/JointEffortController
    joint: CS6_JZ
    pid: {p: 100.0, i: 0.01, d: 10.0}
  joint7_position_controller:
    type: effort_controllers/JointEffortController
    joint: CSEF_RXminus
    pid: {p: 100.0, i: 0.01, d: 10.0}
  joint8_position_controller:
    type: effort_controllers/JointEffortController
    joint: CSEF_LXplus
    pid: {p: 100.0, i: 0.01, d: 10.0}

Originally posted by msaws on ROS Answers with karma: 3 on 2020-08-17

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I will post this as an answer but I do not know if it solve your problem. At least in my machine I was able to load all controllers and control the platform. So here we go:

I used you same URDF loading it as a xacro file (with the world fixed joint).

Then, I used these launch files:

For the robot_description:

<?xml version="1.0"?>

<launch>

  <!-- Do not launch Gazebo simulator and use Joint State publisher to debug joints -->
  <arg name="sim" default="false"/>
  <arg name="output" default="log"/>

  <!-- Load the URDF into the ROS Parameter Server -->
  <param name="robot_description"
    command="$(find xacro)/xacro --inorder '$(find myrobot_description)/urdf/myrobot.xacro'" />

  <!-- State joints publisher for debug -->
  <node unless="$(arg sim)" name="joint_state_publisher" pkg="joint_state_publisher"
    type="joint_state_publisher" output="$(arg output)" />

  <!-- Combine joint values -->
  <node name="robot_state_publisher" pkg="robot_state_publisher"
    type="robot_state_publisher" output="$(arg output)" />

  <!-- Launch Rviz for visualization -->
  <node name="rviz" pkg="rviz" type="rviz" />

</launch>

For the robot control:

<?xml version="1.0"?>

<launch>

  <!-- Coordinates to spawn model -->
  <arg name="x" default="0.0"/>
  <arg name="y" default="0.0"/>
  <arg name="z" default="0.01"/>
  <arg name="roll" default="0.0"/>
  <arg name="pitch" default="0.0"/>
  <arg name="yaw" default="0.0"/>

  <arg name="output" default="log"/>

  <!-- Load joint controller configurations from YAML file to parameter server -->
  <rosparam file="$(find myrobot_control)/config/myrobot_control.yaml" command="load"/>

  <!-- Start controllers -->
  <node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
    output="$(arg output)" args="
    joint_state_controller
    joint1_position_controller
    joint2_position_controller
    joint3_position_controller
    joint4_position_controller
    joint5_position_controller
    joint6_position_controller
    joint7_position_controller
    joint8_position_controller" />

  <!-- 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="$(arg output)"
    args="-urdf -model myrobot -param robot_description -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg roll) -P $(arg pitch) -Y $(arg yaw)"/>

</launch>

And the control config file:

# Publish all joint states -----------------------------------
joint_state_controller:
  type: joint_state_controller/JointStateController
  publish_rate: 50  

# Position Controllers ---------------------------------------
joint1_position_controller:
  type: effort_controllers/JointEffortController
  joint: CS1_JY
  pid: {p: 100.0, i: 0.0, d: 0.0}
joint2_position_controller:
  type: effort_controllers/JointEffortController
  joint: CS2_JX
  pid: {p: 100.0, i: 0.0, d: 0.0}
joint3_position_controller:
  type: effort_controllers/JointEffortController
  joint: CS3_JX
  pid: {p: 100.0, i: 0.0, d: 0.0}
joint4_position_controller:
  type: effort_controllers/JointEffortController
  joint: CS4_JZ
  pid: {p: 100.0, i: 0.0, d: 0.0}
joint5_position_controller:
  type: effort_controllers/JointEffortController
  joint: CS5_JX
  pid: {p: 100.0, i: 0.0, d: 0.0}
joint6_position_controller:
  type: effort_controllers/JointEffortController
  joint: CS6_JZ
  pid: {p: 100.0, i: 0.0, d: 0.0}
joint7_position_controller:
  type: effort_controllers/JointEffortController
  joint: CSEF_RXminus
  pid: {p: 100.0, i: 0.0, d: 0.0}
joint8_position_controller:
  type: effort_controllers/JointEffortController
  joint: CSEF_LXplus
  pid: {p: 100.0, i: 0.0, d: 0.0}

And finally to spawn the robot and launch it in Gazebo:

<?xml version="1.0"?>
<launch>

  <!-- Launch Gazebo simulator -->
  <arg name="sim" value="true"/>

  <!-- These are the arguments you can pass this launch file, for example paused:=true -->
  <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"/>

  <!-- Coordinates to spawn model -->
  <arg name="x" default="0.0"/>
  <arg name="y" default="0.0"/>
  <arg name="z" default="0.01"/>
  <arg name="roll" default="0.0"/>
  <arg name="pitch" default="0.0"/>
  <arg name="yaw" default="0.0"/>

  <arg name="vehicle" default="myrobot"/>

  <!-- Launch robot description -->
  <group ns="$(arg vehicle)">
    <include file="$(find myrobot_description)/launch/myrobot_description.launch">
      <arg name="sim" value="$(arg sim)"/>
    </include>
  </group>

  <!-- Launch Gazebo -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <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>

  <!-- Robot spawner and controllers -->
  <group ns="$(arg vehicle)">
    <include file="$(find myrobot_control)/launch/myrobot_control.launch">
      <arg name="x" value="$(arg x)"/>
      <arg name="y" value="$(arg y)"/>
      <arg name="z" value="$(arg z)"/>
      <arg name="roll" value="$(arg roll)"/>
      <arg name="pitch" value="$(arg pitch)"/>
      <arg name="yaw" value="$(arg yaw)"/>
    </include>
  </group>

</launch>

With this I was able to load properly all controllers; if that does not apply to your enviroment you may want to check what is happening in your machine, cause it will be something related to that not to the launchers/description/etc.

Hope that helps you.

Regards.


Originally posted by Weasfas with karma: 1695 on 2020-08-24

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by msaws on 2020-08-24:
Thank You so much for the help.

I don't understand what's the problem with my machine, I launch the exact same files as you have mentioned still got the the same segfault and Controller Spawner couldn't find the expected controller_manager ROS interface.

Comment by Weasfas on 2020-08-25:
@msaws, Well in that case I do not have more ideas, maybe tried your package in another environment, you can try it in a virtual machine.

Comment by msaws on 2020-08-26:
@Weasfas I tried in another machine and it was working perfectly fine, I think there's a problem with my machine some kind of installation problem I think. Should I uninstall and reinstall ROS and gazebo from the start?

Comment by gvdhoorn on 2020-08-26:
@msaws: there is a good chance you have a problem with partial updates. It's not uncommon to receive SEGFAULTs in that case.

Make sure to have updated all ROS packages for Melodic.

And to be clear: I'm not suggesting to build anything from sources, but to make sure you have all updates installed via apt.

Comment by msaws on 2020-08-26:
How do I update all the packages?

I mean which packages do I need to update

Comment by gvdhoorn on 2020-08-26:
As you would normally update your Ubuntu 18.04 packages.

I don't know what method you normally use.

Could be apt update && apt dist-upgrade, could be Synaptic, Ubuntu Software, etc.

Just make sure everything is up-to-date, and make sure to completely rebuild any ROS workspaces you have as well (so rm -rf devel/ build/ install/ logs/ and then build with Catkin).

$\endgroup$

Your Answer

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