Skip to content
Snippets Groups Projects
Select Git revision
  • main default protected
  • rosification
  • refactoring
  • pp
  • mpc
  • realtimelogplotter
  • alv
  • gitlab_ci_podman
  • restructuring
  • viz_fix
10 results

ur_simple_control

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    m-guberina authored
    e16cc9aa
    History

    general info


    This is a software library for robot manipulator control. Its existance serves two main goals:

    1. to speed up the development, testing and deployment of new model-based control techniques
    2. to provide the introductory robot control software stack for engineers and engineering students

    These goals are achieved through the following. Its is designed to be as simple as possible, both in terms of logic and the total amount of code. Its skeleton provides only a common interface to both real and simulated robots, and a wrapper around control loops to be written by the users. It also provides basic control examples like inverse kinematics point to point motion, which serve both as usage examples, and as basic building blocks for higher level control.

    Here is some basic technical information:

    • code is developed on Arch Linux, also tested on Ubuntu 22, should work on any Linux
    • code is written in Python, will be re-written in C++ with Python bindings in the future
    • all of the robotics-related libraries are written in C++ with Python bindings
      • ur_rtde
      • pinocchio
      • crocoddyl (will be added in the near future)
    • if installing on own system install the latest python dependencies and it should work
    • currently only support UR5e, porting to YuMi and Panda is ongoing work
    • robot models are loaded via URDF
    • porting to new robots requires providing an interface to the robot (socket with a protocol) which contains functions for reading of the robot's state (joint positions, velocities, f/t sensor as vectors) and functions to send control inputs (joint velocities)
    • extensions for torque-controlled robots are ongoing
    • RobotManager will be turned into a base class from each robot type will inherit, overriding functions as necessary to accomodate different interfaces while keeping code readable

    contents of this repository


    example usage


    In the examples directory.

    the library


    • ur_simple_control package in python/ur_simple_control, core functionality in managers.py
    • robot description files in python/ur_simple_control/robot_descriptions :
      • UR5e with Robotiq Hand-e gripper: urdf containing both the arm and the gripper, and other urdf-related files
    • some basic controllers in python/ur_simple_control/basics
    • clik and extensions in python/ur_simple_control/clik
    • dmp in python/ur_simple_control/dmp
    • more algorithms will be added over time
    • visualization in python/ur_simple_control/visualize
    • some basic tests will be here as well, while full projects built on this repo will be in separate repos

    documentation


    • tutorials on linux, python and the library are in tutorials repository
    • basic documentation can be found in the docs directory
    • links to and basic information about the external resources are listed in the docs directory:
      • official UR documentation on the robot's capabilities and its interface
      • ur_rtde
      • pinocchio
      • short instructions on installing Ubuntu and the project Docker image
    • code is well documented and short and simple enough to be simple read to be understood
    • documentation will be expanded according to demand

    libraries used and their purpose


    • usual python libraries: numpy, matplotlib, tkinter (needed just for some of the visualization)
    • ur_rtde for the client-side real-time interface for Universal Robots robots (only UR5e is tested atm)
    • pinocchio for robot dynamics calculations
    • meshcat for visualization (has nice integration with pinocchio)
    • crocoddyl for optimal control
    • qpsolvers and ecos for QP formulation of IK
    • Dockerized ur simulator as a simulator -DOES NOT WORK ATM (it's a bad simulator, but it uses the same robot-communication API as the real robot, making coding and testing easier)
    • Docker is used for shipping

    connecting to the real robot


    • 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).
    • run clik.py to verify it works

    some TODOs


    • instead of using a debug argument and ifs for prints, use built-in python logging
    • implement and test other inverse kinematics algorithms
    • use pyproject.toml for python packaging. it actually brakes the current local install so it is avoided for now.
    • write all code in c++, make python bindings with pybind. have common documentation and examples
    • do the documentation with doxygen so that you get webpages from markdown as well
    • create a DMP from multiple trajectories (actually learn a DMP from multiple examples)