ROS Introduction
ROS is an open source meta operating system for robots. It provides the services that the operating system should have, including hardware abstraction, low-level device control, implementation of common functions, message passing between processes, and package management. It also provides the tools and library functions needed to obtain, compile, write, and run code across computers.
The "graph" of ROS runtime is a loosely coupled point-to-point process network based on ROS communication infrastructure. ROS implements several different communication methods, including synchronous RPC based services, topics based on asynchronous streaming media data, and parameter servers for data storage.
ROS is not a real-time framework, but it can embed real-time programs. Willow Garage's PR2 robot uses a type of robot called pr2_ The system of etherCAT sends or receives ROS messages in real time. ROS can also be seamlessly integrated with the Orocos real-time toolkit.
1 Design objectives and characteristics of ROS
Many people are asking "What is the difference between ROS and other robot software platforms?" This is a difficult question to answer. Because ROS is not a framework that integrates most functions or features. In fact, the main goal of ROS is to provide code reuse support for robot research and development. ROS is a distributed process (that is, node) framework. These processes are encapsulated in packages and function packages that are easy to share and release. ROS also supports a joint system similar to the code repository, which can also realize project collaboration and release. This design can make the development and implementation of a project completely independent from the file system to the user interface (not limited by ROS). At the same time, all projects can be integrated by the basic tools of ROS.
In order to support the main goal of sharing and collaboration, the ROS framework has several other features:
- Simplicity: ROS should be designed as simple as possible, so that the code written for ROS can be used with other robot software frameworks. The inevitable conclusion is that ROS can be easily integrated in other robot software platforms: ROS can already be integrated with OpenRAVE, Orocos and Player.
- ROS insensitive library: The preferred development model of ROS is written with clean library functions that do not depend on ROS.
- Language independence: The ROS framework can be implemented simply using any modern programming language. Ros has implemented Python version, C++version and Lisp version. At the same time, it also has Java and Lua versions of the experimental library.
- Loose coupling: The function modules in the ROS are encapsulated in independent function packages or meta function packages for sharing. The modules in the function packages run on a node by node basis, and the ROS standard IO is used as the interface. Developers do not need to pay attention to the internal implementation of the modules. As long as they understand the interface rules, they can realize reuse and realize the point-to-point loose coupling connection between modules
- Convenient testing: ROS has a built-in unit/integration testing framework called rostest, which can easily install or uninstall test modules.
- Scalable: ROS can be applied to large runtime systems and large development processes.
- Free and open source: many developers, many feature packs
2 Why use ROS
Through ROS, we can realize the simulation control of the manipulator in the virtual environment.
We will realize the visualization of the mechanical arm through the rviz platform, and use a variety of ways to operate our mechanical arm; Through the moveit platform to plan and execute the path of the robot arm, the robot arm can be controlled freely.
In the next chapter, we will learn how to control our products through the platform in ROS.