Hello,

I was working with my URDF model and the robot_state_publisher and I noticed that: for the fixed joints, the tf is computed at the beginning and has no associated publish rate (in the rqt tf_tree plugin it is displayed 10000), however when I look at the other joints the frequency displayed varies depending on RST.

My question is, there is a way to adjust the robot_state_publisher publish frequency to avoid the shatter showed in the following video:

TF problem

I tried to adjust the publish_frequency in the robot _state_publisher node, but with no avail, because the average rate of the joints tf is the same no matter what frequency I pass as a parameter.

Thanks.

Edit:

Testing different things I have noticed that this issue is related to the way I launch files. I mean, when only the description (with the RST and JSP) is launched, the publish frequency is not correct, while when I launch gazebo with the same set up (but with no JSP) the average publish frequency is the one I requested.

edit retag close merge delete

Sort by » oldest newest most voted

I just solved the issue by adjusting the rate in the joint_state_publisher node. Actually, was that node the one delaying the system publish rate.

<node unless="\$(arg sim)" name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
<param name="rate" value="50" />
</node>


Thanks for the help.

more

You can set the publish frequency as specified in parameters for robot_state_publisher.

more

Hi @Choco93,

As I said in my question, it does not matter what value I assigned to the publish_frequency in robot_state_publisher node. Besides, the default value is 50 Hz and my tfs are not being published at that rate but at 11 Hz.

( 2019-11-06 07:25:41 -0500 )edit

Sorry I misunderstood your question. The other joints you are talking about, where are they coming from? Are you publishing them yourself?

( 2019-11-06 07:41:31 -0500 )edit

No problem.

I have the following set ups:

1. Use Gazebo with the URDF model (Xacro + robot_state_publisher) to test several packages being implemented.

2. When I want to deploy the final version of the packages I test them in the real vehicle and I launch all vehicle related stuff + the description (Xacro + robot_state_publisher and joint_state_publisher).

In the first setup I received the tf (looking at the tf_tree) of all static joints with 10000 Hz and all non fixed joints (wheels for instance) with 50 Hz (the default value provided by the robot_state_publisher).

However, in the second set up I have the same rate for the fixed joints but 11 Hz for the non fixed no matter what parameter value I pass to the launch of the RST node.

( 2019-11-06 10:34:10 -0500 )edit

Are both of your setups same? Running same nodes? Any hardware difference?

( 2019-11-07 01:37:50 -0500 )edit

The only difference is that, in the real platform, all drivers for lidars, imu and GPS are launched together with the wheel odometry computed form the CAN.

Because the rest of the set up is the same, map_server, amcl etc.

( 2019-11-07 02:55:26 -0500 )edit

I am at loss here, only thing I can think of is probably your hardware is causing delay somehow.

( 2019-11-08 01:11:08 -0500 )edit