Skip to content

Commit 4fb205b

Browse files
committed
docs: add docstrings and remove unused imports in simple circuit launchers
1 parent 1eb1dc2 commit 4fb205b

6 files changed

Lines changed: 72 additions & 36 deletions

Launchers/simple_circuit.launch.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
"""Launch file for starting the simple circuit world in Gazebo with custom robots."""
2+
13
import os
24
from launch import LaunchDescription
35
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
4-
from launch.conditions import IfCondition, UnlessCondition
6+
from launch.conditions import IfCondition
57
from launch.launch_description_sources import PythonLaunchDescriptionSource
6-
from launch.substitutions import Command, LaunchConfiguration, PythonExpression
7-
from launch_ros.actions import Node
8+
from launch.substitutions import LaunchConfiguration
89
from launch_ros.substitutions import FindPackageShare
910

1011

1112
def generate_launch_description():
13+
"""Generate the launch description for starting the simple circuit world."""
1214

1315
# Set the path to the Gazebo ROS package
1416
pkg_gazebo_ros = FindPackageShare(package="gazebo_ros").find("gazebo_ros")
@@ -23,9 +25,9 @@ def generate_launch_description():
2325

2426
# Set the path to the SDF model files.
2527
gazebo_models_path = os.path.join(pkg_share, "models")
26-
os.environ[
27-
"GAZEBO_MODEL_PATH"
28-
] = f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
28+
os.environ["GAZEBO_MODEL_PATH"] = (
29+
f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
30+
)
2931

3032
########### YOU DO NOT NEED TO CHANGE ANYTHING BELOW THIS LINE ##############
3133
# Launch configuration variables specific to simulation

Launchers/simple_circuit_ackermann.launch.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
"""Launch file for the simple circuit Ackermann simulation using Gazebo."""
2+
13
import os
24
from launch import LaunchDescription
35
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
4-
from launch.conditions import IfCondition, UnlessCondition
6+
from launch.conditions import IfCondition
57
from launch.launch_description_sources import PythonLaunchDescriptionSource
6-
from launch.substitutions import Command, LaunchConfiguration, PythonExpression
7-
from launch_ros.actions import Node
8+
from launch.substitutions import LaunchConfiguration
89
from launch_ros.substitutions import FindPackageShare
910

1011

1112
def generate_launch_description():
13+
"""Generate the launch description for the simple circuit Ackermann simulation."""
1214

1315
# Set the path to the Gazebo ROS package
1416
pkg_gazebo_ros = FindPackageShare(package="gazebo_ros").find("gazebo_ros")
@@ -23,9 +25,9 @@ def generate_launch_description():
2325

2426
# Set the path to the SDF model files.
2527
gazebo_models_path = os.path.join(pkg_share, "models")
26-
os.environ[
27-
"GAZEBO_MODEL_PATH"
28-
] = f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
28+
os.environ["GAZEBO_MODEL_PATH"] = (
29+
f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
30+
)
2931

3032
########### YOU DO NOT NEED TO CHANGE ANYTHING BELOW THIS LINE ##############
3133
# Launch configuration variables specific to simulation

Launchers/simple_circuit_ackermann_followingcam.launch.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1+
"""
2+
Launch file for starting the simple circuit Ackermann simulation.
3+
4+
With following camera in Gazebo.
5+
"""
6+
17
import os
28
from launch import LaunchDescription
39
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
4-
from launch.conditions import IfCondition, UnlessCondition
10+
from launch.conditions import IfCondition
511
from launch.launch_description_sources import PythonLaunchDescriptionSource
6-
from launch.substitutions import Command, LaunchConfiguration, PythonExpression
7-
from launch_ros.actions import Node
12+
from launch.substitutions import LaunchConfiguration
813
from launch_ros.substitutions import FindPackageShare
914

1015

1116
def generate_launch_description():
17+
"""
18+
Generate the launch description for the simple circuit Ackermann simulation.
19+
20+
With following camera in Gazebo.
21+
"""
1222

1323
# Set the path to the Gazebo ROS package
1424
pkg_gazebo_ros = FindPackageShare(package="gazebo_ros").find("gazebo_ros")
@@ -23,9 +33,9 @@ def generate_launch_description():
2333

2434
# Set the path to the SDF model files.
2535
gazebo_models_path = os.path.join(pkg_share, "models")
26-
os.environ[
27-
"GAZEBO_MODEL_PATH"
28-
] = f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
36+
os.environ["GAZEBO_MODEL_PATH"] = (
37+
f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
38+
)
2939

3040
########### YOU DO NOT NEED TO CHANGE ANYTHING BELOW THIS LINE ##############
3141
# Launch configuration variables specific to simulation

