refactor: delegate MKMini Gazebo to simulator
This commit is contained in:
@@ -91,7 +91,9 @@ def build(context, *args, **kwargs):
|
|||||||
sim = (sim_mode == 'true')
|
sim = (sim_mode == 'true')
|
||||||
actions = []
|
actions = []
|
||||||
|
|
||||||
# (a) spawn: CARLA only. Gazebo simulator owns the TurtleBot3 entity.
|
# (a) CARLA is still owned by this module. Gazebo is owned by the
|
||||||
|
# dedicated NAV2-Gazebo module so both vehicle profiles use the same
|
||||||
|
# simulation boundary. Real-vehicle paths remain unchanged.
|
||||||
if sim and plan['simulator'] == 'carla':
|
if sim and plan['simulator'] == 'carla':
|
||||||
spawn_launch = os.path.join(pkg_share, 'launch', 'carla_spawn_hero.launch.py')
|
spawn_launch = os.path.join(pkg_share, 'launch', 'carla_spawn_hero.launch.py')
|
||||||
actions.append(IncludeLaunchDescription(
|
actions.append(IncludeLaunchDescription(
|
||||||
@@ -107,12 +109,6 @@ def build(context, *args, **kwargs):
|
|||||||
('spawn_imu', spawn_imu),
|
('spawn_imu', spawn_imu),
|
||||||
],
|
],
|
||||||
))
|
))
|
||||||
elif sim and plan['simulator'] == 'gazebo':
|
|
||||||
gazebo_launch = os.path.join(pkg_share, 'launch', 'mkmini_gazebo.launch.py')
|
|
||||||
actions.append(IncludeLaunchDescription(
|
|
||||||
PythonLaunchDescriptionSource(gazebo_launch),
|
|
||||||
launch_arguments=[('gui', gui)],
|
|
||||||
))
|
|
||||||
elif not sim:
|
elif not sim:
|
||||||
actions.append(Node(package='vehicle_pkg', executable='pub_clock',
|
actions.append(Node(package='vehicle_pkg', executable='pub_clock',
|
||||||
name='pub_clock', output='screen'))
|
name='pub_clock', output='screen'))
|
||||||
|
|||||||
Reference in New Issue
Block a user