Ask Your Question
0

How to promote robot_state_publisher rate?

asked 2018-06-29 07:17:55 -0500

littleghost gravatar image

updated 2018-06-29 07:54:45 -0500

I want to use tf broadcaster to move arms in rviz, but the rate of robot_state_publisher is 10Hz, which cause lag in simulation. I want to know how to fix that. I use rosrun tf view_frames to check the rate.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-06-29 07:51:15 -0500

littleghost gravatar image

updated 2018-06-29 07:55:34 -0500

I try to add <param name="rate" value="1000"/> in my launch file and it seems better now.

The robot_state_publisher rate becomes nearly 50Hz.

edit flag offensive delete link more
1

answered 2018-06-29 07:40:42 -0500

mgruhler gravatar image

You should not use the robot_state_publisher to drive something. As the name suggests, this publishes the state of the robot, (quote)

robot_state_publisher uses the URDF specified by the parameter robot_description and the joint positions from the topic joint_states to calculate the forward kinematics of the robot and publish the results via tf.

To drive the robot arm you need to use a controller. The arms joints send their state then to the robot_state_publisher which again translates that to tf.

There is, however, a parameter publish_frequency that should let you specify the frequency of the robot_state_publisher. Default is 50Hz.

edit flag offensive delete link more

Comments

I run the "rosrun tf view_frames" and find that the robot _state_publisher rate is only 10Hz.

littleghost gravatar image littleghost  ( 2018-06-29 07:50:02 -0500 )edit

Did anybody find the solution to this problem. I need faster than 50hz but no matter what I do it stays at max 50hz.

suomynona gravatar image suomynona  ( 2021-06-24 16:23:35 -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: 2018-06-29 07:17:55 -0500

Seen: 761 times

Last updated: Jun 29 '18