The second part is the main control loop of the hexacopter movement fuzzy con- trol system. Such a loop performs three main activities: i pre-processing phase, ii processing of five distinct fuzzy controllers, iii post-processing phase.
- Awakening the Entrepreneur Within: How Ordinary People Can Create Extraordinary Companies.
- A Journey in the World of the Tantras;
- Shop by category.
- Robot Operating System (ros): The Complete Reference (volume 1);
- The Gale Encyclopedia Of Childrens Health: Infancy Through Adolescence?
- Neanderthals in the Levant : behavioral organization and the beginnings of human modernity;
- System Engineering for IMS Networks.
These activities are discussed in Sect. Moreover, the execution frequency of loop iter- ations is 10 Hz. The 10 Hz timing requirement has been arbitrarily defined and has been demonstrated to be enough to control a simulated hexacopter as discussed in Sect.
However, it is important to highlight that a more careful and sound timing analysis is required in order to define the execution frequency of the main control loop for a real hexacopter. A discussion on such an issue is out of this chapter scope. Interested reader should refer to [19, ]. The pre-processing phase is responsible for acquiring data from the input sensors, processing the input movement commands, as well as for calculating the controlled data used as input to the five fuzzy controllers.
Two examples of data calculated in this phase are: i vertical and horizontal speed calculated using the hexacopter displacement over time; and ii the drift of new heading angle in comparison with the actual heading. Once the pre-processing phase is executed, the second activity is responsi- ble to execute the five fuzzy controllers. This occurs by means of invoking the fuzzifying method of each controller FuzzySet object.
The fuzzify- ing process includes fuzzyfication, rules inference, and defuzzification see Sect. The last activity is the post-processing phase. In this phase the output linguistic variables are transformed in raw values that are applied on the rotors in order to control the hexacopter movements. Finally, it is worth mentioning that the main controller interacts with other two applications. A command interface application named Panel sends commands to determine a new position, as well as new heading direction, towards which the hexa- copter must fly.
Moreover, some data produced in the main controller are published so that these telemetry data can be seen within an application named Telemetry. List- ing 1. Next sections provide detail on these two applica- tions. The command interface application named Panel is a ROS node that allows a user to send commands to modify hexacopter pose and position. Two types of commands are allowed: i the user can set a new X, Y, Z position, and hence, the hexacopter will fly towards this target position; ii the user can set a new heading direction by setting a new X, Y position, and hence, the hexacopter will perform a yaw movement in order to aim the target position.
The Panel application is very simple: it publishes a setpoint position and a view direction, as well as provides means for user input. The Panel application must be executed with the rosrun command as depicted in line 01 from Listing 1. In the example presented in lines from Listing 1. It is important to mention that the values for X, Y, Z coordinates are measured in meters. After sending the new setpoints, the hexacopter starts moving. The Telemetry application is also a very simple program.
It receives the signals from the hexacopter sensors and from some data calculated during the execution of the control program.
- Call for Chapters: SPRINGER BOOK ROBOT OPERATING SYSTEM (ROS) - (VOLUME 4) - General - ROS?
- Comparative Effectiveness Research?
- Robot Operating System (ROS): The Complete Reference (Volume 1)?
Likewise the Panel application, the Telemetry application is executed with the rosrun command as depicted in line 01 from Listing 1. The telemetry data is shown in lines Telemetry application is a very simple program. It subscribes some ROS topics and displays them on the terminal. The main part of the code is the declaration of ROS subscribers and callback functions.
Callback functions declaration is depicted in line , while ROS subscribers in line A common tool used during the design of control systems is the simulator. There is a number of different simulators available for using, e. Simulink, Gazebo and Stage. In special, for robotics control systems design, a virtual environment for simulation must allow the creation of objects and also the specification of some of the physical parameters for both objects and the environment. The virtual environment should also provide a programming interface to control not only the simulation, but also the objects behavior and the time elapsed in simulation.
An overview on V-REP virtual simulation environment is presented, so that the reader can understand how a virtual hexacopter was created. V-REP uses the Lua language  to implement scripts that access and control the simulator.
Robot operating system (ROS): the complete reference, (Volume 1) | University of Auckland
Lua is quite easy to learn, and hence, only a few necessary instructions are presented herein. V-REP documentation is extensive, and hence, the interested reader should refer to . The installation of the V-REP simulator on Linux is simple: the reader must download the compressed installation file from Coppelia Robotics website  and expand it on a directory using the UNIX tar command. The scene files extension is ttt. When V-REP is started, a blank scenario is open automatically for using. The user can start developing a new scenario, or open a scenario created previously, or open a scenario from scenes directory.
Figure 16 shows a screenshot. A com- plex object like a hexacopter is built by putting objects under a hierarchic structure. For instance, the sensors such as GPS, gyroscope and accelerometer are under the HexacopterPlus object. During the simulation execution, if the HexacopterPlus or any subpart, is moved, all parts are moved as if they are a single object.
Robot Operating System (Ros): The Complete Reference (Volume 1)
Any primitive object, e. There are some especial objects such as joints, video sensors, force sensors, and other. The special objects have some specific attributes used during simulation, e. The sensors and rotors are made from these kinds of objects.
The user can get some already available devices from Model Browser. For instance, there are several sensors available in the Model Browser components sensors, e. The last three sensors were used in the hexacopter model. It is important to mention that when a new robot is created, one must pay attention to the orientation between the robot body and its subparts, especially sensors.
Shop with confidence
Sensors will not work properly whether there are inconsistencies in the parts orientation. When one clicks on any object, the 3D axes of the selected object body orientation is depicted. The camera sensor is an exception. Such a situation leads to an issue: Z-axis of the camera matches with the X-axis of the robot. Thus, the camera X-axis matches the robot Y-axis, and the camera Y-axis matches the robot Z-axis. Such a difference can be seen by clicking on vCamera and hexacopter object while pressing the shift key at the same time.
In addition, one can observe that some objects have an icon to edit its Lua script code, as shown at Fig. If the object does not have a piece of code, it is possible to add one by the right-clicking on the object and choosing Add Associated child script Non Threaded or Threaded.
ISBN 13: 9783319260525
While a simulation is running, V-REP executes the scripts associated to each object throughout the main internal loop. Script execution can be run in separate thread whether the associated script is indicated as threaded. V-REP controls the simulation elapsing time by means of time parameters. This will ensure a suitable simulation speed. V-REP provides a plugin infrastructure that allows the engineer customize the sim- ulation tool.
The V-REP has several mechanisms to communicate with the user code: i tubes are similar to the UNIX pipe mechanism; ii signals are similar to global variables; iii wireless communication simulation; iv persistent data blocks; v custom Lua functions; vi serial port; vii LuaSocket; viii custom libraries, etc.