Ask Your Question

Using 2dnav with pr2

asked 2012-10-27 20:45:40 -0500

ChengXiang gravatar image

updated 2014-11-22 17:05:03 -0500

ngrennan gravatar image

Hi ppl,

I have been trying to use 2dnav with pr2 robot. The tutorial I followed is this. After I reached instruction 3.1 and started Rviz,I tried to set a goal in rViz for the robot to follow, however, the robot didn't move as expected.

In Rviz, the status of all the displays are "ok". This includes the local plan, global plan and planner plan, however when I set 2D NAV GOAL, the paths are not displayed at all. So does anyone have any idea what could be the issues?

Or does anyone knows which robot works well with 2dnav? So far I tried turtlebot and pr2, both gave me some errors. I am using ubuntu 12.01 with fuerte. Thanks for your help.

1st update

After doing rostopic info move_base_simple/goal, this is what i get,

Type: geometry_msgs/PoseStamped

 * /rviz_ubuntu_29082_5799833781995074337 (http://ubuntu:37754/)

 * /move_base_node (http://ubuntu:46201/)
edit retag flag offensive close merge delete


2dnav is expected to work for both, the turtlebot and the pr2. Did you change the 2d pose topic to the correct value in rviz before sending the goal?

Lorenz gravatar image Lorenz  ( 2012-10-27 21:57:28 -0500 )edit

Hi Lorenz.By 2d pose , do you mean 2d pose estimate? That is set to " initialpose" .

ChengXiang gravatar image ChengXiang  ( 2012-10-27 23:41:30 -0500 )edit

No. I mean the goal. It should default to goal and you'll have to change it to the correct value. Have a look here.

Lorenz gravatar image Lorenz  ( 2012-10-30 23:53:53 -0500 )edit

I have already set the 2dnav goal to move_base_simple/goal. But it did not work. One other thing is when I tried to set its initialpose using 2d pose estimate, the many tiny red arrows did not appears. Could that be the issue?

ChengXiang gravatar image ChengXiang  ( 2012-10-31 04:35:39 -0500 )edit

Try rostopic info move_base_simple/goal. Please edit your question and show us the output of that command.

Lorenz gravatar image Lorenz  ( 2012-10-31 04:45:11 -0500 )edit

In addition, when I tried navigation stack demo in this , the 2dnav works, although it give the same error described here

ChengXiang gravatar image ChengXiang  ( 2012-10-31 04:46:28 -0500 )edit

Updated. Please take a look at the question.

ChengXiang gravatar image ChengXiang  ( 2012-10-31 05:21:42 -0500 )edit

Ok. Rostopic info looks good. Does rxconsole maybe show any warning/error messages when you send the nav goal?

Lorenz gravatar image Lorenz  ( 2012-10-31 05:29:18 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-11-22 22:37:29 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

HI Chengxiang,

have you check the feekback from rviz(from the terminal which you run rosrun rviz rviz ), if a 2D NAV GOAL was set up properly, the feedback will look like: if you got this feedback, but you robot still did not move, then you can try to use teleop_keyboard.launch to test whether the robot move or not.

if I remembered well, the command for launch teleop pr2 is: roslaunch pr2_teleop teleop_keyboard.launch

In summary, there are various reasons can result in your robot fail to move, you should do a proper test, then modify your question with more details. also before you do any test, after you launched the simulation , you can use this command to view whether your robot received any commands telling it move rostopic echo -c /base_controller/command

hope this can give you some helps.


edit flag offensive delete link more


Hi Tao, thanks I will try it out.

ChengXiang gravatar image ChengXiang  ( 2012-11-30 15:17:38 -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: 2012-10-27 20:45:40 -0500

Seen: 384 times

Last updated: Nov 22 '12