general info
- all of the code has been used and tested on Ubuntu 22 LTS
- both Python and C++ implementations are available, there's examples of both (both for the libraries used and for their combination)
- all of the code is initially written in C++ - ur_rtde uses pybind to generate Python bindings, and so does pinocchio for the most part. thus almost all the functions used are identical across languages, and so c++ implementations can be looked at to analyse python functionality as well
- matrix operations are done with Eigen in C++, and NumPy in Python
libraries used and their purpose
- ur_rtde for the client-side real-time interface for ur robots (we have a UR5e)
- pinocchio for dynamics intergration, and other robotics-related math on the client side
- gepetto for visualization (has nice integration with pinocchio)
- Dockerized ur simulator as a simulator (it's a bad simulator, but it uses the same robot-communication API as the real robot, making coding and testing easier)
contents of this repository
- basic documentation can be found in the docs directory: official UR documentation on the robot's capabilities and its interface, short instructions on installing Ubuntu, ur_rtde, pinocchio, gepetto and the simulator
- basic closed-loop inverse kinematics control is implemented in both C++ and python. the C++ version uses exponential coordinates and the Lie group formalism, while the Python version uses homogenious transformations and basic matrix operations
- robot description files: urdf containing both the arm and the gripper, and other urdf-related files
- more algorithms will be added over time
- documentation will be expanded according to demand
- some basic tests will be here as well, while full projects built on this repo will be in separate repos
installation and operating instructions
For all of the listed items, consult their specific documentation in the docs folder, and do your own googling. Note that for most items you can install through the ubuntu package manager apt, or through the python package manager pip. Likewise, you can compile the libraries and install from local files. Both options are OK, just make sure to select a stable release for local compilation (just in case). All compilation is standard the standard cmake-make combo: mkdir build && cd build && cmake .. && make , followed by sudo make install to install. Most likely you can just copy-paste the commands given in the library docs to install. If not, and you can't fix it yourself in a reasonable amount of time, send an email. It's highly recommended that you download the source code of these libraries so that you have access to it, and their examples. Looking around and running these examples is the best way to a) verify installation and b) get to know the libraries. Of course also follow this up with reading on their documentation.
Here is a checklist of what to do together with the key remarks.
- install ubuntu on metal, i.e. do a real install on your machine. if you want to play around with virtual machines, or compile all the libraries on windows or something else, this is OK, but proceed at your own risk and with less support
- install ur_rtde https://gitlab.com/sdurobotics/ur_rtde
- create a fixed ip connection to verify that you can connect to the robot. create a new Ethernet connection, and under IPv4 setting put 192.168.1.101 as the host (your) address, 255.255.255.0 under netmask and 192.168.1.1 as gateway (just in case). the robot's ip is fixed to 192.168.1.102. connect to the network once you've created it. put the robot's IP into the examples given in ur_rtde and verify the connection (select an example with the robot moving and see that it moves).
- install pinocchio: https://gepettoweb.laas.fr/doc/stack-of-tasks/pinocchio/master/doxygen-html/index.html , https://stack-of-tasks.github.io/pinocchio/download.html , https://github.com/stack-of-tasks/pinocchio .
- compile and run click in this repo. note to run gepetto-gui if you want visualization
- run clik.py
- install docker and the simulator. change flags in the code to simulation, go to the local website to see the teacher pendant emulation and put 127.0.0.1 as the ip, and see whether the code works. the simulator accepts the same commands as the robot. the only TODO is to add the gripper to the simulator somehow, but you can also just skip using it when simulating.
TODO:: explain hom transf mat