Pathfinding robot

Hello,
I am currently working on the following university project:
A 2W-robot car (Arduino UNO) which takes the shortest path on a map with some obstacles.
2 pathfinding approaches (A* & Dijkstra) shall be compared.

I have two approaches to solve the problem which I want to discuss with you.

Input: - Map (for example 5x5 or 10x10) with a real size of 1 sqare meter with some obstacles.

  • Start point & Goal
  • Path finding approach
  1. Approach:
    I transfer the input to the Arduino robot via USB or Bluetooth and let the robot fulfill his task.
    Due to small memory capability of the Arduino UNO this approach is not preferred.

  2. Approach:
    I solve the problem on my computer and transfer the path-matrix to the Arduino robot which has to drive according to the path-matrix. I have already an MATLAB-code (best programming language I can handle) which solves the needed matrix.

What do you think about these approaches and which would you prefer?
Have you any other ideas I have to consider?
I am new in Arduino, so what is the best way to learn the commands to control a robot vehicle?

Thank you!

Matrix processing can be a lot of work for a 16MHz Arduino. I think your first approach is better.

As for memory, why send it all commands at once? Why not send them when you need the Arduino to do something different? Also, do you really think the map is so complicated that the Arduino will run out of memory? It's possible, but it depends.

Power_Broker:
Matrix processing can be a lot of work for a 16MHz Arduino. I think your first approach is better.

As for memory, why send it all commands at once? Why not send them when you need the Arduino to do something different? Also, do you really think the map is so complicated that the Arduino will run out of memory? It's possible, but it depends.

Thank you for response.
Your idea requires a continuous connection between the arduino and my computer. How would you implement such a connection?
And do you know how I derive the command (e.g. forward or turn) from an matrix field (e.g. from [2,3] to [3,3])?

kais92:
Thank you for response.
Your idea requires a continuous connection between the arduino and my computer. How would you implement such a connection?

Constant connection can be done with WiFi.

For your processing, you may want to have a look at the NodeMCU/Wemos boards and the ESP8266 modules they are based on. 80 MHz, standard 512 MB flash on board and built-in WiFi (it can even be a simple WiFi server). This may even be powerful enough to handle the matrix processing on board.

And do you know how I derive the command (e.g. forward or turn) from an matrix field (e.g. from [2,3] to [3,3])?

Know where you are, know where you're facing, know where you want to go, and send commands to your drive system accordingly...

This is highly dependent on how you plan to have the robot navigate. What location sensors, how to power the wheels, how to steer it.

wvmarle:
Constant connection can be done with WiFi.

For your processing, you may want to have a look at the NodeMCU/Wemos boards and the ESP8266 modules they are based on. 80 MHz, standard 512 MB flash on board and built-in WiFi (it can even be a simple WiFi server). This may even be powerful enough to handle the matrix processing on board.

Know where you are, know where you're facing, know where you want to go, and send commands to your drive system accordingly...

This is highly dependent on how you plan to have the robot navigate. What location sensors, how to power the wheels, how to steer it.

Thank you for response.

  1. Is it possible to do the connection with bluetooth? I have already ordered an bluetooth-module HC-06.

  2. Is a location sensor really needed? I thought the robot goes forward (10cm) if the column increases and right if the row increases (example)? What do you think about this approach?

kais92:
Thank you for response.

  1. Is it possible to do the connection with bluetooth? I have already ordered an bluetooth-module HC-06.

Not tried myself, but I'd expect no problem. I'm using lots of Arduino sensors and Arduino libraries on my ESP8266 boards, and they run just fine.
There are some differences, though, with the Arduino programming - mostly the yield() command which you have to sprinkle through your code to keep the background processes running. Do read up on these things if you want to make the switch, it'll save you lots of headscratching over random crashes.

  1. Is a location sensor really needed? I thought the robot goes forward (10cm) if the column increases and right if the row increases (example)? What do you think about this approach?

I'd say it depends on the accuracy of your locomotion system. If you're perfectly accurate in amount of lateral and rotational movement, or at least accurate enough for the number of movements you intend to make, then there would be no need of course. Some trial and error will be involved here.
You may want to look into markers in the underlying grid, e.g. magnetic or optical markers, that the robot can use to know if moved into another square, and of course obstacle detection.

wvmarle:
Not tried myself, but I'd expect no problem. I'm using lots of Arduino sensors and Arduino libraries on my ESP8266 boards, and they run just fine.
There are some differences, though, with the Arduino programming - mostly the yield() command which you have to sprinkle through your code to keep the background processes running. Do read up on these things if you want to make the switch, it'll save you lots of headscratching over random crashes.

I'd say it depends on the accuracy of your locomotion system. If you're perfectly accurate in amount of lateral and rotational movement, or at least accurate enough for the number of movements you intend to make, then there would be no need of course. Some trial and error will be involved here.
You may want to look into markers in the underlying grid, e.g. magnetic or optical markers, that the robot can use to know if moved into another square, and of course obstacle detection.

Thanks!
Is there any literature or website you can refer to. I would like to learn all the needed commands?
I just found some examples.