Giter VIP home page Giter VIP logo

gtp_tutorials's Introduction

gtp_tutorials

Tutorials for using GTP in ROS

Usage

You need to have a running instance of gtp, with all the pipeline for the worldstate update and robot control. Have a look at adream_hri_experiments package.

Then you can simply rosrun the scripts, after having a look at them and their documentation.

action.py node

This python script is mainly just an interface to call action servers and services from GTP and Co.

It can be used to plan and execute tasks manually, and also serves as a demonstration of GTP usage.

Example

Let's plan a pick and place action, and then execute it. First we need to fetch the world state from toaster, we call the update sevice of GTP. This only "triggers" the update, wich will actually be done upon reception of the required data.

~ ❯❯❯ rosservice call /gtp/update
success: True
message: ''
~ ❯❯❯ rosrun gtp_tutorials action.py pick PR2_ROBOT -o GREY_TAPE
sending goal
step: wait for update
step: planning task
step: no solution
Plan result:
id: 
  taskId: -1
  alternativeId: -1
solutionParts: []
status: no_solution
success: False
~ ❯❯❯ rosrun gtp_tutorials action.py pick PR2_ROBOT -o GREY_TAPE
sending goal
step: planning task
step: post processing solution
Plan result:
id: 
  taskId: 0
  alternativeId: 0
solutionParts: 
  - 
    agent: PR2_ROBOT
    armId: 0
    id: 0
    name: approach
    type: Manipulate
  - 
    agent: PR2_ROBOT
    armId: 0
    id: 1
    name: engage
    type: Manipulate
  - 
    agent: PR2_ROBOT
    armId: 0
    id: 2
    name: grasp
    type: Manipulate
  - 
    agent: PR2_ROBOT
    armId: 0
    id: 3
    name: escape
    type: Manipulate
status: OK
success: True
~ ❯❯❯ rosrun gtp_tutorials action.py place PR2_ROBOT -o GREY_TAPE -p 0,0
sending goal
step: planning task
step: no solution
Plan result:
id: 
  taskId: -1
  alternativeId: -1
solutionParts: []
status: no_solution
success: False
~ ❯❯❯ rosrun gtp_tutorials action.py place PR2_ROBOT -o GREY_TAPE -p 0,0
sending goal
step: planning task
step: post processing solution
Plan result:
id:
  taskId: 1
  alternativeId: 0
solutionParts:
  -
    agent: PR2_ROBOT
    armId: 0
    id: 0
    name: approach
    type: Manipulate
  -
    agent: PR2_ROBOT
    armId: 0
    id: 1
    name: engage
    type: Manipulate
  -
    agent: PR2_ROBOT
    armId: 0
    id: 2
    name: release
    type: Manipulate
  -
    agent: PR2_ROBOT
    armId: 0
    id: 3
    name: escape
    type: Manipulate
status: OK
success: True

gtp_tutorials's People

Contributors

juleswh avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

lencshu

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.