OpenRAVE plugins to interface OpenRAVE with YARP.
Link to Doxygen generated documentation: https://robots.uc3m.es/openrave-yarp-plugins/
Installation instructions for installing from source can be found here.
git checkout -b my-new-feature
) off the master
branch, following the Forking Git workflowgit push origin my-new-feature
)The main approach is to develop OpenRAVE plugins (contained in the libraries/OpenravePlugins/ folder), which enable YARP communications. Among these, OpenraveYarpPluginLoader is a generic component that allows to internally load any of the YARP plugins contained in the libraries/YarpPlugins/ folder. These YARP plugins open ports thanks to their network wrappers. This can be seen in the following figure.
Technically, the OpenRAVE plugin can directly open YARP ports, or contain one or many yarp::dev::PolyDriver
. In the latter, it calls yarp::dev::PolyDriver::open(yarp::os::Searchable &config)
passing a yarp::os::Property
(note that Property
is a Searchable
), typically with the following contents:
controlboardwrapper2
, grabber
...).controlboard
, grabber
... functionality).OpenRAVE::Environment
to be used by the "subdevice".OpenRAVE::Environment
and can be used for the port names opened by the "device" too.robotIndex
and/or manipulatorIndex
for control).The following commands explain how to use the openrave-yarp-plugins for collision avoidance, using the previous instance of openrave-yarp-plugins as the remote robot.
# new terminal to open the simulated robot
python examples/python/openraveYarpPluginLoader-controlboard-allManipulators.py
# new terminal to open the collision avoidance simulator
# NOTE: Expect LONG wait to load the padding model
python examples/python/openraveYarpPluginLoader-controlboard-collision-sim.py
# Then the robot can be commanded via yarp with:
yarp rpc /safe/teoSim/[kinematic chain name]/rpc:i
The following commands explain how to use the openrave-yarp-plugins for collision avoidance, using a real remote robot.
# new terminal
python examples/python/openraveYarpPluginLoader-controlboard-collision-real.py
# wait for the system to load the padding model
# Then the robot can be commanded via yarp with:
yarp rpc /safe/teo/[kinematic chain name]/rpc:i
The following commands explain how to use openrave to create a 3D model (.pp
) of the collision space that OpenRAVE uses to calculate collisions. Whereas OpenRAVE uses it continuously, here we can save the 3D files to use them.
openrave.py --database convexdecomposition --robot=/usr/local/share/teo-openrave-models/openrave/teo/teo.robot.xml # --padding=PADDING --maxHullVertices=MAXHULLVERTICES --mergeThresholdPercent=MERGETHRESHOLDPERCENT
At the time of generating the .pp
file, different parameters can be set. In our case, the most relevant parameters are the padding, the maxHullVertices and the mergeThresholdPercent. padding represents the distance from the real plane to the one generated. The last two are used to reduce the number of triangles generated in the model.
More options can be found here.
# To check the results, execute the following command. It is worth noting that, the triangle count is not correct, this was contrasted using other tool.
openrave.py --database convexdecomposition --robot=/usr/local/share/teo-openrave-models/openrave/teo/teo.robot.xml --show
To convert the generated .pp
file into an .stl
file that can be used by other programs, openrave-pp-to-stl.py (perma) can be used.