Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion turtlebot3_gazebo/launch/spawn_turtlebot3.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def generate_launch_description():
# Launch configuration variables specific to simulation
x_pose = LaunchConfiguration('x_pose', default='0.0')
y_pose = LaunchConfiguration('y_pose', default='0.0')
yaw = LaunchConfiguration('yaw', default='0.0')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with x_pose and y_pose, you should also add a DeclareLaunchArgument for the new yaw parameter and add it to the LaunchDescription. This makes the launch file's arguments explicit and discoverable.


# Declare the launch arguments
declare_x_position_cmd = DeclareLaunchArgument(
Expand All @@ -53,7 +54,8 @@ def generate_launch_description():
'-file', urdf_path,
'-x', x_pose,
'-y', y_pose,
'-z', '0.01'
'-z', '0.01',
'-Y', yaw
],
output='screen',
)
Expand Down
82 changes: 82 additions & 0 deletions turtlebot3_gazebo/launch/turtlebot3_urmc_2025.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#!/usr/bin/env python3
#
# Copyright 2019 ROBOTIS CO., LTD.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Authors: Joep Tool, Hyungyu Kim

import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration


def generate_launch_description():
launch_file_dir = os.path.join(get_package_share_directory('turtlebot3_gazebo'), 'launch')
pkg_gazebo_ros = get_package_share_directory('gazebo_ros')

use_sim_time = LaunchConfiguration('use_sim_time', default='true')
# x_pose = LaunchConfiguration('x_pose', default='-1.75')
# y_pose = LaunchConfiguration('y_pose', default='0.2')
# yaw = LaunchConfiguration('yaw', default='1.57')
Comment on lines +33 to +35

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This commented-out code should be removed to improve readability and maintainability.

x_pose = LaunchConfiguration('x_pose', default='0.2')
y_pose = LaunchConfiguration('y_pose', default='-1.8')
yaw = LaunchConfiguration('yaw', default='0')

world = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'worlds',
'turtlebot3_urmc_2025.world'
)

gzserver_cmd = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')
),
launch_arguments={'world': world}.items()
)

gzclient_cmd = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(pkg_gazebo_ros, 'launch', 'gzclient.launch.py')
)
)

robot_state_publisher_cmd = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(launch_file_dir, 'robot_state_publisher.launch.py')
),
launch_arguments={'use_sim_time': use_sim_time}.items()
)

spawn_turtlebot_cmd = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(launch_file_dir, 'spawn_turtlebot3.launch.py')
),
launch_arguments={
'x_pose': x_pose,
'y_pose': y_pose,
'yaw': yaw
}.items()
)

