The velocity in the corner is too fast

asked 2020-11-04 00:40:35 -0600

ayato gravatar image


Now I'm trying my robot to run with using base_local_planner.

In the straight passage, my robot runs at the velocity as set max_vel_x.
On the other hand, in the corner that need to go straight and rotate, linear.x of cmd_vel is set as near max_vel_x, angular.z is set any value of less than max_vel_theta.
As the result, as far as I can see the velocity in the corner is too fast.

I considered a way that limit velocity in the process of my app (subscribe cmd_vel and give instructions to the motor) .
But in any case that limit linear velocity or angular velocity, I concern my robot will go in incorrect path and crash to wall.
(I think If limit linear velocity, robot turns too fast, if limit angular velocity, robot turn too slow.)

Do you have any good idea? Or could you tell me your approach?

Thanks in advance.

edit retag flag offensive close merge delete


As long as the velocity limits (linear and angular) are consistent with how fast you would like your robot to be able to go, why do you think it will corner too fast? As these are maximums, the controller can choose a slower linear velocity to make turning a corner more feasible. If you want to limit how fast your robot turns, set a lower angular limit. If your robot moves at reasonable speeds but still runs into walls, then something else in the planning/navigation isn't set right; regardless of available speed, the planner should not choose a path that leads to a crash.

tryan gravatar image tryan  ( 2020-11-04 13:41:33 -0600 )edit

Thank you @tryan.
I set max_vel_x to 0.5 m/s, because I want my robot's left and right tire each motor to rotate as 0.5 m/s. In addition, I set max_vel_theta to 0.5 rad/s, because I want my robot to rotate in place in this velocity. As the result, in spot like T-junction, cmd_vel was set that linear.x was 0.5 and angular.z was 0.5. This is the reason I thought corner too fast.
I'm sorry. I just noticed that I should have adjusted min_in_place_vel_theta for the purpuse of rotation velocity.
Originally I expected that in corner cmd_vel is set that linear.x to 0.3 and angular.z to 0.3 (these value are not correct), and the higher velocity indicated to motor is set to 0.5 m/s and the other to like 0.3 m/s.

ayato gravatar image ayato  ( 2020-11-04 23:52:47 -0600 )edit