Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

gazebo and timer.py(rate.sleep)

Hi

I'm running yappi to profile the performance of my node written in python.

The node has:

  • 3 timers for controller loops. (2 at 500Hz and 1 at 100Hz)
  • 2 publisher (60Hz for /gazebo/set_model_state and 100Hz)
  • 2 subscriber

When Gazebo is not running, the profiler shows 35.15% time is spent on Rate.sleep()

When Gazebo is running, the profiler shows 46.92% time is spent on Rate.sleep(). In particular, 16.06% is spent on _Condition.wait from threading.py, which doesn't not show up in previous scenario. Nothing change even when I comment out any code related to publishing /gazebo/set_model_state.

I also notice when Gazebo is running, my node that usually takes up ~50% CPU now runs at ~100%. Also the controller loops don't seem to be running on time.

Question is why my node impacted by Gazebo?

gazebo and timer.py(rate.sleep)

Hi

I'm running yappi to profile the performance of my node written in python.

The node has:

  • 3 timers for controller loops. (2 at 500Hz and 1 at 100Hz)
  • 2 publisher (60Hz for /gazebo/set_model_state and 100Hz)
  • 2 subscriber

When Gazebo is not running, the profiler shows 35.15% time is spent on Rate.sleep()

When Gazebo is running, the profiler shows 46.92% time is spent on Rate.sleep(). In particular, 16.06% is spent on _Condition.wait from threading.py, which doesn't not show up in previous scenario. Nothing change even when I comment out any code related to publishing /gazebo/set_model_state.

I also notice when Gazebo is running, my node that usually takes up ~50% CPU now runs at ~100%. Also the controller loops don't seem to be running on time.

Question is why my node impacted by Gazebo?

gazebo and timer.py(rate.sleep)

Hi

I'm running yappi to profile the performance of my node written in python.

The node has:

  • 3 timers for controller loops. (2 at 500Hz and 1 at 100Hz)
  • 2 publisher (60Hz for /gazebo/set_model_state and 100Hz)
  • 2 subscriber

When Gazebo is not running, the profiler shows 35.15% time is spent on Rate.sleep()

When Gazebo is running, the profiler shows 46.92% time is spent on Rate.sleep(). In particular, 16.06% is spent on _Condition.wait from threading.py, which doesn't not show up in previous scenario. Nothing change even when I comment out any code related to publishing /gazebo/set_model_state.

I also notice when Gazebo is running, my node that usually takes up ~50% CPU now runs at ~100%. Also the controller loops don't seem to be running on time.

Question is why my node impacted by Gazebo?Gazebo? I should also mention that because I want to run yappi, I'm not using rosrun to launch the node.