Skip to content

Latest commit

 

History

History
106 lines (73 loc) · 7.26 KB

File metadata and controls

106 lines (73 loc) · 7.26 KB

OpenraveYarpPluginLoader

Enables loading one or several YARP plugins in OpenRAVE, typically from ../../libraries/YarpPlugins/.

First open a:

yarp server

Note on Invocation

There are 2 ways to invoke OpenraveYarpPluginLoader:

  • Command Line (CLI): Note that the string with parameters passed from the CLI to OpenraveYarpPluginLoader are parsed within its int main(const std::string& cmd) function. This main() function is a strange animal within OpenRAVE plugins as commented at #30, which is affected by several issues, namely #59 and #60.
  • Python: Requires Python openravepy module.

YarpOpenraveAnalogSensors

Use OpenraveYarpPluginLoader to replicate any example of ../../YarpPlugins/YarpOpenraveAnalogSensors.

Example 1

The first example becomes (note that name and view parameters are no longer required):

openrave --module OpenraveYarpPluginLoader "env openrave/physicsRobot.env.xml open --device multipleanalogsensorsserver --subdevice YarpOpenraveAnalogSensors --robotIndex 0 --ftSensorIndices 0 --period 50"

The equivalent Python script can be found at: ../../../examples/python/openraveYarpPluginLoader-analogsensors.py

Then follow the commands of the first example.

YarpOpenraveControlBoard

Use OpenraveYarpPluginLoader to replicate any example of ../../YarpPlugins/YarpOpenraveControlBoard.

Example 1

The first example becomes (note that name and view parameters are no longer required):

openrave --module OpenraveYarpPluginLoader "env data/lab1.env.xml open --device controlBoard_nws_yarp --subdevice YarpOpenraveControlBoard --robotIndex 0 --manipulatorIndex 0"

The equivalent Python script can be found at: ../../../examples/python/openraveYarpPluginLoader-controlboard.py

Then follow the commands of the first example.

Example 2

Now you can even use allRobots and/or allManipulators (example using the environment loaded by OpenRAVE):

openrave data/lab1.env.xml --module OpenraveYarpPluginLoader "open --device controlBoard_nws_yarp --subdevice YarpOpenraveControlBoard --allRobots --allManipulators"

The equivalent Python script can be found at: ../../../examples/python/openraveYarpPluginLoader-controlboard-allManipulators.py

Example 3

We can also do funky commands like the following, with concatenated env and several open commands:

# Requires [teo-openrave-models](https://github.com/roboticslab-uc3m/teo-openrave-models)
openrave --module OpenraveYarpPluginLoader "env openrave/teo/teo.robot.xml open --device controlBoard_nws_yarp --subdevice YarpOpenraveControlBoard --robotIndex 0 --manipulatorIndex 0 open --device controlBoard_nws_yarp --subdevice YarpOpenraveControlBoard --robotIndex 0 --manipulatorIndex 2"

YarpOpenraveGrabber

Use OpenraveYarpPluginLoader to replicate any example of ../../YarpPlugins/YarpOpenraveGrabber.

Example 1

The first example becomes (note that name and view parameters are no longer required, but here viewer is forced due to #48):

openrave --module OpenraveYarpPluginLoader "env data/testwamcamera.env.xml open --device frameGrabber_nws_yarp --subdevice YarpOpenraveGrabber --robotIndex 0 --sensorIndex 0" --viewer qtcoin

The equivalent Python script can be found at: ../../../examples/python/openraveYarpPluginLoader-grabber.py

Then follow the commands of the first example.

YarpOpenraveRGBDSensor

Use OpenraveYarpPluginLoader to replicate any example of ../../YarpPlugins/YarpOpenraveRGBDSensor.

Example 1

The first example becomes (note that name and view parameters are no longer required, but here viewer and collision are forced due to #48 and #102 respectively):

openrave --module OpenraveYarpPluginLoader "env data/testwamcamera.env.xml open --device rgbdSensor_nws_yarp --subdevice YarpOpenraveRGBDSensor --robotIndex 0 --rgbSensorIndex 0 --depthSensorIndex 3" --viewer qtcoin --collision ode

The equivalent Python script can be found at: ../../../examples/python/openraveYarpPluginLoader-rgbdsensor.py

Then follow the commands of the first example.

YarpOpenraveRobotManager

Use OpenraveYarpPluginLoader to replicate any example of ../../YarpPlugins/YarpOpenraveRobotManager.

Example 1

The first example becomes (note that name and view parameters are no longer required):

# requires [asrob-uc3m/robotDevastation-openrave-models](https://github.com/asrob-uc3m/robotDevastation-openrave-models)
openrave --module OpenraveYarpPluginLoader "env openrave/mapping_room.env.xml open --device RobotServer --subdevice YarpOpenraveRobotManager --robotIndex 0"

The equivalent Python script can be found at: ../../../examples/python/openraveYarpPluginLoader-robotmanager.py

Then follow the commands of the first example.

YarpOpenraveControlBoard + YarpOpenraveRGBDSensor

Here's a nice one-liner that enables both the commands of YarpOpenraveControlBoard and YarpOpenraveRGBDSensor:

openrave --module OpenraveYarpPluginLoader "env data/testwamcamera.env.xml open --device controlBoard_nws_yarp --subdevice YarpOpenraveControlBoard --allRobots --allManipulators open --device rgbdSensor_nws_yarp --subdevice YarpOpenraveRGBDSensor --robotIndex 0 --rgbSensorIndex 0 --depthSensorIndex 3" --viewer qtcoin --collision ode