(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Pioneer 3D-X controlled via a visual servoing law

Description: In this tutorial we will how to control a real or a simulated (in V-REP) Pioneer robot using a visual servoing control law.

Keywords: ViSP,V-REP,Pioneer

Tutorial Level: INTERMEDIATE

Introduction

  • Pioneer on V-REP

In this tutorial we will use:

  • Scene :

    • The mobile robot Pioneer 3D-X (real or simulated) equipped with a camera.
    • A target with a qr-code.
  • Software :

    • visp_auto_tracker: it is a model-based trackers provided by ViSP visual servoing library into a ROS package. The tracked object should have a QRcode of Flash code pattern. Based on the pattern, the object is automaticaly detected. This computer vision algorithm computes the pose (i.e. position and orientation) of an object in an image. It is fast enough to allow object online tracking using a camera.

    • demo_pioneer : this package receive the position of the object from the the node visp_auto_tracker and compute the new velocity to apply to the robot.

    • vrep_ros_bridge (for simulation) : this bridge allows us to control the V-REP simulation via ROS.

    • V-REP (for simulation): 3D Simulator.

Aim of the tutorial is to control a Pioneer 3D-X using a visual servoing control law. The node visp_auto_tracker will receive the images from the camera mounted on the robot (real or simulated) and will compute the position of the target with respect to the frame camera. The position of the target is sent to the node demo_pioneer that compute using a servoing control law the new velocity to apply to the robot in order to minimized the error between the actual position and the desired position of the target. In this demo the desired position is such that the pioneer will stay at 0.4 meters from the target.

Experiment in Simulation (V-REP)

  • alt text

Instructions

  • Follow the next paragraph for the installation
  • Now open in V-REP the scene Pioneer_p3dx_traj_DEMO.ttt (you will find it in the folder SceneVrep of the package vrep_ros_bridge)

  • From a terminal launch demo_pioneer and visp_auto_tracker:

roslaunch demo_pioneer demo-visual-servo-pioneer-simulation.launch
  • Start the simulation in V-REP
  • The camera view will appear
  • The target will follow a predefined path.

Real experiment

  • alt text

Instructions

  • From a terminal launch demo_pioneer and visp_auto_tracker:

roslaunch demo_pioneer demo-visual-servo-pioneer.launch

Installation

Install ROS

Follow instructions you find in http://wiki.ros.org/hydro/Installation/Ubuntu page.

Complete the tutorial page. It is mandatory to follow the tutorial number 1 "Installing and Configuring Your ROS Environment".

Now we have installed ROS and we have created our workspace.

Install ViSP

  • Open a terminal and type:

sudo apt-get install ros-hydro-visp

Install demo_pioneer and vision_visp:

  • Follow the instruction you can find here

Install V-REP and vrep_ros_bridge

  • If you want to use V-REP to simulate the Pioneer robot you have to install V-REP and vrep_ros_bridge. To do it follow these instructions.

Wiki: vrep_ros_bridge/Tutorials/Pioneer 3D-X controlling its pose via a visual servoing law (last edited 2015-06-11 19:19:25 by jokla)