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

Force torque sensor stops publishing

asked 2018-02-13 03:08:27 -0500

Fiddle gravatar image

updated 2018-02-15 06:09:44 -0500

Hi, I am trying to run a reinforcement learning simulation and I decided, that I needed a force/torque sensor inside my robot to improve it. When I start the simulation, for the first episode everything runs fine. But after I reset the simulation for the first time, the sensor topic stops publishing and my simulation breaks is this because the simulation doeas something to robot model? I have also camera topics and they publish just fine after the reset. Here is the code of implementation inside the robot:

   <gazebo reference="gripper_dummy_prismatic_joint">
    <plugin name="ft_sensor" filename="">

And here it is how I read it:

wrench_data = rospy.wait_for_message('/ft_sensor_topic', WrenchStamped, timeout=10)

Here is how the simulation reset is called:

self.reset_proxy = rospy.ServiceProxy(
            '/gazebo/reset_simulation', Empty)

When I try to call the topic manually after the reset I get following line:

rostopic echo /ft_sensor_topic
WARNING: no messages received and simulated time is active.
Is /clock being published?


I've tried to somehow go around the issue, and run subscriber only when the topic has data. That allowed me to keep the simulation running, but there is a side effect: with each episode, it takes longer for the topic to start publishing data, at first it is around a minute, but when I ran the simulation for a few days it ran through ~150 episodes and now it waits more than an hour for the topic. This is quite troublesome, since I'd like to run the sim for about 10000 episodes.


Tried reinstalling gazebo_ros_pkgs but that didn't help


Is it possible to save header values of a topic and when this topic starts again initiate it with them?

edit retag flag offensive close merge delete


This sounds similar to ros-simulation/gazebo_ros_pkgs#596.

gvdhoorn gravatar image gvdhoorn  ( 2018-02-13 04:59:51 -0500 )edit

This seems very similar, and I am wondering if maybe something like sequence header or timestamp could be to blame as it seems that after the reset the sim seems to work again at the time it ended the previous episode. Could/should I set them to 0 right before the reset (or during it)?

Fiddle gravatar image Fiddle  ( 2018-02-13 07:10:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-19 05:31:16 -0500

Fiddle gravatar image

I've found a solution by finding this issue on github - to ignore this bug updateRate of a sensor in urdf must be set to 0.

edit flag offensive delete link more

Question Tools



Asked: 2018-02-13 03:08:27 -0500

Seen: 910 times

Last updated: Feb 19 '18