Skip to content

User's Guide

Yavuz Uslubas edited this page Sep 24, 2017 · 25 revisions

Getting Started with WilsonROS

Installing ROS kinetic

ROS kinetic can be installed as described here.

A VM with an ubuntu with pre-installed ROS can be found here: PC-Setup ROS-Kinetic

Requirements for WilsonROS

WilsonROS requires some packages which can be installed e.g. on ubuntu using this command:

sudo apt-get -y install ros-kinetic-openslam-gmapping ros-kinetic-smach-viewer

Initialization and compiling WilsonROS

Create a directory and initialize a workspace for WilsonROS

mkdir -p wilsonros/src
cd wilsonros/src
catkin_init_workspace

Clone the repository into the src folder

git clone https://github.com/WilsonROS/wilson_ros

Go to the wilsonros folder and compile the project.

cd ..
catkin_make

It may appear that catkin_make fails at first, repeating this command can solve the issue.

Preparing the environment

The environment variables for WilsonROS can be set persistently using this commands, assuming that the workspace folder was created in the home directory:

cat - >> ~/.bashrc <<EOF
export ROS_MASTER_URI=http://10.42.0.1:11311/
cd ~/wilsonros/
source ./devel/setup.bash
EOF

source ~/.bashrc

Starting Nodes

TODO

Simulator

TODO

Turtlebot 2

TODO

Start Each Node Separately

TODO

Shutdown the Robot Gracefully

TODO

Moving the Robot

The robot is moving in most cases autonomously. Only in the mapping process the robot needs to be guided. A controller is added to the project ('src/controller/') to move the robot. To control the robot run the following command locally inside the workspace:

rosrun wilson_ros controller

It connects to the rosmaster and starts a controller. Now the user can use the keys:

  • 'w' or 'W' or 'KEY_UP' - to move straight ahead
  • 's' or 'S' or 'KEY_DOWN' - to move backwards
  • 'a' or 'A' or 'KEY_LEFT' - to move to left
  • 'd' or 'D' or 'KEY_RIGHT' - to move to right.

To end moving the robot just abort the controller with CTRL-C on the terminal where you started it.

Using rviz

TODO

Starting rviz

TODO

Mapping Visualization

Mapping Visualization To get this visualization in rviz during the mapping-part run the following command locally inside the workspace:

roslaunch wilson_ros visualization_mapping.launch

Coverage Visualization

Coverage Visualization To get this visualization in rviz during the coverage&navigation-part run the following command locally inside the workspace:

roslaunch wilson_ros visualization_coverage.launch

Navigation Visualization

Navigation Visualization To get this visualization in rviz during the coverage&navigation-part run the following command locally inside the workspace:

roslaunch wilson_ros visualization_navigation.launch

Floor Mapping

To create a map run the following command via ssh on the robot:

roslaunch wilson_ros mapping.launch

The laser sensor is now scanning the environment. The robot also begins to build a map from the receiving scans. In the next step you can move the robot (for more information how to move the robot see above). Do not move the robot too hastily. This can cause some problems during the mapping and at the end the map can contain some fuzzy sections which means that coverage cannot be carried out effectively. Since the robot has cropped laser beams, it is recommended to visit every location on the floor. The map will be even better if visited every possible location and return back to the initial position.

Using the visualization on rviz you can follow the mapping process on your laptop locally.

Mapping Example Visualization 1

Mapping Example Visualization 2

  • Hint: Do not forget that the laser is mounted at a certain height. It is possible that some low obstacles cannot be identified. So move the robot carefully and always try to keep eye contact with the robot.

TODO Where is the map saved?

Floor Navigation

To start the coverage&navigation process you need 3 ssh connections to the robot. In the first connection run the following command:

roslaunch wilson_ros coverage.launch

In the second connection run the following command:

roslaunch wilson_ros boot_minimal.launch

In the third connection run the following command:

roslaunch wilson_ros navigation_minimal.launch

If you want to visualize the coverage / navigation data you may use rviz as described above.

Fixing the initial position of the robot

The initial position is used and published by AMCL. It can be configured by editing the launch/amcl.launch file. But first one needs to know the new position. This can be achieved as follows

  1. Booting up the robot (as explained above) ![commandline](User's-Guide/rviz_from commandline.png)
  2. Starting RViz from the command line with rviz (with a configured command line, as explained above) Adding topics
  3. Adding relevant topics to the visualization: /map, /amcl_pose Select pose
  4. Selecting "2D pose estimate" ant place it at the new position approximately. The AMCL position should move to the point previously selected Pose on command line
  5. The command line shows the newly selected pose Update launch file
  6. The launch file needs to be edited to match the position from the command line

Clone this wiki locally