Skip to content

Commit 7098a4a

Browse files
committed
Remove old launchers and worlds
1 parent 9545d15 commit 7098a4a

12 files changed

Lines changed: 72 additions & 660 deletions

Launchers/ackermann_logistic_robot_harmonic/spawn_robot.launch.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

Launchers/amazon_robot_harmonic/spawn_robot.launch.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

Launchers/warehouse1_amazon_robot_harmonic.launch.py renamed to Launchers/warehouse1.launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def generate_launch_description():
1717

1818
gazebo_models_path = os.path.join(package_dir, "models")
1919

20-
world_file_name = "warehouse1_harmonic.world"
20+
world_file_name = "warehouse1.world"
2121
worlds_dir = "/opt/jderobot/Worlds"
2222
world_path = os.path.join(worlds_dir, world_file_name)
2323

Launchers/warehouse1_ackermann_logistic_robot_harmonic.launch.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

Launchers/warehouse2.launch.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import os
2+
3+
from ament_index_python.packages import get_package_share_directory
4+
from launch import LaunchDescription
5+
from launch.actions import (
6+
IncludeLaunchDescription,
7+
SetEnvironmentVariable,
8+
AppendEnvironmentVariable,
9+
)
10+
from launch.launch_description_sources import PythonLaunchDescriptionSource
11+
from launch_ros.actions import Node
12+
13+
14+
def generate_launch_description():
15+
package_dir = get_package_share_directory("custom_robots")
16+
ros_gz_sim = get_package_share_directory("ros_gz_sim")
17+
18+
gazebo_models_path = os.path.join(package_dir, "models")
19+
20+
world_file_name = "warehouse2.world"
21+
worlds_dir = "/opt/jderobot/Worlds"
22+
world_path = os.path.join(worlds_dir, world_file_name)
23+
24+
gazebo_server = IncludeLaunchDescription(
25+
PythonLaunchDescriptionSource(
26+
os.path.join(ros_gz_sim, "launch", "gz_sim.launch.py")
27+
),
28+
launch_arguments={
29+
"gz_args": ["-s -v4 ", world_path],
30+
"on_exit_shutdown": "true",
31+
}.items(),
32+
)
33+
34+
world_entity_cmd = Node(
35+
package="ros_gz_sim",
36+
executable="create",
37+
arguments=["-name", "world", "-file", world_path],
38+
output="screen",
39+
)
40+
41+
ld = LaunchDescription()
42+
43+
ld.add_action(SetEnvironmentVariable("GZ_SIM_RESOURCE_PATH", gazebo_models_path))
44+
set_env_vars_resources = AppendEnvironmentVariable(
45+
"GZ_SIM_RESOURCE_PATH", os.path.join(package_dir, "models")
46+
)
47+
ld.add_action(set_env_vars_resources)
48+
49+
ld.add_action(gazebo_server)
50+
ld.add_action(world_entity_cmd)
51+
52+
return ld

Launchers/warehouse2_ackermann_logistic_robot_harmonic.launch.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

Launchers/warehouse2_amazon_robot_harmonic.launch.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)