ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to turn the robot before moving to goal?

asked 2021-10-11 04:22:51 -0500

zuy gravatar image

updated 2022-05-01 13:09:00 -0500

lucasw gravatar image

Hi, my robot has 4 wheels, 2 of them is driven by a node, which listens to /cmd_vel topic, the base_link frame is set at the center of these 2 wheels. I'm using dwa_local_planner as the local planner and GlobalPlanner as the global planner to move the robot around the map. The problem is, when a goal is given to the move_base server, instead of turning in place, it prefers to take a long curve with both translation and angular velocity. Because of this, it gets stuck in some cases. Is there anyway to turn the robot around before it follows the global path? I drew an example below, I hope it can help. Thank you!image description What I get: image description What I want: image description

edit retag flag offensive close merge delete

Comments

Hi, in general its a diff-drive setup? Please post your dwa configuration file. dwa planner can be difficult to configure.

Dragonslayer gravatar image Dragonslayer  ( 2021-10-11 05:09:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-10-11 05:15:11 -0500

Bernat Gaston gravatar image

updated 2021-10-11 05:16:14 -0500

Hi,

This behavior is expected since ROS has no way of knowing if your robot is holonomic (all the degrees of movement are controllable) or non-holonomic http://www.robotplatform.com/knowledg.... The robot you described seems a non-holonomic robot to me (more like a car) but the explanation of your problem seems to go in the holonomic direction, so probably your wheels are differential. I will assume you have a holonomic robot (so it can turn over itself) and you want to avoid the behavior for non-holonomic robots.

As far as I know, dwa_local_planner is designed for non-holonomic robots, so I would recommend you to use teb_local_planner http://wiki.ros.org/teb_local_planner or eband local planner. A similar question is solved here https://answers.ros.org/question/2352...

edit flag offensive delete link more

Comments

Thank you for answering! But I'm a little bit confused. As the link you dropped in your answer, I have a non-holonomic robot, which can only go straight ahead or turn (x axis in linear velocity and z axis in angular velocity). So should I continue using dwa_local_planner or should I switch to orthers?

zuy gravatar image zuy  ( 2021-10-11 05:29:26 -0500 )edit

But you said you want to turn over yourself? That's not possible with a non-holonomic robot, is it? A car can not turn over itself. I think dwa allows you to configure velocities which should be helping you to adjust the curve that it does, but it will also do somehow a curve. Without knowing the design of your robot it is difficult to understand, but I will give teb_local_planner a try. It can definitely plan trajectories turning over itself.

Bernat Gaston gravatar image Bernat Gaston  ( 2021-10-11 05:47:17 -0500 )edit

Oh, I'm sorry! Because of the 2 differential wheel at the back, it can turn over by giving these 2 wheel the same velocity but in the opposite directions. My robot looks like a car but move exactly like a turtlebot.

zuy gravatar image zuy  ( 2021-10-11 05:59:12 -0500 )edit

AFAIK dwa should work with holonomic robots, though diff-drive isnt really holonomic. teb is actually best for akerman steering robots (car like). The issue is that the cost for straying away from the path is likely to low, the prediction into the future to low and maybe there are minimums that hinder the robot from turning at a standstill (angular only). The configuration file is where its at, in my opinion. Minimums in angular-z and linear-x would be my first points of interest.

Dragonslayer gravatar image Dragonslayer  ( 2021-10-11 07:14:05 -0500 )edit

I have a diff robot, we are working with teb and it works perfectly. I know in the past they tryied dwa and where having the problem described above. Maybe they were unable to properly configure it, but teb really works fine with diff robots.

Bernat Gaston gravatar image Bernat Gaston  ( 2021-10-11 07:40:35 -0500 )edit

Thank you both of you! I will try teb and see if it can help.

zuy gravatar image zuy  ( 2021-10-11 17:06:43 -0500 )edit

I've tried teb and have some problems described here: https://answers.ros.org/question/3884... Would you mind take a look and give me some advice? Thank you!

zuy gravatar image zuy  ( 2021-10-12 06:02:22 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-10-11 04:22:51 -0500

Seen: 177 times

Last updated: Oct 11 '21