Skip to content

Commit ed44895

Browse files
authored
Update car_junction.launch.py
1 parent f2e5d4f commit ed44895

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

Launchers/car_junction.launch.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,10 @@
1010

1111
def generate_launch_description():
1212

13-
# Set the path to the Gazebo ROS package
14-
pkg_gazebo_ros = FindPackageShare(package="gazebo_ros").find("gazebo_ros")
15-
16-
# Set the path to this package.
17-
pkg_share = FindPackageShare(package="custom_robots").find("custom_robots")
18-
19-
# Set the path to the world file
20-
world_file_name = "road_junction.world"
21-
world_path = os.path.join(pkg_share, "worlds", world_file_name)
22-
13+
custom_robots_share = get_package_share_directory("custom_robots")
14+
world_path = os.path.join(
15+
custom_robots_share, "worlds", "road_junction.world"
16+
)
2317
# Set the path to the SDF model files.
2418
gazebo_models_path = os.path.join(pkg_share, "models")
2519
os.environ[

0 commit comments

Comments
 (0)