Enables loading one or several YARP plugins in OpenRAVE, typically from ../../libraries/YarpPlugins/.
First open a:
yarp server
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 itsint main(const std::string& cmd)
function. Thismain()
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.
Use OpenraveYarpPluginLoader
to replicate any example of ../../YarpPlugins/YarpOpenraveAnalogSensors.
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.
Use OpenraveYarpPluginLoader
to replicate any example of ../../YarpPlugins/YarpOpenraveControlBoard.
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.
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
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"
Use OpenraveYarpPluginLoader
to replicate any example of ../../YarpPlugins/YarpOpenraveGrabber.
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.
Use OpenraveYarpPluginLoader
to replicate any example of ../../YarpPlugins/YarpOpenraveRGBDSensor.
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.
Use OpenraveYarpPluginLoader
to replicate any example of ../../YarpPlugins/YarpOpenraveRobotManager.
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.
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