Introduction
In this series of tutorials I will show some of the functionalities of RobWork (a set of libraries for robotic research). We will design and model a simple SCARA-type robot and then maybe go on with some fancier and cooler stuff. I will try to write these tutorials in easy-to-stomach pieces and I also can't promise to post them regularly.
Note. We will do these tutorials on Ubuntu system. I encourage you to give it a try even if you haven't tried it yet. It should be perfectly fine installed on a virtual machine.
Note. We will do these tutorials on Ubuntu system. I encourage you to give it a try even if you haven't tried it yet. It should be perfectly fine installed on a virtual machine.
RobWork (http://www.robwork.dk) is an extensive collection of C++ libraries for use in robotics. I used RobWork
in the course of my PhD work on the automating of gripper design and
also employed in in some other robotic-related projects (such as
modelling of CNC machines and in my other research). I can certainly
recommend it for your robotic needs!
RobWork is developed by the robotics group at the Maersk Mc-Kinney Moller Institute at the University of Southern Denmark (http://www.sdu.dk/en/Om_SDU/Institutter_centre/SDURobotics).
Features of RobWork are (among others):
- modelling of robots (serial, tree and parallel),
- kinematic and dynamic modelling of devices (manipulators, controllers and sensors),
- robot forward and inverse kinematics,
- path planning and optimization,
- collision detection,
- grasping simulation,
- interfaces to ODE, Bullet and RWPE physics engines,
- script interfaces to Python, LUA and JAVA (Matlab!),
- all of this wrapped in a neat RobWorkStudio GUI.
Obviously, we have to start with the installation of RobWork. Further down I also describe the installation of Blender, which we will use as our 3D modelling tool.
RobWork
RobWork installation is described HERE. You should follow the guide on that page and install all parts of RobWork software (with an exception for RobWorkHardware which we will not use). In a nutshell:
1. Install the build tools:
sudo apt-get install subversion git mercurial
sudo apt-get install gcc g++ cmake cmake-curses-gui
2. Install the RW, RWS and RWSIM dependencies (including some of the optional):
sudo apt-get install libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-test-dev libboost-thread-dev
sudo apt-get install libxerces-c3.1 libxerces-c-dev
sudo apt-get install swig liblua5.2-dev python-dev default-jdk
sudo apt-get install qtdeclarative5-dev
sudo apt-get install libode-dev libode4
sudo apt-get install libxerces-c3.1 libxerces-c-dev
sudo apt-get install swig liblua5.2-dev python-dev default-jdk
sudo apt-get install qtdeclarative5-dev
sudo apt-get install libode-dev libode4
3. Create the RobWork directory and download the source code:
cd
mkdir robwork && cd robwork
svn co https://svnsrv.sdu.dk/svn/RobWork/trunk/
cd trunk
4. Create the build directory and issue the CMake command. If there are errors at this step, make sure that you have installed all the required dependencies.
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
5. (Optional) You can use ccmake at this point to review the build settings. In particular, make sure that RobWork, RobWorkStudio and RobWorkSim are all enabled (see Fig. 1).
6. If all is well, we can then proceed with the compilation. This will likely take quite some time. You can stop the make at any time and resume it afterwards; it will retain its progress. You can set the -j N parameter to run the compilation in N parallel threads.
make
or
make -j 4
Hopefully you did not get any build errors! You can verify that all is done correctly by navigating to the ~/robwork/trunk/RobWorkStudio/bin/release and trying to run the RobWorkStudio executable (see Fig. 2).
./RobWorkStudio
Fig. 2. RobWorkStudio. |
It is reportedly possible to install RobWork also on Windows... but I don't recommend it (ugh, programming in Windows!). I might make a tutorial on that some other day.
Blender
Blender is an open-source 3D computer graphics software. Even though it is free, it's quite powerful - we won't even use a fraction of its capabilities to create the 3D geometry models for our robot's parts.
Installing Blender on Ubuntu is pretty straightforward. You can probably do it through the Ubuntu Software, but the following command executed in terminal will also do the job:
sudo apt install blender
We will also like to have an option of importing/exporting AC3D files, such that we can enhance our robot geometry with some color. In order to have that possibility you will have to install a 3rd party plugin available at https://github.com/majic79/Blender-AC3D. Download and unpack the ZIP of the repository.
It is important to run Blender at least once before installing the plugin. You should also edit and save the user settings while doing that, so that the config directory appears in your home folder. The plugin is installed by placing the io_scene_ac3d directory from the unpacked archive in your Blender configuration directory (for me it was ~/.config/blender/2.76 - press Ctrl+H to show hidden folders) in the sub-directory scripts/addons (that you likely have to create).
The next step is running Blender again, and going into File->User Preferences. In the Add-ons tab select the Import-Export category (on the left) and enable the
Import-Export: AC3D (.ac) format plugin (see Fig. 3).