From a5e4bd44fbf9d7a0ef87ff517631d39921684f5e Mon Sep 17 00:00:00 2001 From: chyoo Date: Tue, 22 Sep 2026 10:28:55 +0900 Subject: [PATCH] feat: spawn Yahboom vehicle in Gazebo --- .../launch/simulator.launch.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/nav2_turtlebot_simulator/launch/simulator.launch.py b/src/nav2_turtlebot_simulator/launch/simulator.launch.py index 05d5187..c11b437 100644 --- a/src/nav2_turtlebot_simulator/launch/simulator.launch.py +++ b/src/nav2_turtlebot_simulator/launch/simulator.launch.py @@ -399,8 +399,15 @@ def launch_gazebo(context): ], ), ] + elif platform == 'yahboom': + entity_name = 'yahboom_gazebo' + model_directory = '/usr/share/gazebo-11/models' + static_transforms = [] else: - raise RuntimeError('platform must be turtlebot3 or mkmini') + raise RuntimeError('platform must be turtlebot3, mkmini or yahboom') + + model_arguments = (['-topic', '/yahboom/robot_description', '-timeout', '120'] + if platform == 'yahboom' else ['-file', model_path]) existing_model_path = os.environ.get('GAZEBO_MODEL_PATH', '') return [ @@ -420,7 +427,7 @@ def launch_gazebo(context): executable='spawn_entity.py', arguments=[ '-entity', entity_name, - '-file', model_path, + *model_arguments, '-x', spawn_x, '-y', spawn_y, '-z', '0.01',