How to dynamically change the speed of the TurtleBot 3?

asked 2020-07-13 22:00:11 -0500

violator gravatar image

updated 2021-04-24 02:39:11 -0500

I have developed a node called a "speed_control". The main objective of this node is to reduce the speed of the robot when there are obstacles near and increase the speed when there are no obstacles.

Currently, my "speed_control" node subscribes to the /scan topic and reads the laser data and output speed (float value) which I should pass to the robot. I use turtleBot 3 as the robot in the gazebo simulation environment.

What I am trying to achieve is :- the robot should navigate to the navigational goal I set, in the speed published by my "speed_control" node.

I am trying to use the turtleBot navigational stack because it works very fine. And not interested in writing my own controller.

Is this achievable? or should i have to change my approach?

edit retag flag offensive close merge delete

Comments

1

You could try to use dynamic_reconfigure to set max_trans_vel of dwa_local_planner or the corresponding parameter on any other local planner you might use.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2020-07-15 00:59:36 -0500 )edit

@Humpelstilzchen After learning some more basics of ROS, I finally understood your comment. It is easy to implement and it works.

violator gravatar image violator  ( 2021-01-03 03:25:13 -0500 )edit

ok, I'm using ROS for too long now, I thought my comment was easy to understand. Could you rephrase my comment as an easy to understand answer for other people?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2021-01-03 03:28:10 -0500 )edit