Skip to content

Commit 04e3f28

Browse files
authored
Merge pull request #69 from MikeDegany/fix-docs-issue-67
docs: improve grammar and formatting in world visualization documentation
2 parents afaf227 + e93323b commit 04e3f28

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

doc/1_world_visualization/1_world_visualization.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# 1. World Visualization
2-
In this chapter, I'm gonna explain about a program to define a world coordinate as an environment where a vehicle can move. The program can display a x-y world coordinates and manage each objects which exist on the world.
2+
In this chapter, I'm going to explain a program to define a world coordinate as an environment where a vehicle can move. The program can display x-y world coordinates and manage each object that exists in the world.
33

44
## 1.1 Visualization class
5-
All classes for world visualization is located at a directory, "src/components/visualization". Firstly, I'm gonna introduce a global x-y coordinate visualization class as follow.
5+
All classes for world visualization are located in a directory, `src/components/visualization`. Firstly, I'm going to introduce a global x-y coordinate visualization class as follows.
66
[global_xy_visualizer.py](/src/components/visualization/global_xy_visualizer.py)
77
```python
88
"""
@@ -40,10 +40,10 @@ class GlobalXYVisualizer:
4040
self.show_plot = True
4141
self.show_zoom = show_zoom
4242
```
43-
This class need to import matplotlib.pyplot and animation to display data plots and an animation. In "__init__" method, an empty "objects" list is defined. Each objects which are located in the world are stored into this list.
43+
This class needs to import `matplotlib.pyplot` and `animation` to display data plots and an animation. In `__init__` method, an empty `objects` list is defined. Objects that are located in the world are stored in this list.
4444

4545
### 1.1.1 MinMax class
46-
"x_lim" and "y_lim" are objects of MinMax class. This class defines limitation of x/y axis. These objects are used to set a size of world visualization.
46+
`x_lim` and `y_lim` are objects of `MinMax` class. This class defines the limits of the x/y axes. These objects are used to set the size of the world visualization.
4747
[min_max.py](/src/components/visualization/min_max.py)
4848
```python
4949
"""
@@ -83,7 +83,7 @@ class MinMax:
8383
```
8484

8585
### 1.1.2 TimeParameters class
86-
"time_params" is an object of TimeParameters class to manage the visualization time.
86+
`time_params` is an object of `TimeParameters` class to manage the visualization time.
8787
[time_parameters.py](/src/components/visualization/time_parameters.py)
8888
```python
8989
"""
@@ -141,10 +141,10 @@ class TimeParameters:
141141
```
142142

143143
### 1.1.3 Other member variables
144-
"gif_name" is a string object for saving the animation's gif file. A boolean, "show_plot" is used to switch displaying or not displaying the visualization's figure window when unit test is executed. While the test is running, the figure window should not be displayed to continue the test. "show_zoom" is deciding to limit the size of visualization area until around of the vehicle or the maximum size of world.
144+
`gif_name` is a string object for saving the animation's gif file. The boolean `show_plot` is used to toggle whether the visualization's figure window is displayed when a unit test is executed. While the test is running, the figure window should not be displayed to continue the test. `show_zoom` determines whether to limit the visualization area to the vicinity of the vehicle or to show the full world.
145145

146146
### 1.1.4 Member methods
147-
A member method, "add_object()" is defined to add each objects which is located in the world. An object can be added to the objects list by calling this method.
147+
The member method `add_object()` is defined to add objects that are located in the world. An object can be added to the `objects` list by calling this method.
148148
```python
149149
def add_object(self, obj):
150150
"""
@@ -155,7 +155,7 @@ A member method, "add_object()" is defined to add each objects which is located
155155
self.objects.append(obj)
156156
```
157157

158-
A member method, "not_show_plot()" is defined not to display the figure window of the visualization. This method can be used when the unit test is executed.
158+
A member method, `not_show_plot()` is defined to prevent the figure window from being displayed of the visualization. This method can be used when the unit test is executed.
159159
```python
160160
def not_show_plot(self):
161161
"""
@@ -166,7 +166,7 @@ A member method, "not_show_plot()" is defined not to display the figure window o
166166
self.show_plot = False
167167
```
168168

169-
This member method, "update" is used to update each objects's data and draw the animation in the list periodically. For this process, each objects in the list must have "update" method and "draw" method.
169+
The member method `update` is used to periodically update each object's data and draw the animation. For this process, each object in the list must have an `update` method and a `draw` method.
170170
```python
171171
def update(self, i, elems, axes):
172172
"""
@@ -194,7 +194,7 @@ This member method, "update" is used to update each objects's data and draw the
194194
axes.set_ylim(self.y_lim.min_value(), self.y_lim.max_value())
195195
```
196196

197-
Finally, this "draw" method is defined to execute simulation including updating and visualization. If a specific name of gif file is set to "gif_name", the simulation's gif file will be created and saved instead of visualization.
197+
Finally, this `draw` method is defined to execute simulation including updating and visualization. If a specific GIF filename is assigned to `gif_name`, the simulation will be saved as a GIF file instead of being displayed.
198198
```python
199199
def draw(self):
200200
"""
@@ -231,7 +231,7 @@ Finally, this "draw" method is defined to execute simulation including updating
231231
```
232232

233233
## 1.2 Visualize empty world
234-
I prepared for [a sample progoram to visualize an empty world](/doc/1_world_visualization/visualize_world.py).
234+
I have prepared [a sample program to visualize an empty world](/doc/1_world_visualization/visualize_world.py).
235235
```python
236236
"""
237237
visualize_world.py
@@ -283,5 +283,5 @@ def main():
283283
if __name__ == "__main__":
284284
main()
285285
```
286-
You will be able to understand how to use the above world visualization class by reading the code. By executing this, you can see that an empty world simulation is visualized as follow.
286+
You will be able to understand how to use the above world visualization class by reading the code. By executing this, you can see that an empty world simulation is visualized as follows.
287287
![](/doc/1_world_visualization/visualize_world.gif)

0 commit comments

Comments
 (0)