pause service delay in openai-ros

asked 2021-11-01 09:31:33 -0500

Tomcat gravatar image

hi, i am using openai-ros to learn my robot. i have created a new environment according to openai-ros and set the actuator running step to 1 ms. but i figured out that whenever i call the step function in gym library, it takes around 20 ms. in openai-ros there is gazebo connection which has method pausesim. this method call pause gazebo service. i measured the elapased time for gazebo pause command it takes around 15ms. i want to run agent loop in rl about 1Khz but it has delay due to pause service. can anyone help me ? tnx

edit retag flag offensive close merge delete

Comments

Hi guys! I have found solution. In gazebo-connection class, where the pause and unpause service proxy included, we should set service persistence to True. It makes a continuous connection and prevents to open and close ports in every iteration.

Tomcat gravatar image Tomcat  ( 2021-11-09 02:15:27 -0500 )edit

Glad you found an answer. You could add this an answer and accept it by clicking on the check mark.

osilva gravatar image osilva  ( 2021-11-18 13:40:53 -0500 )edit