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

joint_state_publisher window is not shown

asked 2020-10-14 10:35:47 -0500

Hi there,

this is my launch file

<?xml version="1.0"?>
<launch>
  <!-- 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"/>
  </node>
</launch>

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

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
6

answered 2020-10-14 12:11:13 -0500

updated 2020-10-14 12:11:47 -0500

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)" />
edit flag offensive delete link more

Comments

1

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!

Moneera Banjar gravatar image Moneera Banjar  ( 2020-10-16 17:53:36 -0500 )edit

Hi, when you say "the other machine", which other machine are you referring to?

AllOutMayhem gravatar image AllOutMayhem  ( 2023-01-31 22:33:06 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-10-14 10:34:44 -0500

Seen: 3,681 times

Last updated: Oct 14 '20