Code to implement 'guide dog' functionality to Turtle soccer robots.
- Use the makefile
- Move to the correct directory:
cd blind-guide-bot
- Execute the make command:
make tester
- Move to the correct directory:
- Manually compile the binary
- Include blindguide.h in an existing project and compile that
- For standalone testing, use the main function (by simply running the compiled binary)
- When used in another project:
- Add borders:
- Either call
initializeBorders()
which uses the border coordinates as specified in theborderCoordinates
array - Or call
addBorder(bottomX, bottomY, topX, topY, goodSide)
(See blindguide.h for parameter explanation)
- Either call
- Get the resistance coefficient for a given robot position and force vector by calling
getResistance(x, y, phi, forceX, forceY)
- When necessary, call
addBorder(bottomX, bottomY, topX, topY, goodSize)
to add further borders. - When no further use is required, call
cleanup()
to free allocated memory
- Add borders:
getResistance()
returns a double between (and including) 0 and 1.- 0 means that the robot should easily move along with the given force
- 1 means that the robot should fully resist the given force
- All coordinate units are expected to be meters
- All force units are expected to be Newtons
- The
phi
parameter for thegetResistance()
function is currently not used - At this time, border removal is impossible