Ask Your Question
0

the state_publisher executable is deprecated

asked 2020-04-08 17:48:19 -0500

AntarPrantik gravatar image

Hi there, I'm new to ROS and on Melodic. I was going through the URDF tutorials where I'm facing the following errors -

1.[ WARN] [1586385079.319484096]: The 'state_publisher' executable is deprecated. Please use 'robot_state_publisher' instead

2 The Controller GUI isn't showing up

3.TIFFReadDirectory: Warning, Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples..

4.TIFFFieldWithTag: Internal error, unknown tag 0x829a.

Please tell me where I've gone wrong and how to fix them..

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-09 07:05:48 -0500

Weasfas gravatar image

Hi @AntarPrantik,

In new ROS distributions the Robot_State_Publisher and Joint_State_publisher are launched differently. I assume the tutorial is for older ROS version.

To launch the RST in Melodic you can do this:

<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />

and the JSP:

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />

Furthermore, please note in the JSP documentation that the GUI functionality has been split out of the main joint_state_publisher package into its own package called joint_state_publisher_gui, so instead of launching the standard JST just use the joint_state_publisher_gui. If you do not have it installed you can install the package with:

sudo apt-get install ros-$(rosversion -d)-joint-state-publisher-gui

and launch with

<node name="jsp_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" />

Finally, those warning messages you posted come from your TIFF files and a visual bug you can check here. Anyways they are non fatal warnings as said in other posts so you should not have any big issue with them.

edit flag offensive delete link more

Comments

Hi@weasfas, Thanks a lot for reaching out to me, your suggestions worked pretty well for me. The Jsp gui is not visible.However, a few errors remain like below -

1.[ WARN] [1586448026.485747086]: The 'state_publisher' executable is deprecated. Please use 'robot_state_publisher' instead

2.[WARN] [1586448027.370277]: 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.

  1. The logo of the GUI is a cross mark

and the tiff errors are not fatal and I can't do much about them as I can see now

AntarPrantik gravatar image AntarPrantik  ( 2020-04-09 11:09:00 -0500 )edit

Here's the launch file. I edited as you had suggested -

<launch>

<arg name="model" default="$(find urdf_tutorial)/urdf/01-myfirst.urdf"/> <arg name="gui" default="true"/> <arg name="rvizconfig" default="$(find urdf_tutorial)/rviz/urdf.rviz"/>

<node if="$(arg gui)" name="jsp_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui"/> <node unless="$(arg gui)" name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/> <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/> <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true"/>

</launch>

AntarPrantik gravatar image AntarPrantik  ( 2020-04-09 11:09:35 -0500 )edit

Hi @Weasfas,

The full launch file should be like this:

<launch>

    <arg name="model" default="$(find urdf_tutorial)/urdf/01-myfirst.urdf"/>
    <arg name="gui" default="true"/>
    <arg name="rvizconfig" default="$(find urdf_tutorial)/rviz/urdf.rviz"/>

    <param name="robot_description" command="$(find xacro)/xacro $(arg model)" />

    <node if="$(arg gui)" name="joint_state_publisher" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui"/>
    <node unless="$(arg gui)" name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/>
    <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
    <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true"/>

</launch>

Please note the param line in which you load the robot_description in the ROS parameter server. You will need that to work properly with the JST and RST.

Weasfas gravatar image Weasfas  ( 2020-04-10 06:43:56 -0500 )edit

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-04-08 17:48:19 -0500

Seen: 173 times

Last updated: Apr 09