RobWorkProject  23.9.11-
Classes | Functions
rwlibs::swig Namespace Reference

Define helper functions and all the classes that are being wrapped by SWIG. The wrapped classes are defined as typedefs of other classes in RobWork. More...

Classes

class  LuaPlugin
 A Lua plugin that define extensions for rwlibs.swig.LuaState.LuaLibrary. More...
 
class  LuaState
 a robwork wrapper for the lua_State struct. The standard robwork lua libs will be initialized automatically. Also this provides an extension point for adding user defined lua enabled libraries. More...
 

Typedefs

assembly

Wrapped classes in assembly.

typedef rwlibs::assembly::AssemblyControlResponse AssemblyControlResponse
 The output from a AssemblyControlStrategy. More...
 
typedef rwlibs::assembly::AssemblyControlStrategy AssemblyControlStrategy
 The interface for control strategies for assembly. More...
 
typedef rwlibs::assembly::AssemblyParameterization AssemblyParameterization
 Interface for a parameterization that can be used by a AssemblyControlStrategy. More...
 
typedef rwlibs::assembly::AssemblyRegistry AssemblyRegistry
 A registry of control strategies. The registry defines an extension point. More...
 
typedef rwlibs::assembly::AssemblyResult AssemblyResult
 A specification of the result from an execution of an AssemblyTask. More...
 
typedef rwlibs::assembly::AssemblyState AssemblyState
 Information about the trajectory of the objects and sensor information during execution. More...
 
typedef rwlibs::assembly::AssemblyTask AssemblyTask
 Specification of a AssemblyTask. More...
 
trajectory

Wrapped classes in trajectory.

typedef rw::trajectory::TimedState TimedState
 A tuple of (time, State). See rw::trajectory::Timed<t> template for more info. More...
 
typedef rw::trajectory::TimedStatePath PathTimedState
 Path of rw::kinematics::State with associated times. More...
 
typedef rw::trajectory::Timed< AssemblyStateTimedAssemblyState
 A tuple of (time, value). More...
 
control

Wrapped classes in control.

typedef rwlibs::control::Controller Controller
 interface that defines functionality for control of devices and actuators More...
 
typedef rwlibs::control::JointController JointController
 the joint controller interface describe how to input to a joint controller. The output Force, Vel, Pos... must be available in the class implementing JointController interface More...
 
opengl

Wrapped classes in opengl.

typedef rwlibs::opengl::RenderImage RenderImage
 RenderImage renders a image in a plane defined by [-w/2;h/2][w/2;-h/2]. The image need to be scaled into metric units. This can be done using a scaling parameter. More...
 
pathplanners

Wrapped classes in pathplanners.

typedef rwlibs::pathplanners::ARWExpand ARWExpand
 ARWExpand expands a random walk in the configuration space by one step. More...
 
typedef rwlibs::pathplanners::ARWPlanner ARWPlanner
 Adaptive Random Walk planners. More...
 
typedef rwlibs::pathplanners::PRMPlanner PRMPlanner
 Implements a probabilistic roadmap (PRM) planner. More...
 
typedef rwlibs::pathplanners::RRTPlanner RRTPlanner
 RRT based planners. More...
 
typedef rwlibs::pathplanners::SBLExpand SBLExpand
 Interface for sampling a configuration in the vicinity of some other configuration. More...
 
typedef rwlibs::pathplanners::SBLPlannerConstraint SBLPlannerConstraint
 A SBL planner constraint. More...
 
typedef rwlibs::pathplanners::SBLOptions SBLOptions
 SBL planner setup. More...
 
typedef rwlibs::pathplanners::SBLPlanner SBLPlanner
 SBL based planners. More...
 
typedef rwlibs::pathplanners::SBLSetup SBLSetup
 Common parameters for SBL based planners. More...
 
typedef rwlibs::pathplanners::Z3Planner Z3Planner
 Z3 based planners. More...
 
proximitystrategies

Wrapped classes in proximitystrategies.

