Ask Your Question

How to set via-points through code?

asked 2018-01-29 09:51:12 -0500

reben gravatar image

The TEB local planner has a tutorial ( ) on setting via-points in Rviz, but it does not explain how to set them in code. Anyone know how I can do this?

edit retag flag offensive close merge delete


Probably I forgot to add this to the public API. I can address this enhancement in approx. 2 weeks. Otherwise, feel free to try it by yourself (any pull-request is welcome)

croesmann gravatar image croesmann  ( 2018-02-03 05:21:56 -0500 )edit

I added a subscriber that takes points and pushes them to the viapoint container. Now the path is attracted to viapoints, but the vehicle is stopping at the viapoints instead of continuing to the global navigation goal. Is there a way I can prevent the vehicle from slowing to a stop at viapoints?

reben gravatar image reben  ( 2018-02-10 20:47:05 -0500 )edit

could it be possible, that your weight_viapoint is too high?

croesmann gravatar image croesmann  ( 2018-06-08 01:54:24 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2018-06-08 10:03:16 -0500

croesmann gravatar image


the most recent version (starting from kinetic) accepts now via-points as nav_msgs::Path message via a newly added topic ~/via_points.

Refer the related pull request



edit flag offensive delete link more

answered 2018-01-29 15:36:44 -0500

Hi there,

Yes, when you use RVIZ to publish a point it publishes a geometry_msgs/PointStamped message on the topic /clicked_point.

If you make a publisher to this topic in your node you can send the same messages that RVIZ does.

Hope this helps.

edit flag offensive delete link more


This will, however, only allow one set point at a time. Anytime you publish a new point the old one will no longer be a set point.

jayess gravatar image jayess  ( 2018-01-29 15:44:08 -0500 )edit

I can probably make it work with one point, but I'd like to know if there is a way to add more than one via_point at a time.

reben gravatar image reben  ( 2018-01-29 16:10:48 -0500 )edit

This does not work unless I'm running the teb_local_planner's tutorial script (test_optim_node.cpp). Is there a different way I can add via points?

reben gravatar image reben  ( 2018-02-02 21:29:57 -0500 )edit

Your Answer

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

Add Answer

Question Tools



Asked: 2018-01-29 09:51:12 -0500

Seen: 875 times

Last updated: Jun 08 '18