Ask Your Question
1

Why is SimpleGoalChecker so simple?

asked 2021-03-22 07:18:21 -0500

programmer-man gravatar image

updated 2021-03-22 07:37:36 -0500

Hey guys,

I'm trying to understand the intent behind some of the design choices of nav2_controller::ControllerServer and nav2_controller::SimpleGoalChecker. Specifically, it looks like the goal checker will return true when it is in the vicinity of the target pose. Subsequently, the controller seems to constantly check if we have reached the goal. The result being that we can't give the controller a path that loops over itself, i.e., it will exit and return successful the first time it reaches the goal.

Example, suppose I want to have the robot drive 10 laps around a closed track and so I provide a path that goes around the track 10 times, but when I give the path to the controller it will exit after the first lap, in fact it might immediately exit since our initial pose and goal pose are the same.

Of course we can go with a different goal checker but the interface only provides the query pose, the target pose, and the velocity as input, thus it makes it hard to extend it to track the path until the robot has driven the entire path. Of course we could have it subscribe to the controller's action messages but that seems less than ideal, if this information was important then it should be provide it via a method call. Alternatively we could use the velocity to skip the other poses but that too seems to have limitations.

How was the above scenario intended to be solved? Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-03-22 15:32:12 -0500

You're always welcome to implement your own goal checker plugin, this is why this is a plugin and not tied to a specific controller plugin implementation (so you can edit this for edge case situations).

You're right that you'd probably run into an issue if you're trying to just do laps. You have two options:

  • A) Submit a PR, which I would merge, to add the path object to the goal checker plugin. Then you could use this information to build a custom goal checker plugin that meets your needs. This is the preferred option. We've already had discussions to enable this in the past, I'm not sure exactly why it hasn't been completed yet. Right now's a great time to do this before the Galactic release as well.

  • B) Create a dummy goal checker plugin in the controller server and instead use a goal checker behavior tree node to check for completion at the navigation server level. This would involve a custom BT and goal checker plugin.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2021-03-22 07:18:21 -0500

Seen: 69 times

Last updated: Mar 22 '21