ld = LaunchDescription()
ld.add_action(gzserver_cmd)
ld.add_action(gzclient_cmd)
ld.add_action(robot_state_publisher_cmd)
ld.add_action(spawn_turtlebot_cmd)
return ld
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
material checker
{
technique
{
pass
{
texture_unit
{
texture checker.png
}
}
}
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions turtlebot3_gazebo/models/turtlebot3_urmc_2025/checker/model.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>

<model>
<name>checker</name>
<version>1.0</version>
<sdf version='1.6'>model.sdf</sdf>

<author>
<name>Gilbert</name>
<email>kkjong@robotis.com</email>
</author>

<description>
Model with links of simple shapes and texture applied.
</description>
</model>
30 changes: 30 additions & 0 deletions turtlebot3_gazebo/models/turtlebot3_urmc_2025/checker/model.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="checker">
<static>true</static>
<link name="box">
<pose>0 0 0 0 0 0</pose>
<collision name="collision">
<geometry>
<box>
<size>0.02 1 1</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.02 1 1</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_urmc_2025/checker/materials/scripts</uri>
<uri>model://turtlebot3_urmc_2025/checker/materials/textures</uri>
<name>checker</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
material course
{
technique
{
pass
{
texture_unit
{
texture course.png
}
}
}
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions turtlebot3_gazebo/models/turtlebot3_urmc_2025/course/model.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>

<model>
<name>course</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>
<author>
<name>sdq</name>
<email>test@gmail.com</email>
</author>

<description>
A simple textured ground plane
</description>
</model>

42 changes: 42 additions & 0 deletions turtlebot3_gazebo/models/turtlebot3_urmc_2025/course/model.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="course">
<static>true</static>
<link name="course_link">
<collision name="course_collision">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>4 4</size>
</plane>
</geometry>
<surface>
<friction>
<ode>
<mu>100</mu>
<mu2>50</mu2>
</ode>
</friction>
</surface>
</collision>
<visual name="course_visual">
<cast_shadows>false</cast_shadows>
<geometry>
<plane>
<normal>0 0 1</normal>
<size>4 4</size>
</plane>
</geometry>
<material>
<script>
<!--uri>file://materials/scripts/floor.material</uri-->
<uri>model://turtlebot3_urmc_2025/course/materials/scripts</uri>
<uri>model://turtlebot3_urmc_2025/course/materials/textures</uri>
<name>course</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
material piste_droit
{
technique
{
pass
{
texture_unit
{
texture test_bande.png
scale 1 1
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" ?>
<model>
<name>PIste_droite_texture</name>
<version>1.0</version>
<sdf version="1.7">model.sdf</sdf>
<author>
<name></name>
<email></email>
</author>
<description></description>
</model>
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version='1.0'?>
<sdf version='1.7'>
<model name='PIste_droite_texture'>
<link name='link_0'>
<inertial>
<mass>1</mass>
<inertia>
<ixx>0.166667</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.166667</iyy>
<iyz>0</iyz>
<izz>0.166667</izz>
</inertia>
<pose>0 0 0 0 -0 0</pose>
</inertial>
<pose>0 0 0 0 -0 0</pose>
<gravity>1</gravity>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<enable_wind>0</enable_wind>
<visual name='visual'>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<uri>/home/alexis/Téléchargements/piste_droit_texture.dae</uri>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This hardcoded absolute path will break the model loading on any other machine. Please use a relative model:// URI. The referenced file piste_droit_texture.dae also does not appear to be included in this pull request. It should be added to the model's directory, for example, under a meshes subfolder.

Suggested change
<uri>/home/alexis/Téléchargements/piste_droit_texture.dae</uri>
<uri>model://PIste_droite_texture/meshes/piste_droit_texture.dae</uri>

<scale>0.02 0.02 0.02</scale>
</mesh>
</geometry>
<material>
<lighting>1</lighting>
<script>
<url>model://Piste_droite_texture/materials/scripts</url>
<url>model://Piste_droite_texture/materials/textures</url>
Comment on lines +33 to +34

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The model URI for scripts and textures seems incorrect. Based on other models in this PR, it should probably include the parent directories from the models folder, like model://turtlebot3_urmc_2025/meshes/PIste_droite_texture/... to be resolved correctly by Gazebo.

Suggested change
<url>model://Piste_droite_texture/materials/scripts</url>
<url>model://Piste_droite_texture/materials/textures</url>
<url>model://turtlebot3_urmc_2025/meshes/PIste_droite_texture/materials/scripts</url>
<url>model://turtlebot3_urmc_2025/meshes/PIste_droite_texture/materials/textures</url>

<name>piste_droit</name>
</script>
<shader type='pixel'>
<normal_map>__default__</normal_map>
</shader>
<ambient>0.3 0.3 0.3 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
</material>
<transparency>0</transparency>
<cast_shadows>1</cast_shadows>
</visual>
<collision name='collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<uri>/home/alexis/Téléchargements/piste_droit_texture.dae</uri>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This hardcoded absolute path will break the model loading on any other machine. Please use a relative model:// URI.

Suggested change
<uri>/home/alexis/Téléchargements/piste_droit_texture.dae</uri>
<uri>model://PIste_droite_texture/meshes/piste_droit_texture.dae</uri>

<scale>0.02 0.02 0.02</scale>
</mesh>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
<torsional>
<coefficient>1</coefficient>
<patch_radius>0</patch_radius>
<surface_radius>0</surface_radius>
<use_patch_radius>1</use_patch_radius>
<ode>
<slip>0</slip>
</ode>
</torsional>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<static>1</static>
<allow_auto_disable>1</allow_auto_disable>
</model>
</sdf>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" ?>
<model>
<name>Parking_1</name>
<version>1.0</version>
<sdf version="1.7">model.sdf</sdf>
<author>
<name></name>
<email></email>
</author>
<description></description>
</model>
Loading