ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

is it possible increase the maximum speed of a simulated equivalent of a real life robot in gazebo [closed]

asked 2022-08-23 01:44:32 -0600

distro gravatar image

updated 2022-09-11 12:56:10 -0600

is it possible increase the maximum speed of a simulated equivalent of a real life robot in gazebo?For instance a real life turtlebot3 has a max speed of 0.22m/s. The simulted turtlebot3 is set to have a max speed of 0.22m/s, is there a way to modify some files to increase the speed of the simulated turtlebot3?

Edit:I modified the turtlebot_drive.h script, and the DWA_localplanner yaml file. Not sure which one did it but it worked!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by distro
close date 2023-01-16 12:27:44.509716

1 Answer

Sort by ยป oldest newest most voted

answered 2022-08-23 04:10:16 -0600

ljaniec gravatar image

updated 2022-08-23 04:10:26 -0600

You can try to modify these values in the turtlebot3_simulations header turtlebot3_drive.h:

It is used in the control loop in the source file:

edit flag offensive delete link more


@ljaniec Has you tried it yourself?

distro gravatar image distro  ( 2022-08-23 04:12:31 -0600 )edit

No, because I have a real TB in the lab, so it would be irresponsible - I want to have the same setup IRL and in simulation. If you use the standard simulation in Gazebo with Turtlebot and teleop connected, you can check with the keyboard that you can accelerate from TB to higher speeds. There is no filter/damping on the speed input in the simulated TB robot. This way you can avoid changing the source code.

ljaniec gravatar image ljaniec  ( 2022-08-23 05:58:27 -0600 )edit

@ljaniec do you happen to use turtlebot2's by any chance? I posted another question about that

distro gravatar image distro  ( 2022-08-23 19:07:19 -0600 )edit

Yes, you can link it. I modded it to ROS2 though but maybe I can check it anyway

ljaniec gravatar image ljaniec  ( 2022-08-24 02:17:26 -0600 )edit

@ljaniec This is it here

distro gravatar image distro  ( 2022-08-24 04:31:41 -0600 )edit

@ljaniec I git cloned the turtlebot3_simulations to my workspace and modified turtlebot3_drive.h

#define LINEAR_VELOCITY  0.44 //0.3
#define ANGULAR_VELOCITY 2.2  //1.5

It did not seem to work. When I teleop, the linear velocity still remains at 0.22m/s.

distro gravatar image distro  ( 2022-08-28 01:22:42 -0600 )edit

If you check it with turtlebot3_teleop_key, you can read here: that it has another set of "limits" (e.g. and

You should check now two things: - a modification of the turtlebot3_teleop_key package to your needs with manual tests with teleop_key - a modification of the turtlebot3_simulations package with test with simple TestCmdVelPublisher node (for moving the TB2 in Gazebo)

ljaniec gravatar image ljaniec  ( 2022-08-29 05:53:20 -0600 )edit

@ljaniec sorry I had though I replied to this. I also wish for the max velocity to be higher when I use 2D Nav Goal, so when I'm not manually driving the robot. Do you know what files I might need to change for that?

distro gravatar image distro  ( 2022-08-31 04:24:02 -0600 )edit

Question Tools

1 follower


Asked: 2022-08-23 01:44:32 -0600

Seen: 52 times

Last updated: Sep 11 '22