Package openravepy :: Package databases :: Module visibilitymodel

Module visibilitymodel

source code

Samples visible locations of a target object and a sensor.

../../images/databases_visibilitymodel_extents.jpg

Running the Generator

openrave.py --database visibilitymodel --robot=robots/pa10schunk.robot.xml

Showing Visible Locations

openrave.py --database visibilitymodel --robot=robots/pa10schunk.robot.xml --show

Usage

Dynamically generate/load the visibility sampler for a manipulator/sensor/target combination:

robot.SetActiveManipulator(...)
ikmodel = openravepy.databases.visibilitymodel.VisibilityModel(robot,target,sensorname)
if not vmodel.load():
    vmodel.autogenerate()

Description

As long as a sensor is attached to a robot arm, can be applied to any robot to get immediate visibiliy configuration sampling:

../../images/databases_visibilitymodel_hrp3_camera.jpg ../../images/databases_visibilitymodel_pa10_camera.jpg ../../images/databases_visibilitymodel_hrp2_camera.jpg ../../images/databases_visibilitymodel_wam_camera.jpg

The visibility database generator uses the VisualFeedback interface for the underlying visibility computation. The higher level functions it provides are sampling configurations, computing all valid configurations with the manipulator, and display.


Author: Rosen Diankov

Copyright: Copyright (C) 2009-2010 Rosen Diankov (rosen.diankov@gmail.com)

License: Apache License, Version 2.0

Classes
  VisibilityModel
Functions
 
run(*args, **kwargs)
Executes the visibilitymodel database generation, args specifies a list of the arguments to the script.
source code
Variables
  __package__ = 'openravepy.databases'
Function Details

run(*args, **kwargs)

source code 

Executes the visibilitymodel database generation, args specifies a list of the arguments to the script.

Help

Usage: openrave.py [options]

Computes and manages the visibility transforms for a manipulator/target.

Options:
  -h, --help            show this help message and exit
  --target=TARGET       OpenRAVE kinbody target filename
  --sensorname=SENSORNAME
                        Name of the sensor to build visibilty model for (has
                        to be camera). If none, takes first possible sensor.
  --preshape=PRESHAPES  Add a preshape for the manipulator gripper joints
  --sphere=SPHERE       Force detectability extents to be distributed around a
                        sphere. Parameter is a string with the first value
                        being density (3 is default) and the rest being
                        distances
  --conedirangle=CONEDIRANGLES
                        The direction of the cone multiplied with the half-
                        angle (radian) that the detectability extents are
                        constrained to. Multiple cones can be provided.
  --rayoffset=RAYOFFSET
                        The offset to move the ray origin (prevents
                        meaningless collisions), default is 0.03
  --showimage           If set, will show the camera image when showing the
                        models

  OpenRAVE Environment Options:
    --collision=COLLISION
                        Default collision checker to use
    --physics=PHYSICS   Default physics engine to use
    -d DEBUG, --debug=DEBUG
                        Debug level

  OpenRAVE Database Generator General Options:
    --show              Graphically shows the built model
    --getfilename       If set, will return the final database filename where
                        all data is stored
    --gethas            If set, will exit with 0 if datafile is generated and
                        up to date, otherwise will return a 1. This will
                        require loading the model and checking versions, so
                        might be a little slow.
    --robot=ROBOT       OpenRAVE robot to load
                        (default=robots/barrettsegway.robot.xml)
    --manipname=MANIPNAME
                        The name of the manipulator on the robot to use