Society of Robots
     | Robot Forum | Robot Tutorials | Robot FAQ |
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2009, 10:00:05 PM

Login with username, password and session length
Search:     Advanced search
Sept 30th - The 5th SoR Robot contest is now open! Win an Axon II!

Robot Forum
72,667 Posts in 9,267 Topics by 5,292 Members
Latest Member: lepomis
* Home Help Help Login Register
0 Members and 1 Guest are viewing this topic.
Pages: [1] Print
Author Topic: A* with less turns  (Read 2297 times)
benjiTopic starter
Supreme Robot
*****

Helpful? 0
Offline Offline

Posts: 830



View Profile
« on: February 13, 2008, 07:52:19 AM »

hey folks, ive been doing studies latley on the A-star algorithm to find the shortest path
,its very effective though sometimes this shortest path would be full of turns.
this is somthing i want to get rid of,, turns,, cuz it makes the movement a little sick..
how do i do this? well i read somewhere that you should add a direction change cost penalty.
some text book also mentioned that the function would be somthing like this >

ADDED COST = D * NUMBER OF TURNS

where D is the cost of moving from a square to another (the turns are 45 degrees so if you want to turn 90 the num will be 2)

unfortunately in many cases this formula seems to fail (you can try it with some maps n see what i mean)

someone have read about a WORKING solution for path smoothing Huh?? help in need

thanks,,

Ben
Logged

good ol' BeNNy
JesseWelling
Expert Roboticist
Supreme Robot
*****

Helpful? 0
Offline Offline

Posts: 707


Only You Can Build A Robot!


View Profile
« Reply #1 on: February 13, 2008, 09:20:55 PM »

Look for "Field D*" by Dave Ferguson and Anthony Stentz and also "Layered Field D*" by Juan Pablo Gonzalez, Bryan Nagy and Anthony Stentz. I think both of them are CMU papers so start there, or IM me your e-mail and I can send them to you (they are to large to post).

Also consider a object avoidance algorithm (such as nearness diagrams, potential fields, of vector field histograms) layered with a waypoint finding algorithm (such as A* , D* and variants, or wave front propagation).
« Last Edit: February 13, 2008, 09:26:20 PM by JesseWelling » Logged
benjiTopic starter
Supreme Robot
*****

Helpful? 0
Offline Offline

Posts: 830



View Profile
« Reply #2 on: February 14, 2008, 06:38:00 AM »

i downloading the FIELD D* bok, thanks a lot.
anyways ive read somewhere that D* handels dynamic objects, i dont need this cuz my environment is static
, all i need is how to generate a smoother path
(my bot has 45 degrees turns)
Logged

good ol' BeNNy
benjiTopic starter
Supreme Robot
*****

Helpful? 0
Offline Offline

Posts: 830



View Profile
« Reply #3 on: February 15, 2008, 03:40:46 AM »

hey folks, finally its working, its not a multiplier or anything, its a constant number you add to the cost each time a turn is taken
let say the G cost to moving from  one square to another is 10 and the G cost to moving from one square to another diagonally is 14
so if there is a turn also then you add 3 to the G cost ,so if you are turning from north to (north-right) you add a cost of 14 + 3 = 17
and so on,,
this way the algorithm finds the smoothest-shortest path,,great
but i guess in robotics the turn cost should be higher as it consumes more power (maybe) than adding a little more length to the path
, anyways, here is a big book about pathfinding for mobile robots,its FREE to download

http://planning.cs.uiuc.edu/
Logged

good ol' BeNNy
Asellith
Supreme Robot
*****

Helpful? 7
Offline Offline

Posts: 454


"I'm a leaf on the wind. Watch how I soar"


View Profile WWW
« Reply #4 on: February 15, 2008, 06:13:43 AM »

Just a quick thought about A*.

Why couldn't you make the squares smaller and associate the robot with more squares. Say the robot is 5 by 3 'squares'. The idea behind this is to get more resolution in the movements of the robot so it tends to move diagonally instead of in straight lines and turn. It will be harder on computations but I think it can be done by running the algorithm for all 5 width squares and average them together to get the vector the robot should be traveling. With the average you might be able to get a smooth movement for the robot instead of the jerky turns. Obviously it will be another case of computation power vs performance to find the best ratio based on the robot.

As a disclaimer if this is a really stupid idea Smiley I have never programmed my own A* system. I have only read about them and Admin's cool wavefront tutorial Smiley
Logged

Jonathan Bowen
Electrical Engineer
www.lostministries.org
benjiTopic starter
Supreme Robot
*****

Helpful? 0
Offline Offline

Posts: 830



View Profile
« Reply #5 on: February 15, 2008, 08:50:02 AM »

Quote
Why couldn't you make the squares smaller and associate the robot with more squares.

that is exactly what i m doing, not to smooth the path but to make my bot more inteligent, my bot is big
its about 50 cm by 40 cm, so itl be very dumb to treat small obstacles this size

i wasnt sure that this would automatically smooth the path but i thought i should use the smoothing method i suggested to garantee
path smoothing,,
by using the method i suggested you can also define how much does it cost to turn
in case of mine(hexapod) it takes too much power (5 times more) to make a 45 degrees turn,so i would penalize turns like this

turn cost = 5 * movement cost

this way my bot sometimes would choose a little longer paths but with less turns

this means that itl sacrifice walking another 5 steps to not make a turn
Logged

good ol' BeNNy
Admin
Administrator
Supreme Robot
*****

Helpful? 62
Online Online

Posts: 8,610



View Profile WWW
« Reply #6 on: February 17, 2008, 08:19:50 AM »

Quote
Why couldn't you make the squares smaller and associate the robot with more squares. Say the robot is 5 by 3 'squares'.
Another common solution is make the robot a single tiny point, but make all the obstacles stored in the map artificially bigger.
Logged

Pages: [1] Print 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
$50 Robot only turns in circles
Electronics
hazardousracerx 5 421 Last post April 24, 2009, 02:48:58 PM
by hazardousracerx
Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!


Advertise on this Forum