0
$\begingroup$

Rosanswers logo

I would like to use teb local planner separately from the general navigation stack with my own navigation algorithms. I can initialize the teb planner, set a costmap, a global plan and compute the velocity commands. The teb planner calculates the local path that is seen via Rviz and the path is valid and feasible.

However, I am interested not in getting the velocity commands but only in the local plan (that is published to the topics /local_plan (nav_msgs/Path) or /teb_poses (geometry_msgs/PoseArray). I would like to get the plan not by subscribing to these topics but through code. Is there a way to do this?

I am using ROS Kinetic with Ubuntu 16.04.

Update: To be more clear, I want to get the local path calculated by teb. The local plan is published to the topic /local_plan (nav_msgs/Path). So basically I can write a subscriber to this topic. I am asking whether there is another way to get this path. Like there is a way to get the calculated command velocities through the function bool TebLocalPlannerROS::computeVelocityCommands(geometry_msgs::Twist& cmd_vel).


Originally posted by inaba on ROS Answers with karma: 3 on 2019-03-11

Post score: 0


Original comments

Comment by mgruhler on 2019-03-12:
This sounds like a strange use case. To avoid an xy-problem, could you please update your question by editing it and explain what your actually trying to achieve with this?

Comment by inaba on 2019-03-12:
@mgruhler I added an update. Hope now it is more clear.

Comment by mgruhler on 2019-03-12:
@inaba, thanks, but I still don't understand your usecase. Are you using move_base with teb_local_planner as the local planner therein? Or are you using this in your own node? How do you get to call the computeVelocityCommands function? So basically: how to you plan to tap into the API of teb_local_planner?

Comment by inaba on 2019-03-12:
@mgruhler I am not using move_base and other navigation stack. I have my own nodes for global planner, move base and so on. I created an instance of TebLocalPlannerROS in my separate node (that is basically operates like a local planner), and can call the class functions like setPlan and computeVelocityCommands from this node. The teb computes the path and publishes it to the topic for visualization purposes only as it is written in the teb tutorial. Everything works just perfect. But the problem that I am not interested in the velocity commands, I am interested in the local path. In order to get it I have to subscribe to this topic that I am trying to avoid.

Comment by mgruhler on 2019-03-12:
@inaba great. This is what was missing for me to understand your ultimate goal :-)

Comment by vishal@leotechsa on 2019-10-15:
hi @mgruhler, can you please guide me for writing the separate node (that basically operates like a local planner), I have written my own global planer node, for obstacle avoidance we need to use the teb local planner. So please can you guide me?

Comment by NMICHAELB on 2021-06-01:
@inaba I would also like to use the teb local planner without the general navigation stack(I already created the global planner and the local map). Could you create a repo uploading your solution? Or explain how best to proceed? I'm still relatively new to Ros, so it would be a good support for me to see how others have approached the problem.

Comment by Jude Nwadiuto on 2021-07-13:
@inaba I see that you have solved this problem. I would also like to do the same. Use the teb local planner without the navigation stack since I already have my own global planner. Please could you tell me how to go about this, a github repo would be awesome. Thanks in advance!

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Looking at the interfaces, there is no such function directly available within the teb_local_planner_ros.h. You might consider contacting the maintainer @croesmann either here on the the GitHub repo.

So you might have to implement an interface yourself...


Originally posted by mgruhler with karma: 12390 on 2019-03-12

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by inaba on 2019-03-12:
Thank you!

Comment by croesmann on 2019-03-12:
Indeed, even though it would be straightforward to add an accessor method to the teb_local_planner_ros.h interface, I think you are better with simply creating your own interface to omit all navigation stack stuff (like costmaps, ...).. TebLocalPlannerROS just wrapps some simple calls to the PlannerInteface (either TebLocalPlanner or HomotopyClassPlanner, depending on what you want).You can also ahve a look at the source file test_optim_node.cpp for some ideas. Btw. I'll be right back soon to support the planner ;-)

Comment by mgruhler on 2019-03-12:
THUMBS UP @croesmann. Appreciate it. Really great project you have there!

Comment by inaba on 2019-03-14:
@croesmann Thank you! I did this - wrote my own wrapper with an additional function to get the teb optimal path - and it works))

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.