Implementation of Real-Time Joint Controllers

  • Walter Fetter LagesEmail author
Part of the Studies in Computational Intelligence book series (SCI, volume 625)


This tutorial chapter explains the implementation of controllers in the Robot Operating System. The inner working of the ROS real-time loop is explained with discussion of the classes used to implement it. Contrariwise to most available examples of implementation of controllers in ROS, which show the use of single input, single output controllers using the proportional-integral-derivative control law, here controllers are approached in a more general sense, so that any control law can be used. A complete example of implementation of a MIMO nonlinear controller is presented using the computed torque control law. The real-time aspects of the problem are also considered and the controller is ready for running in hard-real-time with the PREEMPT_RT kernel patch. The source code of examples are available at public repositories to enable readers to experiment with the examples and adapt them to their robots.


Controller Real-time loop Non-linear controller Parameter identification Computed torque MIMO controller 


  1. 1.
    K.J. Åström, B. Wittenmark, Computer Controlled Systems—Theory and Design (Prentice-Hall, Englewood Cliffs, 1984)Google Scholar
  2. 2.
    WAM User Manual (Barrett Technology Inc., Cambridge, 2011)Google Scholar
  3. 3.
    H, Bruyninckx, Open robot control software: the orocos project, in Proceedings of the 2001 IEEE International Conference on Robotics and Automation, (IEEE Press, Seoul, 2001), pp. 2523–2528Google Scholar
  4. 4.
    A. Burns, A. Wellings, Real-Time Systems and Programming Languages, 3rd edn. (Addison-Wesley, Reading, 2001)Google Scholar
  5. 5.
    C.T. Chen, Linear System Theory and Design (Holt, Rinehart & Winston, New York, 1984)Google Scholar
  6. 6.
    R. Featherstone, Rigid Body Dynamics Algorithms (Springer, New York, 2008)CrossRefzbMATHGoogle Scholar
  7. 7.
    G.F. Frankin, J.D. Powell, M.L. Workman, Digital Control of Dynamic Systems, 2nd edn., Addison-Wesley Series in Electrical and Computer Engineering: Control Engineering (Addison-Wesley, Boston, 1989)Google Scholar
  8. 8.
    K.S. Fu, R.C. Gonzales, C.S.G. Lee, Robotics Control, Sensing, Vision and Intelligence, Industrial Engineering Series (McGraw-Hill, New York, 1987)Google Scholar
  9. 9.
  10. 10.
    Ioris, D., Lages, W.F., Santini, D.C.: Integrating the OROCOS framework and the barrett WAM robot, in Proceedings of the 5th Workshop on Applied Robotics and Automation. Sociedade Brasileira de Automática, (Bauru, 2012)Google Scholar
  11. 11.
    A. Isidori, Nonlinear Control Systems, 3rd edn. (Springer, Berlin, 1995)CrossRefzbMATHGoogle Scholar
  12. 12.
    H.K. Khalil, Nonlinear Systems, 2nd edn. (Prentice-Hall, Upper Saddle River, 1996)Google Scholar
  13. 13.
    N, Koenig, A, Howard, Design and use paradigms for gazebo, an open-source multi-robot simulator, in Proceedings of the 2004 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2004), Sep 2004, vol. 3 (IEEE Press, Sendai, 2004), pp. 2149–2154Google Scholar
  14. 14.
    W.F. Lages, D. Ioris, D. Santini, An architecture for controlling the barrett wam robot using ros and orocos, in Proceedings for the Joint Conference of 45th International Symposium on Robotics and 8th German Conference on Robotics (VDE Verlag, Munich, Germany, 2014). ISBN: 978-3-8007-3601-0Google Scholar
  15. 15.
    J.Y.T. Leung, J. Whitehead, On the complexity of fixed-priority scheduling of periodic, real-time tasks. Perform. Eval. 2(4), 237–250 (1982)CrossRefMathSciNetzbMATHGoogle Scholar
  16. 16.
    C.L. Liu, J.W. Layland, Scheduling algorithms for multiprogramming in a hard-real-time environment. J. ACM 20(1), 46–61 (1973)CrossRefMathSciNetzbMATHGoogle Scholar
  17. 17.
    Maciel, E.H., Henriques, R.V.B., Lages, W.F.: Control of a biped robot using the robot operating system, in Proceedings of the 6th Workshop on Applied Robotics and Automation (Sociedade Brasileira de Automática, São Carlos, SP, Brazil, 2014)Google Scholar
  18. 18.
    A. Martinez, E. Fernández, Learning ROS for Robotics Programming (Packt Publishing, Birmingham, 2013)Google Scholar
  19. 19.
    H. Nijmeijer, A. van der Schaft, Nonlinear Dynamical Control System (Springer, New York, 1990)CrossRefGoogle Scholar
  20. 20.
    K. Ogata, Modern Control Engineering (Prentice-Hall, Englewood Cliffs, 1970)Google Scholar
  21. 21.
    J.M. O’Kane, A Gentle Introduction to ROS. CreateSpace Independent Publishing Platform (2013), Accessed Oct 2013
  22. 22.
    Open Software Automation Development Lab: Osadl project: Realtime linux (2012),
  23. 23.
    M. Quigley, B. Gerkey, K. Conley, J. Faust, T. Foote, J. Leibs, E. Berger, R. Wheeler, Ng, A.: ROS: an open-source robot operating system, in Proceedings of the IEEE International Conference on Robotics and Automation, Workshop on Open Source Robotics, May 2009 (IEEE Press, Kobe, Japan, 2009)Google Scholar
  24. 24.
    D.C. Santini, W.F. Lages, An architecture for robot control based on the OROCOS framework, in Proceedings of the 4th Workshop on Applied Robotics and Automation. (Sociedade Brasileira de Automática, Bauru, SP, Brazil, 2010)Google Scholar
  25. 25.
    J.J.E. Slotine, W. Li, Applied Nonlinear Control (Prentice-Hall, Englewood Cliffs, 1991)zbMATHGoogle Scholar
  26. 26.
    I.A. Sucan, S. Chitta, MoveIt! (2015),

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  1. 1.Federal University of Rio Grande Do SulPorto AlegreBrazil

Personalised recommendations