Modellsimulation in Webots und Simulationen mit ROS2: Unterschied zwischen den Versionen
Zeile 15: | Zeile 15: | ||
==== Creation of a 3D Model of a 4-Wheeled-Robot in Webots ==== | ==== Creation of a 3D Model of a 4-Wheeled-Robot in Webots ==== | ||
<br clear> | <br clear> | ||
[[Datei:4-Wheeled-Robot.png|thumb|links|mini| | [[Datei:4-Wheeled-Robot.png|thumb|links|mini|400px|Abb. 2 - 3D view of 4-Wheeled-Robot]] | ||
<br clear=all> | <br clear=all> | ||
A 4-Wheeled-Robot is created in Webots from scratch by following tutorial 6 in [https://cyberbotics.com/doc/guide/tutorial-6-4-wheels-robot?tab-language=python/ Cyberbotics]. The robot consists of a body, 4 wheels and two distance sensors(IR sensors). The figure above shows the 3D view of the end result. | A 4-Wheeled-Robot is created in Webots from scratch by following tutorial 6 in [https://cyberbotics.com/doc/guide/tutorial-6-4-wheels-robot?tab-language=python/ Cyberbotics]. The robot consists of a body, 4 wheels and two distance sensors(IR sensors). The figure above shows the 3D view of the end result. | ||
Zeile 21: | Zeile 21: | ||
'''Co-ordinate System''' | '''Co-ordinate System''' | ||
[[Datei:co-ordinates.png|thumb|links|mini| | [[Datei:co-ordinates.png|thumb|links|mini|400px|Abb. 3 - Co-ordinates]] | ||
<br clear=all> | <br clear=all> | ||
The co-ordinate system of the robot works exactly as the picture above depicts. The red arrow shows the X-axis and it defines the right and left of the robot. The green arrow shows the Y-axis and it can be used to move the robot upwards and downwards. The blue arrow is the Z-axis and it is related to forward and backward movement of the robot. By default the co-ordinates system is turned off in Webots. It can be turned on by following these steps: "''View >> Optional Rendering >> Show Coordinate System''" or by simply pressing "''Ctrl+F1''". | The co-ordinate system of the robot works exactly as the picture above depicts. The red arrow shows the X-axis and it defines the right and left of the robot. The green arrow shows the Y-axis and it can be used to move the robot upwards and downwards. The blue arrow is the Z-axis and it is related to forward and backward movement of the robot. By default the co-ordinates system is turned off in Webots. It can be turned on by following these steps: "''View >> Optional Rendering >> Show Coordinate System''" or by simply pressing "''Ctrl+F1''". | ||
'''Top View in a Grid''' | '''Top View in a Grid''' | ||
[[Datei:dimensions_grid.png|thumb|links|mini| | [[Datei:dimensions_grid.png|thumb|links|mini|400px|Abb. 4 - Top View]] | ||
<br clear=all> | <br clear=all> | ||
The figure above shows the top view of the robot. It is inside a grid to understand the dimensions of the robot. The dimension of the grid is 0.2 × 0.3 meters. | The figure above shows the top view of the robot. It is inside a grid to understand the dimensions of the robot. The dimension of the grid is 0.2 × 0.3 meters. | ||
'''High Level Representation''' | '''High Level Representation''' | ||
[[Datei:high_level_representation.png|thumb|links|mini| | [[Datei:high_level_representation.png|thumb|links|mini|400px|Abb. 5 - High Level Representation]] | ||
<br clear=all> | <br clear=all> | ||
The picture above depicts the high level representation of the 4 wheeled robot. Here [https://cyberbotics.com/doc/reference/robot?tab-language=python/ | The picture above depicts the high level representation of the 4 wheeled robot. Here, [https://cyberbotics.com/doc/reference/robot?tab-language=python/ Robot] is the base node. The Robot node has four [https://cyberbotics.com/doc/reference/hingejoint?tab-language=python/ HingeJoint] nodes. The HingeJoints are used as anchors to connect the wheels to the body of the robot. Each HingeJoint has a [https://cyberbotics.com/doc/reference/solid?tab-language=python/ Solid] node as endPoint. The Solid nodes are then modified into the wheels of the robot. | ||
'''Low Level Representation''' | '''Low Level Representation''' | ||
[[Datei:low_level_representation.png|thumb|links|mini| | [[Datei:low_level_representation.png|thumb|links|mini|700px|Abb. 6 - Low Level Representation]] | ||
<br clear=all> | <br clear=all> | ||
The figure above demonstrates the structure of the robot in details, how the 3D model is modeled in Weobts using the scene tree. | |||
'''Representation of a HingeJoint''' | |||
[[Datei:hingeJoint.png|thumb|links|mini|400px|Abb. 7 - HingeJoint]] | |||
=== Demo-Programs === | === Demo-Programs === |
Version vom 10. Februar 2022, 14:28 Uhr
Autoren: Arfat Kamal
Betreuer: Prof. Schneider
Art: Praxissemester
Projektlaufzeit: 02.11.2021-20.02.2022
Introduction
In order to simulate, a 3D model of a 4 wheeled robot is created inside Webots first. That robot is simulated with a controller which is written in C inside the text editor of Webots. That robot is later imported in Webots in Ubuntu and customised with a servo, an ultrasonic sensor and a caster wheel to resemble the Alphabot robot of our project. Finally, it is programmed with ROS2 and it runs in Webots as an obstacle avoiding robot.
Overview
Documentation
Creation of a 3D Model of a 4-Wheeled-Robot in Webots
A 4-Wheeled-Robot is created in Webots from scratch by following tutorial 6 in Cyberbotics. The robot consists of a body, 4 wheels and two distance sensors(IR sensors). The figure above shows the 3D view of the end result.
Co-ordinate System
The co-ordinate system of the robot works exactly as the picture above depicts. The red arrow shows the X-axis and it defines the right and left of the robot. The green arrow shows the Y-axis and it can be used to move the robot upwards and downwards. The blue arrow is the Z-axis and it is related to forward and backward movement of the robot. By default the co-ordinates system is turned off in Webots. It can be turned on by following these steps: "View >> Optional Rendering >> Show Coordinate System" or by simply pressing "Ctrl+F1".
Top View in a Grid
The figure above shows the top view of the robot. It is inside a grid to understand the dimensions of the robot. The dimension of the grid is 0.2 × 0.3 meters.
High Level Representation
The picture above depicts the high level representation of the 4 wheeled robot. Here, Robot is the base node. The Robot node has four HingeJoint nodes. The HingeJoints are used as anchors to connect the wheels to the body of the robot. Each HingeJoint has a Solid node as endPoint. The Solid nodes are then modified into the wheels of the robot.
Low Level Representation
The figure above demonstrates the structure of the robot in details, how the 3D model is modeled in Weobts using the scene tree.
Representation of a HingeJoint
Demo-Programs
Software
Summary
Weiterführende Links
→ zurück zum Hauptartikel: Praxissemester Projektteam WS2021