-
Notifications
You must be signed in to change notification settings - Fork 558
add URMC 2025 gazebo world #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: humble
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| 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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| material checker | ||
| { | ||
| technique | ||
| { | ||
| pass | ||
| { | ||
| texture_unit | ||
| { | ||
| texture checker.png | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
| 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> |
| 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 | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
| 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> | ||
|
|
| 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 | ||
| } | ||
| } | ||
| } | ||
| } |
| 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> | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This hardcoded absolute path will break the model loading on any other machine. Please use a relative
Suggested change
|
||||||||||
| <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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
Suggested change
|
||||||||||
| <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> | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||
| <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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with
x_poseandy_pose, you should also add aDeclareLaunchArgumentfor the newyawparameter and add it to theLaunchDescription. This makes the launch file's arguments explicit and discoverable.