ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

NavigateToPose vs NavigateThroughPose

asked 2022-11-24 11:18:29 -0500

sdu568 gravatar image

According to https://navigation.ros.org/configurat..., The document show that I need to configure two BT for both NavigateToPose and NavigateThroughPose.

My question is, how will the Nav2 package decide which BT tree to use during navigation? Or will it just choose the best BT at that moment?

Also, I am wondering how will I be able to send my goal to Nav2 package?

Thank you very much in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-11-25 07:23:59 -0500

Pepis gravatar image

updated 2022-11-25 07:27:29 -0500

It depends on the action server you call. When you launch nav2 both action servers are offered as /navigate_to_pose and /navigate_through_poses. Names show which BT is used by each.

You can use the simple commander API to easily interface your application with nav2. This API already wraps all the ROS2 code needed to use action servers in simple function calls. You can also write your own commander interface directly calling the action servers I mentioned above.

edit flag offensive delete link more

Comments

Please correct me if I understood wrong.

So basically, in the launch file, we load two BT trees (for both /navigate_to_pose and /navigate_through_poses). And then I will create a node that triggers either one of them.

Thus, does this mean that If I want to have my own BT tree, all I need to do is to reconfigure it in the launch file?

sdu568 gravatar image sdu568  ( 2022-11-25 10:22:26 -0500 )edit

Yes, the easiest thing IMO would be to take one of the BTs and modify it to your needs, then pass its path in the parameters or the launch file

Pepis gravatar image Pepis  ( 2022-11-25 14:29:11 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-11-24 11:18:29 -0500

Seen: 205 times

Last updated: Nov 25 '22