set_model_state not working properly in turtlebot simulation

asked 2016-05-13 16:47:11 -0500

yuhangc gravatar image

I'm trying to make a box moving in the turtlebot simulation (for turtlebot to follow) using "set_model_state" service. However it is behaving weirdly. It only update the position every 1~2 seconds but I'm sending the new position at 20Hz. I experimented with different rates but got similar response.

This only happened when I run the turtlebot_gazebo simulation. If I just run gazebo without turtlebot, it worked fine. I'm using ROS indigo with ubuntu 14.04, and gazebo 2. I made a python script to call the set_model_state service. I also tried to publish to the /gazebo/set_model_state topic and got the same response.

Any idea why this happened and how to solve it? Thanks!

edit retag flag offensive close merge delete