umigv / goat

Codebase for the GOAT
BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

Test A* Algorithm #470

Open oliversno opened 4 years ago

oliversno commented 4 years ago

Motivation

It will be difficult to isolate the A* Algorithm from other functionality once it is on the robot. We want to test the algorithm with 'fake' occupancy grid and GPS data before we put it on the robot.

Approach

  1. One way to do this is by plotting obstacles and the final path in the same chart. We might want to also consider plotting paths that are explored but not taken. Usually, something like this is done in MatLab or python with matplotlib. This looks like it could be useful https://github.com/lava/matplotlib-cpp maybe explore that?

  2. Another idea might be to get A* working in a simulation of the robot. We've used Gazebo Simulation in the past (see this repo). This might be best depending on if other subteams might need the simulation.

  3. The last approach would be to write unit tests for the code.

    Definition of Done

    This issue will be done when we have some way of visualizing how the A* Algorithm is working on a given costmap. The preferred approach would be either option 1 or 2 along with option 3 also. This issue needs more discussion before we can move forward with it.

oliversno commented 4 years ago

My preferred method of testing C++ is Google's test suite. It seems like it plays nice with ROS https://wiki.ros.org/gtest. Just some food for thought.

Edit: It looks like running http://wiki.ros.org/rostest runs roslaunch with tests.

oliversno commented 4 years ago

We have decided to use gtest.