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

Sending my own path to ROS Navigation stack, Where can I locate the 'internal' nav_msgs/Path in the code?

asked 2021-11-24 04:27:49 -0500

jjbecomespheh gravatar image

image description

Does anyone know where I can find this 'internal' nav_msgs/Path in the code of the ROS Navigation stack? Is it move_base.cpp? navfn_node.cpp? trajectory_planner_ros.cpp?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-11-24 17:05:29 -0500

This is much easier in Nav2's distributed server design https://navigation.ros.org/. You can easily inject your paths rather than using the path planning algorithms if you like.

edit flag offensive delete link more
1

answered 2021-11-24 06:22:38 -0500

miura gravatar image

It's move_base.cpp.

Specifically, it is as follows.

if(!tc_->setPlan(*controller_plan_)){

ref : https://github.com/ros-planning/navig...

controller_plan_'s definition is as follows.

std::vector<geometry_msgs::PoseStamped>* controller_plan_;

ref : https://github.com/ros-planning/navig...

It is different from nav_msg/Path, but if you compare it to the definition of nav_msgs/Path, you will see that it passes the same information.

std_msgs/Header header
geometry_msgs/PoseStamped[] poses

ref : http://docs.ros.org/en/noetic/api/nav...

edit flag offensive delete link more

Comments

1

Great answer @miura.

osilva gravatar image osilva  ( 2021-11-24 06:54:08 -0500 )edit

@osilva Thank you!

miura gravatar image miura  ( 2021-11-24 07:30:52 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-11-24 04:27:49 -0500

Seen: 218 times

Last updated: Nov 24 '21