ROS navigation

From youBot wiki
Jump to: navigation, search

This software includes a ROS navigation stack adapted for the KUKA youBot. It provides local navigation and obstacle avoidance functionalities based on the laser scanner readings. Here you find step-by-step instructions on how to get this ROS stack running on the youBot.

Installation

This install guide assumes that ROS Wrapper for KUKA youBot API is already installed. If not follow this link for the installation instructions.

Hydro

To install navigation packages, go to your src folder in catkin workspace and enter in a command shell

git clone http://github.com/youbot/youbot_navigation -b hydro-devel
cd .. 
catkin_make


Usage in simulation

Hydro

In order to launch simulated you have to type into terminal

roslaunch youbot_gazebo_robot youbot_base_only.launch
roslaunch youbot_navigation_local move_base_local.launch

Older version

The navigation stack can be either used in simulation or on a real platform. First it is shown how to navigate in simulation. In the first terminal window start roscore:

$ roscore

Start the youbot simulation in two more terminals:

$ roslaunch youbot_description youbot_publisher.launch

Finally in the last terminal window start the local navigation:

$ roslaunch youbot_navigation_local move_base_local.launch

Usage for real robot

Hydro

To start local navigation run:

roslaunch youbot_navigation_common bringup_navigation.launch

Caution: this launch file needs a map.yaml with your global map in home directory.

Older versions

In case of navigation with a real KUKA youBot you need to use youbot_oodl and Hokuy laser scaner nodes. First start roscore:

$ roscore

In a new terminal window start youbot_oodl_driver:

$ roslaunch youbot_oodl youbot_oodl_driver.launch

in the next window start youbot_joint_state_publisher:

$ roslaunch youbot_oodl youbot_joint_state_publisher.launch

after that, start hokuyo driver:

$ roslaunch youbot_navigation_common base_front_hokuyo_node.launch

and finally start local navigation:

$ roslaunch youbot_navigation_local move_base_local.launch

Monitoring with rviz

Rviz is a visualization tool that can be used for different purposes. In our case we use rviz to visualize an obstacle map, the planned path, the goal location and orientation of the youBot etc. A complete tutorial can be found here. From the terminal window start rviz:

$ rosrun rviz rviz

In the rviz GUI select File/Load profile. Select the already prepared navigation profile “local_navigation_rviz.vcg”, which is located in your installation of youbot navigation stack: youbot-ros-pkg/youbot_navigation/youbot_navigation_local/config/local_navigation_rviz.vcg. You should get a result similar to the one on the screen-shot below.

File:RvizNav.jpg

Use the 2D Nav Goal button to specify the desired location and orientation for the youBot. The robot should move towards the goal positions you specified. Be careful when setting target positions!


Go back to Software