Rosanswers logo

Hi there,

this is my launch file

<?xml version="1.0"?>
  <!-- upload urdf -->
  <param name="robot_description" textfile="$(find robot_arm_pkg)/urdf/arduino_robot_arm.urdf" />

  <!-- Combine joint values -->
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>

  <!-- Show in Rviz   -->
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find robot_arm_pkg)/launch/config.rviz" />

  <!-- send joint values -->
  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
    <param name="use_gui" value="True"/>

I'm using the joint_state_publisher GUI to control a robot in Rviz, the problem is the joint_state_publisher window is not appear. I already installed the joint_state_publisher and joint_state_publisher_gui by using:

sudo apt-get install ros-kinetic-joint-state-publisher
sudo apt-get install ros-kinetic-joint-state-publisher-gui

there are no errors are shown when I launch the file

By the way, I tested the same package and launch file in another system and it works fine

Originally posted by Moneera Banjar on ROS Answers with karma: 108 on 2020-10-14

Post score: 2


1 Answer 1


Rosanswers logo

Since the update split of the GUI capabilities of the joint_state_publisher into its own package, it is now recommended to run that node separately. In future releases the use_gui parameter will no longer be used. If you had an output="screen" attribute in your joint_state_publisher <node> tag. You'd see a warning like the following:

The 'use_gui' parameter was specified, which is deprecated. We'll attempt to find and run the GUI, but if this fails you should install the 'joint_state_publisher_gui' package instead and run that. This backwards compatibility option will be removed in Noetic.

Now as to why this same launch file worked on another system... a bit of a mystery, but my best guess is that the other system didn't have the same package versions. Nominally, in Kinetic (which you seem to be using), the GUI should still pop up. That said, I'm curious what would happen if you took the advice of the above warning and did things the currently-recommended way -- does your issue disappear? My launch files now usually have a snippet similar to the following:

<arg name="use_gui" default="true" doc="Should the joint_state_publisher use a GUI for controlling joint states" />
<node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher" output="screen" unless="$(arg use_gui)" />
<node pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" name="joint_state_publisher_gui" output="screen" if="$(arg use_gui)" />

Originally posted by jarvisschultz with karma: 9031 on 2020-10-14

This answer was ACCEPTED on the original site

Post score: 6

Original comments

Comment by Moneera Banjar on 2020-10-16:
Thank you for your help, it works correctly I realize that the current machine uses joint_state_publisher package installed from source, and the other machine uses the package installed from binaries .. this might cause the issue and the two packages have different versions!

Comment by AllOutMayhem on 2023-01-31:
Hi, when you say "the other machine", which other machine are you referring to?


Your Answer

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