Launchers/simple_circuit_followingcam.launch.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1+
"""
2+
Launch file for starting Gazebo with the simple circuit world.
3+
4+
The world with a following camera.
5+
"""
6+
17
import os
28
from launch import LaunchDescription
39
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
4-
from launch.conditions import IfCondition, UnlessCondition
10+
from launch.conditions import IfCondition
511
from launch.launch_description_sources import PythonLaunchDescriptionSource
6-
from launch.substitutions import Command, LaunchConfiguration, PythonExpression
7-
from launch_ros.actions import Node
12+
from launch.substitutions import LaunchConfiguration
813
from launch_ros.substitutions import FindPackageShare
914

1015

1116
def generate_launch_description():
17+
"""
18+
Generate the launch description for starting Gazebo with the simple circuit world.
19+
20+
with a following camera
21+
"""
1222

1323
# Set the path to the Gazebo ROS package
1424
pkg_gazebo_ros = FindPackageShare(package="gazebo_ros").find("gazebo_ros")
@@ -23,9 +33,9 @@ def generate_launch_description():
2333

2434
# Set the path to the SDF model files.
2535
gazebo_models_path = os.path.join(pkg_share, "models")
26-
os.environ[
27-
"GAZEBO_MODEL_PATH"
28-
] = f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
36+
os.environ["GAZEBO_MODEL_PATH"] = (
37+
f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
38+
)
2939

3040
########### YOU DO NOT NEED TO CHANGE ANYTHING BELOW THIS LINE ##############
3141
# Launch configuration variables specific to simulation

Launchers/simple_circuit_obstacles.launch.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
"""Launch file for starting Gazebo with the simple circuit obstacles world."""
2+
13
import os
24
from launch import LaunchDescription
35
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
4-
from launch.conditions import IfCondition, UnlessCondition
6+
from launch.conditions import IfCondition
57
from launch.launch_description_sources import PythonLaunchDescriptionSource
6-
from launch.substitutions import Command, LaunchConfiguration, PythonExpression
7-
from launch_ros.actions import Node
8+
from launch.substitutions import LaunchConfiguration
89
from launch_ros.substitutions import FindPackageShare
910

1011

1112
def generate_launch_description():
13+
"""Generate the launch description for the simple circuit obstacles world."""
1214

1315
# Set the path to the Gazebo ROS package
1416
pkg_gazebo_ros = FindPackageShare(package="gazebo_ros").find("gazebo_ros")
@@ -23,9 +25,9 @@ def generate_launch_description():
2325

2426
# Set the path to the SDF model files.
2527
gazebo_models_path = os.path.join(pkg_share, "models")
26-
os.environ[
27-
"GAZEBO_MODEL_PATH"
28-
] = f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
28+
os.environ["GAZEBO_MODEL_PATH"] = (
29+
f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
30+
)
2931

3032
########### YOU DO NOT NEED TO CHANGE ANYTHING BELOW THIS LINE ##############
3133
# Launch configuration variables specific to simulation

Launchers/simple_circuit_obstacles_followingcam.launch.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1+
"""
2+
Launch file for starting Gazebo with the simple circuit world.
3+
4+
The world with obstacles and following camera.
5+
"""
6+
17
import os
28
from launch import LaunchDescription
39
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
4-
from launch.conditions import IfCondition, UnlessCondition
10+
from launch.conditions import IfCondition
511
from launch.launch_description_sources import PythonLaunchDescriptionSource
6-
from launch.substitutions import Command, LaunchConfiguration, PythonExpression
7-
from launch_ros.actions import Node
12+
from launch.substitutions import LaunchConfiguration
813
from launch_ros.substitutions import FindPackageShare
914

1015

1116
def generate_launch_description():
17+
"""
18+
Generate the launch description for starting Gazebo with the simple circuit world.
19+
20+
With obstacles and a following camera.
21+
"""
1222

1323
# Set the path to the Gazebo ROS package
1424
pkg_gazebo_ros = FindPackageShare(package="gazebo_ros").find("gazebo_ros")
@@ -23,9 +33,9 @@ def generate_launch_description():
2333

2434
# Set the path to the SDF model files.
2535
gazebo_models_path = os.path.join(pkg_share, "models")
26-
os.environ[
27-
"GAZEBO_MODEL_PATH"
28-
] = f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
36+
os.environ["GAZEBO_MODEL_PATH"] = (
37+
f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(gazebo_models_path)}"
38+
)
2939

3040
########### YOU DO NOT NEED TO CHANGE ANYTHING BELOW THIS LINE ##############
3141
# Launch configuration variables specific to simulation

0 commit comments

Comments
 (0)