Advanced pathfinding with robot in 3D
#1 Members - Reputation: 128
Posted 07 September 2012 - 10:37 AM
My project:
I have a 2000 pounds real life robot with two arms. The arms are controlled by 15 motors and gets position feedback from 15 potentiometers. The robot is placed in a room with stationary objects which positions are known. The motors are only able to move with full speed.
Task:
Get the two arms of the robot from their current point to a selected point.
My current solution:
Currently the robot is moving by a big handmade table, but the problem is that if an object is moved the robot is going to collide. And it is almost impossible to imagine all possible situations.
Environment:
I have created a 3D simulation for the robot which I am planning to use when training the robot. The 3D simulation can detect collision with objects and between the two arms.
My question:
First I looked at some path finding algorithms like A* but with 15 motor in a 3D environment it is not very useful. Then I begin to look at neural network and Q-learning but I am not sure it is the right way to go. I think I need some kind of reinforcement learning.
My input and output could be something like:
Input:
15 x Current motor pos
15 x Goto pos
Obejects in room pos or the 3D simulation
Output:
15 x (maybe 5 states) sub positions for the motors
I am currently trying to figure out which network and learning method to use if I go with neural network and reinforcement learning.
Is it doable?
I hope someone can help me and maybe also point to an example.
Thank you in advance.
With best regards,
Peter
#2 Moderators - Reputation: 1862
Posted 07 September 2012 - 11:04 AM
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
#4 Moderators - Reputation: 1862
Posted 07 September 2012 - 01:49 PM
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
#5 Members - Reputation: 128
Posted 07 September 2012 - 02:23 PM
By the way, I found a neural network learning algorithms which I may be able to use. It is called Simulated Annealing. As with Genetic algorithms it is able to solve the Traveling Salesman problem. In that problem there are a group of cities and the network decides which is the best route to take. As I understand it Simulated Annealing just do it fast.
http://www.youtube.com/watch?v=kF2heJbvYcU
I am not sure it is the best way to go so I am open for all ideas.
Edited by Fuzsy, 07 September 2012 - 02:41 PM.
#6 Members - Reputation: 1006
Posted 07 September 2012 - 03:34 PM
I don't understand the capabilities of your robot. You mention two arms. How does it move? Wheels? Using the arms as legs? Grasping objects and pulling? What do the 15 motors do? Or are you saying that the robot itself doesn't move, you're just trying to position the arms? A picture might assist.
If you're trying to figure out how to use the motors to achieve a given effect, and you have the ability to sense the results of your movements, you might be able to use neural nets or genetic algorithms to do self-guided learning, e.g. try stuff, watch the effects, repeat.
If you're talking about physical pathfinding from one side of room to another (for example), I believe D* or D* lite are good for unknown dynamic environments.
#7 Crossbones+ - Reputation: 1443
Posted 07 September 2012 - 04:17 PM
#8 Members - Reputation: 128
Posted 07 September 2012 - 05:11 PM
Well, the robot is hanging from the ceiling and moves along a rail. The two arms are operating down on floor level and shall do things like go under a table without touching it.
The question is how to for example move the arms from above the table to under the table without colliding with the table and without the two arms colliding. The arms are never allowed to touch anything in the room. 1 motor is used for moving the robot along the rails and 1 motor is used to turn the main body of the robot. 7 motors in one arm and 6 motors in the other arm.
So I have two problems.
1. Is the pathfinding.
2. How to follow the path with the use of the motors in the arms and the main body.
Thanks again, I will look in to D* and RVO/VO and see if it is an solution I can use.
#9 Crossbones+ - Reputation: 1443
Posted 07 September 2012 - 06:09 PM
Thank you Jefferytitan and slicer4ever,
Well, the robot is hanging from the ceiling and moves along a rail. The two arms are operating down on floor level and shall do things like go under a table without touching it.
The question is how to for example move the arms from above the table to under the table without colliding with the table and without the two arms colliding. The arms are never allowed to touch anything in the room. 1 motor is used for moving the robot along the rails and 1 motor is used to turn the main body of the robot. 7 motors in one arm and 6 motors in the other arm.
So I have two problems.
1. Is the pathfinding.
2. How to follow the path with the use of the motors in the arms and the main body.
Thanks again, I will look in to D* and RVO/VO and see if it is an solution I can use.
So, the arms essentially extend downward, and then can extend in any other direction(if i understand correctly?)
generating a heavily subdivided voxel map might be more useful in this situations, where a voxel is either passable or not passable. if the sensor's can decompose the environment into a 3D Scene, and from their, you generate the voxel world. with the voxel world, you can then do A* combined with clerance based pathfinding
I think the result would be pretty decent for your needs, and precision would be dependent on how large a single voxel is.
I'm doubtful you'd need to go full NN's to solve this.
RVO's/VO's are probably not as useful in this situation, i'd recommend a look over, but i had thought the entire robot was tasked with reaching a destination, not just the arms(it can still be used, but it'd be much more difficult imo.)
Edited by slicer4ever, 07 September 2012 - 06:11 PM.
#10 Members - Reputation: 128
Posted 07 September 2012 - 06:40 PM
The problem is the number of axles when it comes to controlling the motors.
I have created 4 screenshot from the simulation so you are able to see have the robot works.
I am very grateful for your suggestions.
Edit:
Sorry, I was asked to remove the pictures from the forum by my boss.
Edited by Fuzsy, 11 September 2012 - 08:55 AM.
#11 Members - Reputation: 1006
Posted 08 September 2012 - 11:52 PM
#12 Members - Reputation: 128
Posted 09 September 2012 - 05:55 PM
I agree with your point about limited obstacles and I think I understand your point.
The way the system currently works is by a big handmade table with current position as input. The feedback from the table is something like your description:
1. Move "arm 1" to 75 cm in Z
2. Move body to 600 cm
3. If "arms are free" "turn body toward goal" else if "possible move arm 2 up".
4. etc.
I use the hit boxes show in the image to determine if a movement is possible or will result in collision.
The problem with that solution is that it is not very dynamic. The "stand" can be moved and the table can be moved by the user.
I have also made a system where smaller easy recognizable sub states are recognized:
1. If "Big movement" Move to body to 600 cm
2. If "arms need to switch places" do sequence 132
3. If "Goal position along tableside" do sequence 97
4. etc.
It made the task a little easier but still with the same problem, it is not dynamic. In a new situation where the "stand" is put in a new position and the table is turn, I have to make a lot of new add-ons to the table without affecting the already working part of the table.
Was it something like above you had in mind?
Jeffery you are right about the application of the robot.
I am very open to all ideas and I am grateful for all suggestions.
Edit:
Sorry, I was asked to remove the picture from the forum by my boss.
Edited by Fuzsy, 11 September 2012 - 08:55 AM.
#13 Members - Reputation: 1006
Posted 09 September 2012 - 06:54 PM
The advantage would be simplicity and smarts. So if the arm is below the foot of the bed and wants to go to below the head of the bed, it would plot a direct course below the bed, sense a future collision (and abandon that node of the A* search), and then search special actions (move arm up), moving above the table, then special actions (move arm down). You may need to use a time slice based A* to avoid arm collisions with each other.
Edit: The up/across/down approach would of course work for arbitrary obstacles as long as they are simple and sparse. You would need to detect the general table position to start with. If you have depth data you could use a Hough transform or similar to detect a cuboid.
Edited by jefferytitan, 09 September 2012 - 06:56 PM.
#14 Members - Reputation: 128
Posted 10 September 2012 - 12:21 PM
It is a great idea. By using the A* as an action planner instead of has a pathfinder, I may be able to solve the problem. It opens a whole new set of options. I could do things like make some movement cost more than others. And as you suggest, it can use my preprogrammed sequences.
I think you are right (again
It would be a lot cleaner solution than with ANN.
Once again thanks.
#15 Moderators - Reputation: 1862
Posted 10 September 2012 - 05:41 PM
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
#16 Members - Reputation: 128
Posted 11 September 2012 - 06:31 AM
Hmm.. Automated planners is a whole new category of algorithm I didn’t knew about, so I think I need to make some research on the topic before I continue my work on the solution.
Info for other users at Gamedev:
The idea of planners
http://en.wikipedia.org/wiki/Automated_planning
STRIPS
http://en.wikipedia.org/wiki/STRIPS
GOAP ( Simplfied version of STRIPS)
http://web.media.mit.edu/~jorkin/goap.html
Ironic.. here is an game engine named “X-ray” which uses GOAP of NPC’s
http://en.wikipedia.org/wiki/X-Ray_Engine
#17 Members - Reputation: 128
Posted 13 September 2012 - 03:08 PM
Jefferytitan, your idea with A* as a planner worked. The system is now able to calculate a movement path.
But.. yeah.. there is always a but.. It is very slow.. it takes about 15 seconds to calculate. It is the simulation of the movement which determines if a movement will result in a collision which takes time, so I have to look in to some faster collision detection, but that is a whole other problem.
Thanks again.
#18 Members - Reputation: 1006
Posted 13 September 2012 - 03:30 PM
#19 Members - Reputation: 437
Posted 13 September 2012 - 08:56 PM
#20 Members - Reputation: 128
Posted 14 September 2012 - 09:15 AM
To Jeffery: I’ll got some ideas on how to optimize collision detection, but if it don’t works I will probably post it as you suggested.
To Snowman: It looks like a very good and well written book. I think I will gain quite a lot by reading it.






