Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering ROS for Robotics Programming

You're reading from  Mastering ROS for Robotics Programming

Product type Book
Published in Dec 2015
Publisher Packt
ISBN-13 9781783551798
Pages 480 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Lentin Joseph Lentin Joseph
Profile icon Lentin Joseph

Table of Contents (19) Chapters

Mastering ROS for Robotics Programming
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Introduction to ROS and Its Package Management Working with 3D Robot Modeling in ROS Simulating Robots Using ROS and Gazebo Using the ROS MoveIt! and Navigation Stack Working with Pluginlib, Nodelets, and Gazebo Plugins Writing ROS Controllers and Visualization Plugins Interfacing I/O Boards, Sensors, and Actuators to ROS Programming Vision Sensors using ROS, Open-CV, and PCL Building and Interfacing Differential Drive Mobile Robot Hardware in ROS Exploring the Advanced Capabilities of ROS-MoveIt! ROS for Industrial Robots Troubleshooting and Best Practices in ROS Index

Chapter 5. Working with Pluginlib, Nodelets, and Gazebo Plugins

In the previous chapter, we have discussed about the interfacing and simulation of the robotic arm mobile robot to the ROS MoveIt! and Navigation stack. In this chapter, we will see some of the advanced concepts in ROS such as the ROS pluginlib, nodelets, and Gazebo plugins. We will discuss the functionalities and applications of each concept and will look at an example to demonstrate it's working. We have used Gazebo plugins in the previous chapters to get the sensor and robot behavior inside the Gazebo simulator. In this chapter, we are going to see how to create it. We will also discuss an modified form of ROS nodes called ROS nodelets. These features in ROS are implemented using a plugin architecture called pluginlib.

In this chapter, we will discuss the following topics:

  • Understanding pluginlib

  • Implementing a sample plugin using pluginlib

  • Understanding ROS nodelets

  • Implementing a sample nodelet

  • Understanding and creating a Gazebo...

Understanding pluginlib


Plugins are a commonly used term in the computer world. Plugins are modular piece of software which can add a new feature to the existing software application. The advantage of plugins are that we don't need to write all the features in a main software; instead, we can make an infrastructure on the main software to accept new plugins to it. Using this method, we can extend the capabilities of software to any level.

We need plugins for our robotics application too. When we are going to build a complex ROS based application for a robot, plugins will be a good choice to extend the capabilities of the application.

The ROS system provides a plugin framework called pluginlib to dynamically load/unload plugins, which can be a library or class. pluginlib is a set of a C++ library, which helps to write plugins and load/unload whenever we need.

Plugin files are runtime libraries such as shared objects (.so) or dynamic link libraries (.DLL), which is built without linking to...

Understanding the Gazebo plugins


Gazebo plugins help us to control the robot models, sensors, world properties, and even the way Gazebo runs. Similar to pluginlib and nodelets, Gazebo plugins are a set of C++ code, which can be dynamically loaded/unloaded from the Gazebo simulator.

Using plugins we can access all the components of Gazebo, and also it is independent of ROS, so that it can share with people who are not using ROS too. We can mainly classify the plugins as follows:

  • The world plugin: Using the world plugin, we can control the properties of a specific world in Gazebo. We can change the physics engine, the lighting, and other world properties using this plugin.

  • The model plugin: The model plugin is attached to a specific model in Gazebo and controls its properties. The parameters such as joint state of the model, control of the joints, and so, on can be controlled using this plugin.

  • The sensor plugin: The sensor plugins are for modeling sensors such as camera, IMU, and so on, in...

Questions


  1. What is pluginlib and what are its main applications?

  2. What is the main application of nodelets?

  3. What are the different types of Gazebo plugins?

  4. What is the function of the model plugin in Gazebo?

Summary


In this chapter, we covered some advanced concepts such as the pluginlib, nodelets, and Gazebo plugins, which can be used to add more functionalities to a complex ROS application. We discussed the basics of pluginlib and saw an example using it. After covering pluginlib, we saw the ROS nodelets, which are widely used in high performance applications. Also, we saw an example using the ROS nodelets. Finally, we came to the Gazebo plugins that are used to add functionalities to Gazebo simulators. In the next chapter, we will discuss more on the RViz plugin and the ROS controllers.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Mastering ROS for Robotics Programming
Published in: Dec 2015 Publisher: Packt ISBN-13: 9781783551798
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}