Ask Your Question
0

How to know/check/confirm/debug if a controller is controlling/working?

asked 2019-12-16 11:21:19 -0600

marko1990 gravatar image

updated 2019-12-19 12:03:25 -0600

Hello everyone,

I am using ROS Melodic and the Gazebo 9. I have been struggling with the controllers for some time now. I have added the gazebo plugin, the intertia and the transmission elements to the urdf.xacro file to simulate the robot in the Gazebo. The problem is when I launch the test_gazebo.launch file the robot is spawned in the gazebo and the simulation is paused, after starting the simulation the robot model just falls down like there is not control whatsoever. It pulled down by the gravity, when I try with the gravity switched off it stays in the position.

my xacro looks like this (I have randomly chosen the fanuc model, it could have been any robot manipulator from the ROS industrial repository):

<robot <a="" href="http://xmlns:xacro="http://wiki.ros.org/xacro%22">xmlns:xacro="http://wiki.ros.org/xacro"> <xacro:include filename="$(find fanuc_resources)/urdf/common_materials.xacro"></xacro:include></robot>

<xacro:macro name="fanuc_m16ib20" params="prefix">

<!--Gazebo ROS Control -->
<gazebo>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
        <robotNamespace>/</robotNamespace>
        <legacyModeNS>true</legacyModeNS>
  </plugin>
</gazebo>

<link name="${prefix}base_link">
  <visual>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
            <mesh filename="package://fanuc_m16ib_support/meshes/m16ib20/visual/base_link.stl"/>
        </geometry>
    <xacro:material_fanuc_yellow />
  </visual>
  <collision>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
            <mesh filename="package://fanuc_m16ib_support/meshes/m16ib20/collision/base_link.stl"/>
        </geometry>
  </collision>
  <inertial>
        <origin xyz = "0.0 0.0 0.0" rpy = "0 0 0" /> 
        <mass value="4.0" />
        <inertia ixx="0.00" iyy="0.00" izz="0.001" ixy="0.0" ixz="0.0" iyz="0.0" />
   </inertial>
</link>
<link name="world"> 
</link>
<joint name="world-${prefix}base_link" type="fixed">
  <origin xyz="0 0 0.0" rpy="0 0 0"/>
  <parent link="world"/>
  <child link="${prefix}base_link"/>
</joint>

<link name="${prefix}base"> 
</link>
<joint name="${prefix}base_link-base" type="fixed">
  <origin xyz="0 0 0.525" rpy="0 0 0"/>
  <parent link="${prefix}base_link"/>
  <child link="${prefix}base"/>
</joint>

<link name="${prefix}link_1">
  <visual>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://fanuc_m16ib_support/meshes/m16ib20/visual/link_1.stl"/>
    </geometry>
    <xacro:material_fanuc_yellow />
  </visual>
  <collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://fanuc_m16ib_support/meshes/m16ib20/collision/link_1.stl"/>
    </geometry>
  </collision>
  <inertial>
    <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
    <mass value="4.0" />
    <inertia ixx="0.00" iyy="0.00" izz="0.001" ixy="0.0" ixz="0.0" iyz="0.0" />
   </inertial>
</link>
<joint name="${prefix}joint_1" type="revolute">
  <origin xyz="0 0 0.525" rpy="0 0 0"/>
  <parent link="${prefix}base_link"/>
  <child link="${prefix}link_1"/>
  <axis xyz="0 0 1 ...
(more)
edit retag flag offensive close merge delete

Comments

Can you clarify how this is related to #q338443?

gvdhoorn gravatar imagegvdhoorn ( 2019-12-16 11:26:06 -0600 )edit

Hello gvdhoorn thanks for attention, Here I have indentified the problem, it is not related to moveit, it is related to the control. I have tried this same launch file with the few different urdf/xacro descriptions and all of them are just not controlled. Sorry if it is duplicate, but I hope I have explained this one better, without additional unnecessary involving the info which is not related. Thanks

marko1990 gravatar imagemarko1990 ( 2019-12-16 11:43:19 -0600 )edit

Ok. That would have been good to add to your question text.

gvdhoorn gravatar imagegvdhoorn ( 2019-12-16 11:50:35 -0600 )edit

Also I have been switching between the effort_controllers/JointTrajectoryController and position_controllers/JointTrajectoryController. But with the same result. That why I would like to know how can I make sure the certain controller is actually controlling or if the certain joints group

marko1990 gravatar imagemarko1990 ( 2019-12-16 12:23:32 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-12-21 09:01:27 -0600

marko1990 gravatar image

Hello Everyone,

the answer for this question and #q338443 How to know if the controllers are working/controlling? Spawned robot in gazebo is falling down/crushing to the floor.. It seems the position joint interface is still not working correctly in the Gazebo9(even though it looks like it works when in the rrbot urdf is interfaced as a position controller). Anyway, in a case of position controllers, everything is loaded without a problem, but when the simulation starts, the robot just falls down like there is nothing that controls it. So I do not know if there is a problem with the controller, but I wouldn't say that since the controller has been loaded and started successfully, there is also no problem in the Gazebo9, the problem is the communication/interface between those 2, looks like there is none of it. What I have done is changed the controller interface from the position to effort and added a value for the effort in the urdf, after that it worked. Does anyone knows what could it be wrong with the position controller, does it needs some additional configuration? I mean it wasn't complaining about anything, but it sure didn't work

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-12-16 11:21:19 -0600

Seen: 33 times

Last updated: Dec 21 '19