Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to fasten up gazbeo simulation

Hey Gazebo guys,

I have an issue with my simultation time when trying to apply RL on my robot. The problem here is, that the robot starts learning "good" behaviour after about 6000 episodes. That takes about 24 hours with a real time factor of 8.

I measured times for running the code (with use_sim_time = true) and found out, that the time to get the scan data is crucial. It´s right exactly about 0,2s (in real time) which exactly fits the settings in the .xacro file (update rate of the scan is 1/5 = 0,2).

I am now thinking about changing the parameters in the .xacro file. There I can change the update rates of the robot for the following parts:

<gazebo>
    <plugin name="turtlebot3_burger_controller" filename="libgazebo_ros_diff_drive.so">
      <updateRate>30</updateRate>
    </plugin>
</gazebo>

<gazebo>
    <plugin name="imu_plugin" filename="libgazebo_ros_imu.so">
      <updateRate>200</updateRate>
    </plugin>
  </gazebo>

<gazebo reference="base_scan">
    <sensor type="ray" name="lds_lfcd_sensor">
      <update_rate>5</update_rate>
    </sensor>
  </gazebo>

My idea is now, to still have a kind of realistic simulation with the real parameters, to change those update rate parameters i.e. by the factor of 4. Then I might be able to also increase the max step size in the simulation by the factor of 4 because now the code is running much faster (factor 0,25). Still, I am concerend about having a much less realistic simulation. Do you guys think that this is a good approach?

Best regards and thanks in advance!

How to fasten up gazbeo simulation

Hey Gazebo guys,

I have an issue with my simultation time when trying to apply RL on my robot. The problem here is, that the robot starts learning "good" behaviour after about 6000 episodes. That takes about 24 hours with a real time factor of 8.

I measured times for running the code (with use_sim_time = true) and found out, that the time to get the scan data is crucial. It´s right exactly about 0,2s (in real time) which exactly fits the settings in the .xacro file (update rate of the scan is 1/5 = 0,2).

I am now thinking about changing the parameters in the .xacro file. There I can change the update rates of the robot for the following parts:

<gazebo>
    <plugin name="turtlebot3_burger_controller" filename="libgazebo_ros_diff_drive.so">
      <updateRate>30</updateRate>
    </plugin>
</gazebo>

<gazebo>
    <plugin name="imu_plugin" filename="libgazebo_ros_imu.so">
      <updateRate>200</updateRate>
    </plugin>
  </gazebo>

<gazebo reference="base_scan">
    <sensor type="ray" name="lds_lfcd_sensor">
      <update_rate>5</update_rate>
    </sensor>
  </gazebo>

My idea is now, to still have a kind of realistic simulation with the real parameters, to change those update rate parameters i.e. by the factor of 4. Then I might be able to also increase the max step size in the simulation by the factor of 4 because now the code is running much faster (factor 0,25). Still, I am concerend about having a much less realistic simulation. Do you guys think that this is a good approach?

Or are the other opportunities to have a faster simulation?

Best regards and thanks in advance!

How to fasten up gazbeo simulation

Hey Gazebo guys,

I have an issue with my simultation time when trying to apply RL on my robot. The problem here is, that the robot starts learning "good" behaviour after about 6000 episodes. That takes about 24 hours with a real time factor of 8.

I measured times for running the code (with use_sim_time = true) and found out, that the time to get the scan data is crucial. It´s right exactly about 0,2s (in real time) which exactly fits the settings in the .xacro file (update rate of the scan is 1/5 = 0,2).

I am now thinking about changing the parameters in the .xacro file. There I can change the update rates of the robot for the following parts:

<gazebo>
    <plugin name="turtlebot3_burger_controller" filename="libgazebo_ros_diff_drive.so">
      <updateRate>30</updateRate>
    </plugin>
</gazebo>

<gazebo>
    <plugin name="imu_plugin" filename="libgazebo_ros_imu.so">
      <updateRate>200</updateRate>
    </plugin>
  </gazebo>

<gazebo reference="base_scan">
    <sensor type="ray" name="lds_lfcd_sensor">
      <update_rate>5</update_rate>
    </sensor>
  </gazebo>

My idea is now, to still have a kind of realistic simulation with the real parameters, to change those update rate parameters i.e. by the factor of 4. Then I might be able to also increase the max step size in the simulation by the factor of 4 because now the code is running much faster (factor 0,25). Still, I am concerend about having a much less realistic simulation. Do you guys think that this is a good approach?

Or are the there other opportunities to have a faster simulation?

Best regards and thanks in advance!