feat: spawn Yahboom vehicle in Gazebo

This commit is contained in:
2026-09-22 10:28:55 +09:00
parent 14580aaa88
commit a5e4bd44fb
@@ -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: 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', '') existing_model_path = os.environ.get('GAZEBO_MODEL_PATH', '')
return [ return [
@@ -420,7 +427,7 @@ def launch_gazebo(context):
executable='spawn_entity.py', executable='spawn_entity.py',
arguments=[ arguments=[
'-entity', entity_name, '-entity', entity_name,
'-file', model_path, *model_arguments,
'-x', spawn_x, '-x', spawn_x,
'-y', spawn_y, '-y', spawn_y,
'-z', '0.01', '-z', '0.01',