Installing or_urdf plugin for OpenRAVE 0.9

I am working on a small project where I am writing a C++ code to port UR-5 robot to OpenRAVE. It turns out that I needed the or_urdf plugin so I will be able to load urdf files into OpenRAVE. I didn’t find much information online and it took me a while to make it work.

I decided to write a brief tutorial to make life easier for people to find some starting point. I assume you are using Ubuntu here, if not I guess you will need slightly a different approach.

Installation process

  • First, run the following to install libtinyxml2-dev on your system.
sudo apt-get install libtinyxml2-dev
  • I assume you have already configured your catkin_ws workspace, if not Google how to configure your catkin workspace.
  • Go to catkin_ws/src and clone the or_urdf repository from here. Note that this is a forked version because I changed something to the build destination of the plugin. I have created a pull request but as of now has not yet been approved. Have a look here and if the pull request is merged and closed, then go ahead and clone the or_urdf from the original repository.
  • Clone also the openrave_catkin from here in your catkin_ws/src.
  • Once you clone the or_urdf and openrave_catkin in your catkin_ws/src then go to catkin_ws and run catkin_make.
  • You should see a successful message at the end of the build process.
  • In your ~/.bashrc file add the following line:
export OPENRAVE_PLUGINS=$OPENRAVE_PLUGINS:~/catkin_ws/devel/share/openrave-0.9/plugins
  • Verify the successful installation of the plugin using the following:
    • Run source ~/.bashrc
    • openrave -listplugins
    • You should see URDF under module category. If you see URDF in there then you are good to go!


I have the urdf and srdf files for UR5 robot stored in the repository here if you want to try.

from openravepy import *

env = Environment()
urdf_module = RaveCreateModule(env, 'urdf')

urdf_path = "package://ur5controller/ur5_description/urdf/clearpath_ridgeback__ur5__robotiq_two_finger_gripper.urdf"
srdf_path = "package://ur5controller/ur5_description/srdf/clearpath_ridgeback__ur5__robotiq_two_finger_gripper.srdf"

with env:
    ur5_name = urdf_module.SendCommand('LoadURI {} {}'.format(urdf_path,
    robot = self.env.GetRobot(ur5_name)

And here is the working output of the above code:

Figure 1: UR5 Robot in OpenRAVE
© 2019 Rafael Papallas
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.