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

Modify "visualization" for autonomous navigation of turtlebot

asked 2012-10-08 06:04:59 -0500

Yuri gravatar image

Hello! i am using ros electric and i would like to use the navigation and visualization toolbox to implement the autonomous navigation for the turtlebot. In particular i want to reach some preset goals without the click of the mouse on the map in rviz. is it possible to modify directly the visualization stack of ROS? which are the files that rviz uses when i click on the "2d nav goal" and "2d pose estimate" buttons?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2012-10-08 19:17:37 -0500

Jakub gravatar image

updated 2012-10-08 19:45:24 -0500

When you click on the buttons 2D Nav Goal and 2D Pose Estimate all the rviz does is the publishing a simple message on the specified topic. By default those topics and messages are:

  • geometry_msgs/PoseStamped on the topic /move_base_simple/goal in case of 2D Nav Goal
  • geometry_msgs/PoseWithCovarianceStamped on the topic initialpose in case of 2D Pose Estimate

You are free to use any other publisher to send messages to those topics and therefore control the navigation stack either from your own program or from the command line using rostopic pub like:

rostopic pub -1 /move_base_simple/goal geometry_msgs/PoseStamped '{pose: {position: {x: 1.0}}}'

You can see which topics are called with specified button press in the Tools Properties panel window, which is usually localted in the upper right corner of the rviz. You can use this panel as well to change the default values for topics to be called.

edit flag offensive delete link more

Comments

Just an additional note: in your own programs, you should not publish just simple pose goals on a single topic because you cannot monitor the execution of navigation action that way. Instead, use actionlib. See http://ros.org/wiki/navigation/Tutorials/SendingSimpleGoals

Lorenz gravatar image Lorenz  ( 2012-10-10 23:04:32 -0500 )edit

thanks!!

Yuri gravatar image Yuri  ( 2012-10-31 00:10:10 -0500 )edit

Question Tools

Stats

Asked: 2012-10-08 06:04:59 -0500

Seen: 408 times

Last updated: Oct 08 '12