Ir al contenido principal

Webots - Robot Simulation

Fuzzy logic is based on the implementation of expert knowledge, using Si-Then control rules, which relate the controller input variables using linguistic terms. Therefore, a fuzzy controller contains an algorithm that is capable of converting a linguistic control strategy into an automatic control strategy.

Technology is advancing by leaps and bounds everyday and every day there are systems with more modern fuzzy controls. This is an expert system that generates a knowledge base that will give the system the ability to make decisions about the actions we want. Today many industries operate diffuse control in their factories, such as: robotic arm-controlled vehicle assemblers; that is, in robotics, thanks to the diffuse controller, great progress has been made. With reference to this, we will use this knowledge and implement it in a tool called Webots, an ideal tool for simulating different objects to demonstrate their operation.
 


Fuzzy Logic:



Fuzzy logic is a form of multi-value logic in which the truth values ​​of variables can be any real number between 0 and 1, inclusive. It is used to handle the concept of partial truth, where the truth value can vary between completely true and completely false. In contrast, in Boolean logic, the truth values ​​of variables can only be integer values ​​0 or 1.

The inference methods for this rule base must be simple, versatile, and efficient. The results of these methods are a final area, the result of a set of overlapping areas (each area is the result of an inference rule). To choose a specific output from so many fuzzy premises, the most used method is the centroid, in which the final output will be the center of gravity of the resulting total area.

The rules available to the inference engine of a fuzzy system can be formulated by experts or learned by the system itself, making use in this case of neural networks to strengthen future decision-making.

The input data is usually collected by sensors that measure the input variables of a system. The inference engine is based on fuzzy chips, which are exponentially increasing their rule processing capacity year by year.

A typical operating scheme for a fuzzy system could be as follows:



Webots:



Webots is a free and open-source 3D robot simulator used in industry, education and research.

The Webots project started in 1996, initially developed by Dr. Olivier Michel at the Swiss Federal Institute of Technology (EPFL) in Lausanne, Switzerland and then from 1998 by Cyberbotics Ltd. as a proprietary licensed software. Since December 2018, it is released under the free and open-source Apache 2 license.

Webots includes a large collection of freely modifiable models of robots, sensors, actuators and objects. In addition, it is also possible to build new models from scratch or import them from 3D CAD software. When designing a robot model, the user specifies both the graphical and the physical properties of the objects. The graphical properties include the shape, dimensions, position and orientation, colors, and texture of the object. The physical properties include the mass, friction factor, as well as the spring and damping constants. Simple fluid dynamics is present in the software.

Webots uses a fork of the ODE (Open Dynamics Engine) for detecting of collisions and simulating rigid body dynamics. The ODE library allows one to accurately simulate physical properties of objects such as velocity, inertia and friction.

Webots includes a set of sensors and actuators frequently used in robotic experiments, e.g. lidars, radars, proximity sensors, light sensors, touch sensors, GPS, accelerometers, cameras, emitters and receivers, servo motors (rotational & linear), position and force sensor, LEDs, grippers, gyros, compass, IMU, etc.

The robot controller programs can be written outside of Webots in C, C ++, Python, ROS, Java and MATLAB using a simple API.

Webots offers the possibility to take screenshots and record simulations movies. Webots worlds are stored in cross-platform .wbt files which format is based on the VRML language. It is also possible to import and export Webots worlds or objects in the VRML format. Users can interact with a running simulation at any time, i.e., it is possible to move the robots and other object with the mouse while the simulation is running. Webots can stream a simulation on web browsers using WebGL.


Introductory Video



Explication

Explanation building a 4-wheeled cart using a fuzzy controller using the Webots tools


The first thing that was done for the elaboration of the robot was using the following components of the tool:
  • The background of the stage
  • One directional light
  • A circular arena with a radius of 3m.
  • A circular arena with a radius of 3m.A robot structure that will be made up of the following components: two solids, four HingleJoin, one shape and two distance sensors.

HingleJoin, one shape and two distance sensors. For each solid, there is a shape that is part of the robot's body. The four HingleJoin refers to the wheels of our robot that has inside a rotary motor so the robot can move.

A separate shape is the main body of the robot. And finally, the distance sensors that will be used will know when the robot will collide with the track or an obstacle.

It should be noted that all the mentioned components must have (physical) weight in order for them to interact, otherwise it is impossible.

For the obstacles we decided to occupy the following objects:

  • one soccer ball

  • three barrels of oil

  • two cardboard boxes

  • one glass bottle

  • two cans of soda

  • one advertising board

The project operation consists of avoiding obstacles, with the car, for which a fuzzy controller made in Java with a Java library it’s called jFuzzyLogic was added. This showed us graphs of the speed of the car in real time using the sensors of distance that also inform when the cart will collide with an object and rotate it to avoid it. 


Extra:

To better visualize this process, it was decided to put a camera that recognizes the objects which the car will collide with. The recognition process will only be observed when the game is not running. To know the data of the object, all you have to do is place the pointer on the object as seen in the image.


If you want, you can see the elaborated fuzzy controller, as well as the folder with the complete project in the Github repository.

 

https://github.com/KevinGodoy98/Proyecto-Final-Sistemas-Expertos.git

 

The fuzzy controller was elaborated as follows:

 A vector was created that covered the four rotary motors, which advanced at a speed of (5.0) m/s.

We installed the distance sensors to observe the lowest value it reached and then we assigned a negative speed to the right wheel, so the car can turn and avoid the obstacle.


Demostration Video




Made By: 
    Kevin Godoy :         William Chabla:
                                
      
 


Comentarios