typedef rwlibs::proximitystrategies::ProximityStrategyFactory ProximityStrategyFactory
 Factory class that enables constructing collision strategies. More...
 
task

Wrapped classes in task.

typedef rwlibs::task::Task< rw::math::Transform3D< double > > TaskSE3
 Template based implementation of Task. More...
 
typedef rwlibs::task::GraspTask GraspTask
 A container for describing one or multiple grasping tasks. It is based on the rwlibs::tasks library. More...
 
typedef rwlibs::task::GraspSubTask GraspSubTask
 Describes a sub task of overall grasp task. More...
 
typedef rwlibs::task::GraspTarget GraspTarget
 Represents a single target for grasping (described as a pose), and its result. More...
 
typedef rwlibs::task::GraspResult GraspResult
 Describes the result of a single grasp. More...
 

Functions

int openLuaLibRW_sdurw (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_algorithms (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_assembly (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_common (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_control (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_core (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_geometry (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_graphics (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_graspplanning (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_invkin (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_kinematics (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_loaders (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_math (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_models (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_opengl (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_pathoptimization (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_pathplanners (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_pathplanning (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_plugin (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_proximity (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_proximitystrategies (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_sensor (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_simulation (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_task (lua_State *L)
 Initialize a Lua state. More...
 
int openLuaLibRW_sdurw_trajectory (lua_State *L)
 Initialize a Lua state. More...
 
void writelog (const std::string &msg)
 Write message to log. More...
 
void setlog (::rw::core::LogWriter::Ptr writer)
 Set the writer to write log to. More...
 

Detailed Description

Define helper functions and all the classes that are being wrapped by SWIG. The wrapped classes are defined as typedefs of other classes in RobWork.

SWIG generated interface for Robwork. The supported generated interface languages are: Lua, Python and Java.

The SWIG interface to RobWork is very similar to the RobWork c++ interface. However, due to limitations in other languages, then the interfaces cannot match the c++ interface exactly. Class's in this module are documented as c++ classes with c++ functions, but they really only define the classes and functions that was wrapped and available through SWIG.

Typedef Documentation

◆ ARWExpand

ARWExpand expands a random walk in the configuration space by one step.

◆ ARWPlanner

Adaptive Random Walk planners.

The ARW planners are based on the algorithm of: Stefano Carpin and Gianluigi Pillonetto, Motion Planning Using Adaptive Random Walks, IEEE Transactions on Robotics, Vol. 21, No. 1, 2005.

◆ AssemblyControlResponse

The output from a AssemblyControlStrategy.

◆ AssemblyControlStrategy

The interface for control strategies for assembly.

The control strategy must implement the getApproach(), update(), createParameterization(), getID() and getDescription() methods.

The createState() can be overriden if the user wants to save specific strategy state between calls to update().

◆ AssemblyParameterization

Interface for a parameterization that can be used by a AssemblyControlStrategy.

Each AssemblyControlStrategy will typically derive its own AssemblyParameterization that includes the parameters necessary to specify the assembly operation when using that specific strategy.

By deriving from this class, the parameterization can be stored and restored via a PropertyMap structure. This is mainly used as a way to extend the assembly assembly specification with additional data, while maintaining the ability to serialize, load and save the AssemblyTask. Derived classes should override the clone(), make(), reset() and toPropertyMap() functions.

Notice that this is also a concrete class, allowing the user to create a parameterization that is always empty, or create a parameterization based on a custom PropertyMap. The latter is especially useful if scripting interfaces are used, where subclassing is not possible.

◆ AssemblyRegistry

A registry of control strategies. The registry defines an extension point.

Users can define custom assembly control strategies in two ways. Either an extension must be registered, or the user must create an AssemblyRegistry and add the strategy to this registry manually.

◆ AssemblyResult

A specification of the result from an execution of an AssemblyTask.

The class provides serialization through the CartesianTask format.

◆ AssemblyState

Information about the trajectory of the objects and sensor information during execution.

This information is serializable through the CartesianTarget format.

◆ AssemblyTask

Specification of a AssemblyTask.

Assembly task is a generic description that covers all tasks where two objects are to be assembled. This can for instance be Peg in Hole or screwing operations.

The class supports serialization through the CartesianTask format. For deserialization an AssemblyRegistry should be provided when loading the AssemblyTask. This is required if user specifies its own AssemblyControlStrategy.

◆ Controller

interface that defines functionality for control of devices and actuators

◆ GraspResult

Describes the result of a single grasp.

◆ GraspSubTask

Describes a sub task of overall grasp task.

It is concerned with a specific way of grasping a single target object, describing:

  • target object name,
  • gripper open and close configurations,
  • approach and retract vectors

◆ GraspTarget

Represents a single target for grasping (described as a pose), and its result.

◆ GraspTask

A container for describing one or multiple grasping tasks. It is based on the rwlibs::tasks library.

Definition of GraspTask xml format

GraspTask

  • p:string:"GripperName" - name of the gripper device
  • p:string:"ControllerName" - defaults to GraspController
  • p:string:"TCP" - name of the TCP frame

◆ JointController

the joint controller interface describe how to input to a joint controller. The output Force, Vel, Pos... must be available in the class implementing JointController interface

◆ PathTimedState

Path of rw::kinematics::State with associated times.

◆ PRMPlanner

Implements a probabilistic roadmap (PRM) planner.

The PRMPlanner is implemented freely after [1], and has a number of options:

  • Lazy Collision Checking: Using lazy collision checking as in [2], the planner can be used for single as well as multiple queries.
  • Nearest Neighbor Search: The algorithm can either use a partial index table [3] or a simple brute force method to do the nearest neighbor search.
  • Shortest Path Algorithm: Using the Boost Graph Library, both A* and Dijkstra's Algorithm may be used for finding the shortest path.

As default the algorithm runs with lazy collision checking, brute force neighbor search and with A* for shortest path search.

As metric the PRMPlanner uses a WeightedEuclideanMetric for which it estimates the weights such that it provides a worst-case estimate of the Cartesian motion of the robots given a change in the configuration.

Example of use

PRMPlanner* prm = new PRMPlanner(device, workcell, state, collisionDetector,
resolution); prm->setCollisionCheckingStrategy(PRMPlanner::LAZY);
prm->setNeighSearchStrategy(PRMPlanner::BRUTE_FORCE);
prm->setShortestPathSearchStrategy(PRMPlanner::A_STAR);
prm->buildRoadmap(1000);
Path path;
bool pathFound = prm->query(qstart, qgoal, path, maxtime);
@ LAZY
Definition: PRMPlanner.hpp:189
@ A_STAR
Definition: PRMPlanner.hpp:206
@ BRUTE_FORCE
Definition: PRMPlanner.hpp:155
rwlibs::pathplanners::PRMPlanner PRMPlanner
Implements a probabilistic roadmap (PRM) planner.
Definition: src/rwlibs/swig/ScriptTypes.hpp:137

[1]: Probabilistic Roadmaps for Path Planning in High-Dimensional Configuration Spaces, L.E. Kavraki, P. Svestka, J-C. Latombe, M.H. Overmars. IEEE Transactions on Robotics and Automation, Vol. 12, pages 566-580, 1996

[2]: Path Planning using Lazy PRM, R. Bohlin, L.E. Kavraki. Proceedings of the IEEE International Conference on Robotics and Automation, Vol. 1, pages 521-528, 2000

[3]: On Delaying Collision Checking in PRM Planning - Application to Multi-Robot Coordination, G. Sanchez, J.C. Latombe. The International Journal of Robotics Research, Vol. 21, No. 1, pages 5-26, 2002

◆ ProximityStrategyFactory

Factory class that enables constructing collision strategies.

◆ RenderImage

RenderImage renders a image in a plane defined by [-w/2;h/2][w/2;-h/2]. The image need to be scaled into metric units. This can be done using a scaling parameter.

◆ RRTPlanner

RRT based planners.

◆ SBLExpand

Interface for sampling a configuration in the vicinity of some other configuration.

SBLExpand is a primitive for planners in the SBL family. The primitive takes a configuration q as parameter and returns another configuration somewhere in the vicinity of q.

Different implementations can have different policies with respect to what constraints are satisfied by the configurations returned.

◆ SBLOptions

SBL planner setup.

SBLOptions is the value stored in SBLSetup.

SBLOptions is a seperate file so that we can keep SBLSetup as abstract as possible.

SBLOptions is used by SBLInternal and is for internal use only.

◆ SBLPlanner

SBL based planners.

◆ SBLPlannerConstraint

A SBL planner constraint.

◆ SBLSetup

Common parameters for SBL based planners.

All versions of the SBL planner base verify configurations and paths in the configuration space using a PlannerConstraint object.

In addition, parameters can given to define how expansion around a node of the tree should be done and under what circumstances the two trees should be connected.

A SBLSetup object stores pointers to the shared objects, but can be copied and assigned freely.

◆ TaskSE3

Template based implementation of Task.

◆ TimedAssemblyState

A tuple of (time, value).

◆ TimedState

A tuple of (time, State). See rw::trajectory::Timed<t> template for more info.

◆ Z3Planner

Z3 based planners.

See "The Z3-Method for Fast Path Planning in Dynamic Environments", Boris Baginski, 1996.

Function Documentation

◆ openLuaLibRW_sdurw()

int rwlibs::swig::openLuaLibRW_sdurw ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_algorithms()

int rwlibs::swig::openLuaLibRW_sdurw_algorithms ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_assembly()

int rwlibs::swig::openLuaLibRW_sdurw_assembly ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_common()

int rwlibs::swig::openLuaLibRW_sdurw_common ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_control()

int rwlibs::swig::openLuaLibRW_sdurw_control ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_core()

int rwlibs::swig::openLuaLibRW_sdurw_core ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_geometry()

int rwlibs::swig::openLuaLibRW_sdurw_geometry ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_graphics()

int rwlibs::swig::openLuaLibRW_sdurw_graphics ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_graspplanning()

int rwlibs::swig::openLuaLibRW_sdurw_graspplanning ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_invkin()

int rwlibs::swig::openLuaLibRW_sdurw_invkin ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_kinematics()

int rwlibs::swig::openLuaLibRW_sdurw_kinematics ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_loaders()

int rwlibs::swig::openLuaLibRW_sdurw_loaders ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_math()

int rwlibs::swig::openLuaLibRW_sdurw_math ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_models()

int rwlibs::swig::openLuaLibRW_sdurw_models ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_opengl()

int rwlibs::swig::openLuaLibRW_sdurw_opengl ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_pathoptimization()

int rwlibs::swig::openLuaLibRW_sdurw_pathoptimization ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_pathplanners()

int rwlibs::swig::openLuaLibRW_sdurw_pathplanners ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_pathplanning()

int rwlibs::swig::openLuaLibRW_sdurw_pathplanning ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_plugin()

int rwlibs::swig::openLuaLibRW_sdurw_plugin ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_proximity()

int rwlibs::swig::openLuaLibRW_sdurw_proximity ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_proximitystrategies()

int rwlibs::swig::openLuaLibRW_sdurw_proximitystrategies ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_sensor()

int rwlibs::swig::openLuaLibRW_sdurw_sensor ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_simulation()

int rwlibs::swig::openLuaLibRW_sdurw_simulation ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_task()

int rwlibs::swig::openLuaLibRW_sdurw_task ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ openLuaLibRW_sdurw_trajectory()

int rwlibs::swig::openLuaLibRW_sdurw_trajectory ( lua_State *  L)

Initialize a Lua state.

Parameters
L[in/out] the Lua state to add module contents to.
Returns
returns 1 according to Lua documentation.

◆ setlog()

void rwlibs::swig::setlog ( ::rw::core::LogWriter::Ptr  writer)

Set the writer to write log to.

Parameters
writer[in] the writer.

◆ writelog()

void rwlibs::swig::writelog ( const std::string &  msg)

Write message to log.

Parameters
msg[in] message to write.