PR2 navigation - Local cost map not updating [Hydro/Indigo]

42 views
Skip to first unread message

Sven Cremer

unread,
Jun 22, 2016, 1:44:03 PM6/22/16
to PR2_Users

When I try to run the PR2 navigation stack it in Gazebo the local cost map doesn’t update. All the values in /move_base_node/local_costmap/cost_map remain zero. As a result, the PR2 will collide with objects that are not part of the map. There are no warnings or error messages. Also, the global planner seems to work fine.


Here is what I did to test the nav stack:


sudo apt-get install ros-indigo-pr2-navigation*


I created a clean catkin workspace and downloaded the navigation packages from the hydro-devel branch:



These compiled fine. I launched a Gazebo world with the PR2. First I built a map:


roslaunch pr2_2dnav_slam pr2_2dnav.launch
roslaunch pr2_navigation_slam rviz_move_base_slam
.launch
rosrun map_server map_saver
-f map_name


and then tried to navigate the map:


roslaunch pr2_2dnav pr2_2dnav.launch
roslaunch pr2_navigation_global rviz_move_base
.launch
rosrun map_server map_server map_name
.yaml


This works fine but if I add any obstacles the PR2 will simply drive through them, despite being detected by the laser scanner.

Has anyone been able to successfully run the PR2 navigation stack in ROS Hydro or Indigo? Does it work on the real PR2?

Thanks,
Sven

Tomas Diaz

unread,
Jun 23, 2016, 12:40:16 PM6/23/16
to PR2_Users
Hello Sven,

We also encountered some issue with the navigation stack although never encountering the issue you are having with local cost map, so I can't really say much about that.
We did manage to have the navigation stack working in ROS Hydro both in simulation and the real PR2, hopefully some of the things we did might help you.

The PR2 navigation stack as it is didn't work in Hydro (neither gazebo nor real PR2), so we downloaded another version (as suggested by Yuki Furuta in this mail), following the steps:

1. add package information to .rosinstall
   $ cd
/path/to/your/catkin_ws
   $ wstool
set pr2_navigation --git https://github.com/pr2/pr2_navigation -v 0.1.27 -t src
   $ wstool up pr2_navigation
-t src

2. build packages
   $ catkin build pr2_2dnav
# or catkin_make

3. launch again
   $ source devel
/setup.bash
   $ roslaunch pr2_2dnav pr2_2dnav
.launch

By following this steps we solved it in simulation right away but not in the PR2.

For the PR2, the pr2_2dnav launch file was looking for the nodes in the same path as the old packages, so we created symlinks pointing to the correct executables of the nodes we were missing.


The PR2 is correctly avoiding obstacles and updating the local plan.


I hope any of this might help you.


Sincerely,
Tomás
Reply all
Reply to author
Forward
0 new messages