Skip to content

Instantly share code, notes, and snippets.

@rpapallas
Created June 22, 2020 09:33
Show Gist options
  • Save rpapallas/171cad0e881769647d0851b8780cc545 to your computer and use it in GitHub Desktop.
Save rpapallas/171cad0e881769647d0851b8780cc545 to your computer and use it in GitHub Desktop.
Installing or_urdf plugin for OpenRAVE 0.9

Installation

  • 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!

Testing

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()
env.SetViewer('qtcoin')
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,
                                                              srdf_path))
    robot = self.env.GetRobot(ur5_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment