ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

arm_controller/joint_trajectory topics not being displayed

asked 2018-05-24 17:51:45 -0500

updated 2018-05-25 03:44:47 -0500


For my GSoC 2018 project, I had previously attached a Kinect sensor to the UR5 robot, generated MoveIt! Config packages for them and tested it on RViz. I was able to spawn the robot with the controllers activated in Gazebo. The next step of my project was to be able to command the robot in Gazebo using MoveIt!.

In this process of trying to launch the robot in Gazebo, I noticed that the arm_controller/joint_trajectory topics which are related to the action server are not being displayed while using rostopic list. However, the weird part is that on launch, the initial information from the terminal shows that the arm_controller_spawner node has started. This link had a related solution but it didn't work.

I previously downloaded the Universal robot Github package and the ur5.launch file loads the required arm_controller.joint_trajectory topics properly. However, that same thing was not working with my files (which are minor edits of the UR5 files). I am not able to figure out why exactly is this happening. I have attached the related files with this question. Thanks in advance. Edit: While comparing with the UR5 launch, I realised that the arm_controller and joint_state_controller are not loaded successfully with my model as that message is not showing on the terminal with Gazebo launch.

The complete URDF file can be accessed via this Google Drive Link.

Gazebo Robot Launch file

<?xml version="1.0"?>

<!-- Gazebo Launch file -->
  <arg name="limited" default="false"/>
  <arg name="paused" default="false"/>
  <arg name="gui" default="true"/>

  <!-- startup simulated world -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" default="worlds/"/>
    <arg name="paused" value="$(arg paused)"/>
    <arg name="gui" value="$(arg gui)"/>
    <arg name="verbose" value="true" />

  <!-- send robot urdf to param server -->
  <include file="$(find myworkcell_support)/launch/workcell_ur5.launch">
  <!-- <arg name="limited" value="$(arg limited)"/> -->

  <!-- push robot_description to factory and spawn robot in gazebo -->
  <node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1" respawn="false" output="screen" />

  <!-- push robot_description to factory and spawn robot in gazebo -->
  <include file="$(find myworkcell_support)/gazebo/launch/controller_utils.launch"/>

  <rosparam file="$(find myworkcell_support)/gazebo/controller/myworkcell_control.yaml" command="load"/>
  <node name="arm_controller_spawner" pkg="controller_manager" type="controller_manager" args="spawn arm_controller" respawn="false" output="screen"/>


workcell_ur5.launch file

  <arg name="gui" default="true"/>
  <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find myworkcell_support)/urdf/workcell_gazebo_trial1.urdf'" /> 
  <param name="use_gui" value="$(arg gui)"/>


<?xml version="1.0"?>

  <!-- Robot state publisher -->
  <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
    <param name="publish_frequency" type="double" value="50.0" />
    <param name="tf_prefix" type="string" value="" />

  <!-- Fake Calibration -->
  <node pkg="rostopic" type="rostopic" name="fake_joint_calibration"
        args="pub /calibrated std_msgs/Bool true" />

  <!-- joint_state_controller -->
  <rosparam file="$(find myworkcell_support)/gazebo/controller/joint_state_controller.yaml" command="load"/>
  <node name="joint_state_controller_spawner" pkg="controller_manager" type="controller_manager" args="spawn joint_state_controller" respawn="false" output="screen"/>



  type: position_controllers/JointTrajectoryController
     - shoulder_pan_joint
     - shoulder_lift_joint
     - elbow_joint
     - wrist_1_joint
     - wrist_2_joint
     - wrist_3_joint
  constraints ...
edit retag flag offensive close merge delete



Please do not post screenshots of text in a console. This not only violates the support guidelines, but it also completely unnecessary.

gvdhoorn gravatar image gvdhoorn  ( 2018-05-25 02:38:20 -0500 )edit

Oops. Sorry for that. Have removed the screenshots. Thanks!

aaditya_saraiya gravatar image aaditya_saraiya  ( 2018-05-25 03:46:25 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-05-26 12:59:53 -0500

So after a bit of experimentation, I realized that the issue was with the URDF file where the control plugin had been put up. The robotNamespace had been set to myworkcell which was not similar to the namespace specified in the .yaml files. By commenting out the robotNamespace parameter as shown below, the topics joint_state_controller and the arm_controller were loaded successfully.

  <plugin name="gazebo_ros_control" filename="">
<!-- <robotNamespace>/myworkcell</robotNamespace> -->

I came to know about this issue after using the following command after launching the Gazebo file. This allowed me to see that the controller_manager was being created under the myworkcell namespace which wasn't how it was supposed to be.

rosservice list | grep controller_manager

This answer will also be helpful if this answer does not work out.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-05-24 17:51:45 -0500

Seen: 1,291 times

Last updated: May 26 '18