Giter Site home page Giter Site logo

despot_ajan_interface's Introduction

DESPOT Tutorials

In this tutorial, we present an example of using DESPOT with real-robots via ROS. We present a slightly modified version of the Laser Tag problem: a robot tries to find and tag a target which intentionally runs away inside an known environment. The robot is equiped with a noisy laser-range sensor to measure distances in eight directions. Initially, the robot is aware of neither the target's location nor its own location. In each step, the robot can move to the four adjacent positions. When the robot is adjacent to the target, it can call 'Tag' to terminate a successful pursuit. The simulation consists of two holonomic robots (KUKA Youbot) inside a Gazebo environment resembling the problem world described in DESPOT paper (Page 20) [1].

[1] N. Ye, A. Somani, D. Hsu, and W. Lee. DESPOT: Online POMDP planning with regularization. J. Artificial Intelligence Research, 58:231โ€“266, 2017.

Copyright ยฉ 2014-2020 by National University of Singapore.

Requirements

Tested Operating Systems:

Ubuntu 18.04
Build Status

Dependencies: DESPOT, ROS Melodic, Boost 1.55+

Prerequisites

Install ROS Indigo. We recommend the ros-indigo-desktop-full version which includes Gazebo.

Install the latest DESPOT using CMakeLists. Make sure that DESPOT binaries and header files are installed.

$ cd <latest_despot_repo>
$ git checkout API_redesign # temporary, will be merged into master
$ mkdir build; cd build

$ cmake -DCMAKE_BUILD_TYPE=Release ../ 
$ make
$ sudo make install

Install BOOST libraries with sudo apt-get install libboost-all-dev

Installation

If you haven't sourced your ROS environment, run:

$ source /opt/ros/indigo/setup.bash OR <existing_workspace>/devel/setup.bash

Setup a fresh catkin workspace for despot_tutorials:

$ mkdir -p ~/despot_ws/src
$ cd ~/despot_ws/
$ catkin_make 
$ source devel/setup.bash

Clone the repository:

$ cd ~/despot_ws/src
$ git clone https://github.com/AdaCompNUS/despot_tutorials.git

Compile:

cd ~/despot_ws
catkin_make -DCMAKE_BUILD_TYPE=Release

Usage

Launch the Gazebo environment and robot controllers:

$ roslaunch laser_tag laser_tag.launch R1_noise:=0.5

On a separate terminal, run the POMDP planner:

$ rosrun laser_tag pomdp_planner

Note: If there is a [rospack] Error: package 'laser_tag' not found error, Source the environment if necessary:

$ source /opt/ros/noetic/setup.bash
$ source ~/despot_ws/src

and run the rosrun command.

You should see a 3D 7x11 grid world with two Youbots. The green robot should chase the red robot until 'Tag' is called. The R1_noise parameter specifies the gaussian noise (standard deviation in meters) of the green robot's laser range finder.

Guidelines

In general, to use DESPOT with real-world systems:

  1. Define your POMDP model by inheriting the DSPOMDP class.
    (See class LaserTag and its parent class BaseTag in laser_tag.h and base/base_tag.h.)
  2. Setup an interface to communicate with your systems by inheriting the World abstract class.
    (See class LaserTagWorld in laser_tag_world.h and laser_tag_world.cpp.)
    • Implement the Connect and Initialize functions in World to estabilish connections with your system and intitialize it if possible.
    • Implement the ExecuteAction function in World to send actions to your system and receive observations from it in the formats specified in your POMDP model (e.g: ACT_TYPE & OBS_TYPE parameters).
  3. Initialize your planner by inheirting the Planner class.
    (See class MyPlanner in main.cpp.)
    • Provide the planner your POMDP model and custom world by implementing the InitializeModel and InitializeWorld functions.
    • Choose "DESPOT" to be the solver by implementing ChooseSolver.
    • Setup default parameters, such as the number of scenarios, search time per step, etc., by implementing InitializeDefaultParameters.
  4. Launch the planning pipeline in your main function by calling the runPlanning function in Planner.
    (See the main function in main.cpp.)
  5. (Optional) Overwrite Planner::PlanningLoop to customize your planning pipeline, and overwrite Planner::runStep to customize the search-execute-update step inside the planning loop. (See the PlanningLoop and runStep functions in main.cpp.)

despot_ajan_interface's People

Contributors

buvnswrn avatar cindycia avatar luo-yuanfu avatar mohitshridhar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.