Skip to content

Conversation

@Messerges2124
Copy link

  • find_nearest_point: This tests if the function can find the nearest point on the path to the robot given a position.

  • find_goal_point: This tests if the function can find the goal point on the path given a position and the nearest point index.

  • update: This tests if the controller can be updated given a position, a path, and a lookahead distance.

  • distance_calculator: This tests if the distance calculator can calculate the distance between two points correctly.

  • error_calculator: This tests if the error calculator can calculate the error between two points correctly.

  • controller: This tests if the controller can minimize the error correctly.

These tests can be ran with the command rosrun controls test-pure-pursuit.py

I also changed the name of pure pursuit because it was spelled inconsistently.

@tichakornw
Copy link

This is a very good start. Thank, @Messerges2124. We should add more test cases but I think this is ok as a starting point. A general comment in the future: Try to separate your commits to not include too many changes in a single commit. For example, renaming and adding tests should be in different commits. (Renaming goes first so that your test can be with the new file name.) This is so that in the future, if we find a problem with a certain part of the code, we can revert the corresponding commit.

@nihaal1 Can you check whether this is good to go?

@CarterDiOrio
Copy link
Contributor

CarterDiOrio commented May 7, 2023

This all looks good, but with one comment. The reason the Controller class has not been implemented, is because the Controller class is an interface just like DistanceCalculator. Essentially, A ROSController (or DTController) class needs to be created that converts the error into left and right wheel speeds and publishes them to the WheelsCmdStamped Topic. This was done to make the pure pursuit class more general and not specific to Duckietown or ROS. The "Controller" is the class that actually issues the wheel speeds pure pursuit commands to hopefully move the robot towards the goal point and in the process "minimizing" the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants