feat: add lms-nav2-gazebo-simulator module

This commit is contained in:
2026-07-28 10:35:22 +09:00
commit 0db91a16b8
160 changed files with 275895 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
build/
install/
log/
.colcon/
*.log
Executable
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
MODULE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
RUNTIME_ROOT="${AUTONOMY_STUDIO_RUNTIME_ROOT:-$HOME/autonomy-studio/runtime/nav2}"
exec bash "$RUNTIME_ROOT/docker/docker_build_nav2.sh" "$(dirname "$MODULE_PATH")" "$(basename "$MODULE_PATH")" "${NAV2_DOCKER_IMAGE:-future-nav2-gazebo:humble}" "${ROS_DOMAIN_ID:-0}"
Executable
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
MODULE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
RUNTIME_ROOT="${AUTONOMY_STUDIO_RUNTIME_ROOT:-$HOME/autonomy-studio/runtime/nav2}"
FOLDER_NAME="$(basename "$MODULE_PATH")"
CONTAINER_NAME="${FOLDER_NAME#\[}"; CONTAINER_NAME="${CONTAINER_NAME/\]/-}"
exec bash "$RUNTIME_ROOT/docker/docker_run_nav2.sh" "$CONTAINER_NAME" "$(dirname "$MODULE_PATH")" "$FOLDER_NAME" "${NAV2_DOCKER_IMAGE:-future-nav2-gazebo:humble}" "${ROS_DOMAIN_ID:-0}" "$@"
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.8)
project(nav2_turtlebot_simulator)
find_package(ament_cmake REQUIRED)
install(DIRECTORY launch worlds DESTINATION share/${PROJECT_NAME})
ament_package()
@@ -0,0 +1,133 @@
import os
import tempfile
import xml.etree.ElementTree as ET
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, OpaqueFunction
from launch.conditions import IfCondition
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
def create_flat_house_world(gazebo_dir):
"""Create a texture-free copy of the house model while retaining its mesh hierarchy."""
world_path = os.path.join(gazebo_dir, 'worlds', 'turtlebot3_house.world')
model_path = os.path.join(gazebo_dir, 'models', 'turtlebot3_house', 'model.sdf')
flat_models_dir = os.path.join(tempfile.gettempdir(), 'nav2_flat_models')
flat_model_dir = os.path.join(flat_models_dir, 'turtlebot3_house_flat')
os.makedirs(flat_model_dir, exist_ok=True)
house_model_tree = ET.parse(model_path)
house_model = house_model_tree.getroot()
house_model.attrib['name'] = 'turtlebot3_house_flat'
for visual in house_model.findall('.//visual'):
material = visual.find('material')
if material is None:
material = ET.SubElement(visual, 'material')
for script in material.findall('script'):
material.remove(script)
for name, value in (
('ambient', '0.62 0.67 0.76 1'),
('diffuse', '0.62 0.67 0.76 1'),
('specular', '0.05 0.05 0.05 1'),
):
color = material.find(name)
if color is None:
color = ET.SubElement(material, name)
color.text = value
shadows = visual.find('cast_shadows')
if shadows is None:
shadows = ET.SubElement(visual, 'cast_shadows')
shadows.text = 'false'
# ElementTree serializes Gazebo's frame='' as frame="", which is invalid SDF.
for element in house_model.iter():
if element.attrib.get('frame') == '':
del element.attrib['frame']
house_model_tree.write(
os.path.join(flat_model_dir, 'model.sdf'),
encoding='utf-8',
xml_declaration=True,
)
with open(os.path.join(flat_model_dir, 'model.config'), 'w', encoding='utf-8') as config:
config.write(
'<model><name>turtlebot3_house_flat</name>'
'<version>1.0</version><sdf version="1.6">model.sdf</sdf></model>'
)
with open(world_path, 'r', encoding='utf-8') as source:
flat_world = source.read().replace('model://turtlebot3_house', 'model://turtlebot3_house_flat')
flat_world_path = os.path.join(tempfile.gettempdir(), 'nav2_turtlebot3_house_flat.world')
with open(flat_world_path, 'w', encoding='utf-8') as destination:
destination.write(flat_world)
existing_model_path = os.environ.get('GAZEBO_MODEL_PATH', '')
os.environ['GAZEBO_MODEL_PATH'] = os.pathsep.join(
part for part in (flat_models_dir, existing_model_path) if part
)
return flat_world_path
def launch_gazebo(context):
gazebo_dir = get_package_share_directory('turtlebot3_gazebo')
simulator_dir = get_package_share_directory('nav2_turtlebot_simulator')
gazebo_ros_dir = get_package_share_directory('gazebo_ros')
world = LaunchConfiguration('world').perform(context)
render_mode = LaunchConfiguration('render_mode').perform(context).strip().lower()
if render_mode not in {'flat', 'full'}:
raise RuntimeError('render_mode must be either flat or full')
if world == 'turtlebot3_house.world' and render_mode == 'flat':
world_path = create_flat_house_world(gazebo_dir)
else:
world_path = os.path.join(
simulator_dir if world == 'empty_world.world' else gazebo_dir,
'worlds',
world,
)
return [
IncludeLaunchDescription(
PythonLaunchDescriptionSource(os.path.join(gazebo_ros_dir, 'launch', 'gzserver.launch.py')),
launch_arguments={
'world': world_path,
'extra_gazebo_args': '-slibgazebo_ros_state.so',
}.items(),
),
Node(
package='gazebo_ros',
executable='spawn_entity.py',
arguments=[
'-entity', 'turtlebot3_burger_3d_lidar',
'-file', os.path.join(gazebo_dir, 'models', 'turtlebot3_burger', 'model.sdf'),
'-x', LaunchConfiguration('x_pose').perform(context),
'-y', LaunchConfiguration('y_pose').perform(context),
'-z', '0.01',
],
output='screen',
),
]
def generate_launch_description():
gazebo_ros_dir = get_package_share_directory('gazebo_ros')
return LaunchDescription([
DeclareLaunchArgument('gui', default_value='false'),
DeclareLaunchArgument('world', default_value='turtlebot3_world.world'),
DeclareLaunchArgument('render_mode', default_value='flat'),
DeclareLaunchArgument('x_pose', default_value='-2.0'),
DeclareLaunchArgument('y_pose', default_value='-0.5'),
OpaqueFunction(function=launch_gazebo),
IncludeLaunchDescription(
PythonLaunchDescriptionSource(os.path.join(gazebo_ros_dir, 'launch', 'gzclient.launch.py')),
condition=IfCondition(LaunchConfiguration('gui')),
),
])
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<package format="3">
<name>nav2_turtlebot_simulator</name>
<version>1.0.0</version>
<description>Headless Gazebo and TurtleBot3 Burger startup for the Nav2 lab.</description>
<maintainer email="platform@autonomystudio.net">Autonomy Studio</maintainer>
<license>Apache-2.0</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<exec_depend>gazebo_ros</exec_depend>
<exec_depend>launch</exec_depend>
<exec_depend>launch_ros</exec_depend>
<exec_depend>turtlebot3_gazebo</exec_depend>
<export><build_type>ament_cmake</build_type></export>
</package>
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<sdf version="1.6">
<world name="empty_world">
<include><uri>model://ground_plane</uri></include>
<include><uri>model://sun</uri></include>
<physics type="ode">
<real_time_update_rate>1000.0</real_time_update_rate>
<max_step_size>0.001</max_step_size>
</physics>
</world>
</sdf>
+187
View File
@@ -0,0 +1,187 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package turtlebot3_gazebo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2.3.8 (2025-07-10)
------------------
* None
2.3.6 (2025-06-19)
------------------
* None
2.3.4 (2025-05-28)
------------------
* None
2.3.0 (2025-02-17)
------------------
* Added multi-robot launch functionality
* Updated robot mesh in Gazebo and RViz
* Added launch file for TurtleBot3 Autorace 2020
* Added plugins to the models of Autorace 2020
* Contributors: Hyungyu Kim
2.2.6 (2022-05-26)
------------------
* ROS 2 Humble Hawksbill supported
* Contributors: Will Son
2.2.5 (2021-08-25)
------------------
* Release for ROS 2 Rolling
* Contributors: Will Son
2.2.4 (2021-06-14)
------------------
* Release for ROS 2 Galactic
* Separate world and robot models(#162)
* Clean up unncessary files
* Use turtlebot3_common mesh modeling
* Independent turtlebot3_simulations package
* Contributors: Joep Tool, Will Son
2.2.3 (2021-04-12)
------------------
* Update required keyword arguments
* Clear up exec_depend
* Fix Waffle Pi wheel inertia
* Contributors: ruffsl, Will Son
2.2.2 (2021-02-24)
------------------
* Remove shared objects built in older version
* Contributors: Will Son
2.2.1 (2021-01-13)
------------------
* Eloquent Elusor EOL
* Add missing imu joint in sdf
* Append Gazebo model path
* Portable fix, launch description revise
* Ament lint applied
* Contributors: minwoominwoominwoo7, Rayman, seanyen, ashe kim, Will Son
2.2.0 (2020-06-29)
------------------
* TurtleBot3 Drive node implementation
* Additional Gazebo maps added
* argument tags in the sdf file replaced with remapping tags
* Low polygon 3D modeling applied for simulation
* Contributors: Ryan Shim, Mikael Arguedas, Will Son
2.1.0 (2019-09-10)
------------------
* Added turtlebot3_house and related world, model files
* Contributors: Ryan Shim
2.0.1 (2019-09-05)
------------------
* Modified dependency packages
* Modified launch directory
* Added a launch file for robot state publisher
* Contributors: Darby Lim, Pyo
2.0.0 (2019-08-20)
------------------
* Supported ROS 2 Dashing Diademata
* Updated the CHANGELOG and version to release binary packages
* Contributors: Darby Lim, Pyo
1.3.0 (2020-06-29)
------------------
* Turtlebot3 Autorace 2020 implemented
* Remove the plugin_path from gazebo_ros export
* Remove *nix path separator
* Contributors: Ashe Kim, Ben Wolsieffer, Sean Yen
1.2.0 (2019-01-22)
------------------
* moved <scene> into <world> `#65 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/65>`_
* modified ML stage
* delete unused param
* update algorithm and modified variable more clearly
* Contributors: Darby Lim, Gilbert, Louise Poubel, Pyo
1.1.0 (2018-07-20)
------------------
* modified uri path
* modified autorace
* delete remap
* Contributors: Darby Lim, Gilbert, Pyo
1.0.2 (2018-06-01)
------------------
* added mission.launch modified model.sdf
* deleted turtlebot3's gazebo plugins
* modified autorace gazebo
* merged pull request `#53 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/53>`_ `#52 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/52>`_ `#51 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/51>`_ `#50 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/50>`_ `#49 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/49>`_
* Contributors: Gilbert, Darby Lim, Pyo
1.0.1 (2018-05-30)
------------------
* resolving dependency issues:
http://build.ros.org/job/Kbin_dj_dJ64__turtlebot3_gazebo__debian_jessie_amd64__binary/2/
* Contributors: Pyo
1.0.0 (2018-05-29)
------------------
* added world for turtlebot3_autorace
* added world for turtlebot3_machine_learning
* merged pull request `#46 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/46>`_ from AuTURBO/develop
add turtlebot3_autorace world'
* merged pull request `#48 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/48>`_ `#47 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/47>`_ `#44 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/44>`_ `#42 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/42>`_ `#41 <https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/41>`_
* Contributors: Darby Lim, Gilbert, hyunoklee, Pyo
0.2.4 (2018-03-14)
------------------
* None
0.2.3 (2018-03-14)
------------------
* solved DuplicateVersionsException error
* Contributors: Pyo
0.2.2 (2018-03-14)
------------------
* None
0.2.1 (2018-03-14)
------------------
* added worlds for gazebo and turtlebot3
* Contributors: Darby Lim
0.2.0 (2018-03-13)
------------------
* added slam with multiple tb3
* added multi example
* added turtlebot3_house
* modified cmake file
* modified spwn model name
* modified multi slam param
* modified camera position
* modified folder name
* Contributors: Darby Lim
0.1.7 (2017-08-16)
------------------
* renamed missed the install rule (worlds -> models)
* Contributors: Darby Lim, Tully Foote
0.1.6 (2017-08-14)
------------------
* modified folder name and model path
* updated rviz and add static tf publisher for depth camera
* Contributors: Darby Lim
0.1.5 (2017-06-09)
------------------
* modified make files for dependencies
* updated turtlebot3 sim
* updated world config
* Contributors: Darby Lim
0.1.4 (2017-05-23)
------------------
* added as new meta-packages and version update (0.1.4)
* Contributors: Darby Lim, Pyo
+96
View File
@@ -0,0 +1,96 @@
################################################################################
# Set minimum required version of cmake, project name and compile options
################################################################################
cmake_minimum_required(VERSION 3.5)
project(turtlebot3_gazebo)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
if(MSVC)
add_compile_definitions(_USE_MATH_DEFINES)
endif()
################################################################################
# Find ament packages and libraries for ament and system dependencies
################################################################################
find_package(ament_cmake REQUIRED)
find_package(gazebo REQUIRED)
find_package(gazebo_ros_pkgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(tf2 REQUIRED)
################################################################################
# Build
################################################################################
link_directories(
${GAZEBO_LIBRARY_DIRS}
)
include_directories(
include
${GAZEBO_INCLUDE_DIRS}
)
set(dependencies
"geometry_msgs"
"nav_msgs"
"rclcpp"
"sensor_msgs"
"tf2"
)
set(EXEC_NAME "turtlebot3_drive")
add_executable(${EXEC_NAME} src/turtlebot3_drive.cpp)
ament_target_dependencies(${EXEC_NAME} ${dependencies})
add_library(traffic_light_plugin SHARED src/traffic_light_plugin.cpp)
target_link_libraries(traffic_light_plugin ${GAZEBO_LIBRARIES})
add_library(traffic_bar_plugin SHARED src/traffic_bar_plugin.cpp)
target_link_libraries(traffic_bar_plugin ${GAZEBO_LIBRARIES})
add_library(obstacle1 SHARED src/obstacle1.cpp)
target_link_libraries(obstacle1 ${GAZEBO_LIBRARIES})
add_library(obstacle2 SHARED src/obstacle2.cpp)
target_link_libraries(obstacle2 ${GAZEBO_LIBRARIES})
add_library(obstacles SHARED src/obstacles.cpp)
target_link_libraries(obstacles ${GAZEBO_LIBRARIES})
################################################################################
# Install
################################################################################
install(TARGETS ${EXEC_NAME}
DESTINATION lib/${PROJECT_NAME}
)
install(DIRECTORY launch models rviz worlds
DESTINATION share/${PROJECT_NAME}/
)
install(DIRECTORY include/
DESTINATION include/
)
################################################################################
# Macro for ament package
################################################################################
ament_export_include_directories(include)
ament_export_dependencies(gazebo_ros_pkgs)
ament_export_dependencies(geometry_msgs)
ament_export_dependencies(nav_msgs)
ament_export_dependencies(rclcpp)
ament_export_dependencies(sensor_msgs)
ament_export_dependencies(tf2)
ament_package()
@@ -0,0 +1,38 @@
// Copyright 2012 Open Source Robotics Foundation
//
// 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.
//
// Author: Ryan Shim
#ifndef TURTLEBOT3_GAZEBO__OBSTACLE1_HPP_
#define TURTLEBOT3_GAZEBO__OBSTACLE1_HPP_
#include <ignition/math.hh>
#include <gazebo/common/common.hh>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
namespace gazebo
{
class Obstacle1 : public ModelPlugin
{
public:
void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/) override;
private:
physics::ModelPtr model;
event::ConnectionPtr updateConnection;
};
GZ_REGISTER_MODEL_PLUGIN(Obstacle1);
} // namespace gazebo
#endif // TURTLEBOT3_GAZEBO__OBSTACLE1_HPP_
@@ -0,0 +1,39 @@
// Copyright 2012 Open Source Robotics Foundation
//
// 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.
//
// Author: Ryan Shim
#ifndef TURTLEBOT3_GAZEBO__OBSTACLE2_HPP_
#define TURTLEBOT3_GAZEBO__OBSTACLE2_HPP_
#include <ignition/math.hh>
#include <gazebo/common/common.hh>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
namespace gazebo
{
class Obstacle2 : public ModelPlugin
{
public:
Obstacle2() = default;
void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/) override;
private:
physics::ModelPtr model;
event::ConnectionPtr updateConnection;
};
GZ_REGISTER_MODEL_PLUGIN(Obstacle2);
} // namespace gazebo
#endif // TURTLEBOT3_GAZEBO__OBSTACLE2_HPP_
@@ -0,0 +1,41 @@
// Copyright 2012 Open Source Robotics Foundation
//
// 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.
//
// Author: Ryan Shim
#ifndef TURTLEBOT3_GAZEBO__OBSTACLES_HPP_
#define TURTLEBOT3_GAZEBO__OBSTACLES_HPP_
#include <ignition/math.hh>
#include <gazebo/common/common.hh>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#define PI 3.141592
namespace gazebo
{
class Obstacles : public ModelPlugin
{
public:
Obstacles() = default;
void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/) override;
private:
physics::ModelPtr model;
event::ConnectionPtr updateConnection;
};
GZ_REGISTER_MODEL_PLUGIN(Obstacles);
} // namespace gazebo
#endif // TURTLEBOT3_GAZEBO__OBSTACLES_HPP_
@@ -0,0 +1,45 @@
// Copyright 2025 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.
//
// Author: Hyungyu Kim
#ifndef TURTLEBOT3_GAZEBO__TRAFFIC_BAR_PLUGIN_HPP_
#define TURTLEBOT3_GAZEBO__TRAFFIC_BAR_PLUGIN_HPP_
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
namespace gazebo
{
class TrafficBar : public ModelPlugin
{
public:
TrafficBar();
void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf) override;
void OnUpdate();
private:
double traffic_cycle;
int status;
common::Time last_time;
event::ConnectionPtr update_connection;
ignition::math::Pose3d down_pose;
ignition::math::Pose3d up_pose;
physics::ModelPtr model;
physics::WorldPtr world;
};
GZ_REGISTER_MODEL_PLUGIN(TrafficBar);
} // namespace gazebo
#endif // TURTLEBOT3_GAZEBO__TRAFFIC_BAR_PLUGIN_HPP_
@@ -0,0 +1,53 @@
// Copyright 2025 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.
//
// Author: Hyungyu Kim
#ifndef TURTLEBOT3_GAZEBO__TRAFFIC_LIGHT_PLUGIN_HPP_
#define TURTLEBOT3_GAZEBO__TRAFFIC_LIGHT_PLUGIN_HPP_
#include <string>
#include <vector>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
namespace gazebo
{
class TrafficLight : public ModelPlugin
{
public:
TrafficLight();
~TrafficLight();
void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf) override;
void OnUpdate();
private:
double traffic_cycle;
int status;
std::vector<std::string> textures;
common::Time last_time;
event::ConnectionPtr update_connection;
gazebo::transport::NodePtr node;
gazebo::msgs::Visual msg;
gazebo::transport::PublisherPtr visPub;
physics::ModelPtr model;
physics::WorldPtr world;
};
GZ_REGISTER_MODEL_PLUGIN(TrafficLight);
} // namespace gazebo
#endif // TURTLEBOT3_GAZEBO__TRAFFIC_LIGHT_PLUGIN_HPP_
@@ -0,0 +1,70 @@
// 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: Taehun Lim (Darby), Ryan Shim
#ifndef TURTLEBOT3_GAZEBO__TURTLEBOT3_DRIVE_HPP_
#define TURTLEBOT3_GAZEBO__TURTLEBOT3_DRIVE_HPP_
#include <tf2/LinearMath/Matrix3x3.h>
#include <tf2/LinearMath/Quaternion.h>
#include <geometry_msgs/msg/twist.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include <rclcpp/rclcpp.hpp>
#include <sensor_msgs/msg/laser_scan.hpp>
#define DEG2RAD (M_PI / 180.0)
#define RAD2DEG (180.0 / M_PI)
#define CENTER 0
#define LEFT 1
#define RIGHT 2
#define LINEAR_VELOCITY 0.3
#define ANGULAR_VELOCITY 1.5
#define GET_TB3_DIRECTION 0
#define TB3_DRIVE_FORWARD 1
#define TB3_RIGHT_TURN 2
#define TB3_LEFT_TURN 3
class Turtlebot3Drive : public rclcpp::Node
{
public:
Turtlebot3Drive();
~Turtlebot3Drive();
private:
// ROS topic publishers
rclcpp::Publisher<geometry_msgs::msg::Twist>::SharedPtr cmd_vel_pub_;
// ROS topic subscribers
rclcpp::Subscription<sensor_msgs::msg::LaserScan>::SharedPtr scan_sub_;
rclcpp::Subscription<nav_msgs::msg::Odometry>::SharedPtr odom_sub_;
// Variables
double robot_pose_;
double prev_robot_pose_;
double scan_data_[3];
// ROS timer
rclcpp::TimerBase::SharedPtr update_timer_;
// Function prototypes
void update_callback();
void update_cmd_vel(double linear, double angular);
void scan_callback(const sensor_msgs::msg::LaserScan::SharedPtr msg);
void odom_callback(const nav_msgs::msg::Odometry::SharedPtr msg);
};
#endif // TURTLEBOT3_GAZEBO__TURTLEBOT3_DRIVE_HPP_
@@ -0,0 +1,80 @@
#!/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
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='0.0')
y_pose = LaunchConfiguration('y_pose', default='0.0')
world = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'worlds',
'empty_world.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
}.items()
)
ld = LaunchDescription()
# Add the commands to the launch description
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
@@ -0,0 +1,137 @@
#!/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
import xml.etree.ElementTree as ET
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import GroupAction
from launch.actions import IncludeLaunchDescription
from launch.actions import RegisterEventHandler
from launch.event_handlers import OnShutdown
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import PushRosNamespace
def generate_launch_description():
TURTLEBOT3_MODEL = os.environ['TURTLEBOT3_MODEL']
number_of_robots = 4
namespace = 'TB3'
pose = [[-2, -0.5], [0.5, -2], [2, 0.5], [-0.5, 2]]
model_folder = 'turtlebot3_' + TURTLEBOT3_MODEL
urdf_path = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'models',
model_folder,
'model.sdf'
)
save_path = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'models',
model_folder,
'tmp'
)
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='false')
world = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'worlds',
'turtlebot3_world.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_list = []
for count in range(number_of_robots):
robot_state_publisher_cmd_list.append(
IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(launch_file_dir, 'robot_state_publisher.launch.py')
),
launch_arguments={
'use_sim_time': use_sim_time,
'frame_prefix': f'{namespace}_{count+1}'
}.items()
)
)
spawn_turtlebot_cmd_list = []
for count in range(number_of_robots):
tree = ET.parse(urdf_path)
root = tree.getroot()
for odom_frame_tag in root.iter('odometry_frame'):
odom_frame_tag.text = f'{namespace}_{count+1}/odom'
for base_frame_tag in root.iter('robot_base_frame'):
base_frame_tag.text = f'{namespace}_{count+1}/base_footprint'
for scan_frame_tag in root.iter('frame_name'):
scan_frame_tag.text = f'{namespace}_{count+1}/base_scan'
urdf_modified = ET.tostring(tree.getroot(), encoding='unicode')
urdf_modified = '<?xml version="1.0" ?>\n'+urdf_modified
with open(f'{save_path}{count+1}.sdf', 'w') as file:
file.write(urdf_modified)
spawn_turtlebot_cmd_list.append(
IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(launch_file_dir, 'multi_spawn_turtlebot3.launch.py')
),
launch_arguments={
'x_pose': str(pose[count][0]),
'y_pose': str(pose[count][1]),
'robot_name': f'{TURTLEBOT3_MODEL}_{count+1}',
'namespace': f'{namespace}_{count+1}',
'sdf_path': f'{save_path}{count+1}.sdf'
}.items()
)
)
ld = LaunchDescription()
# Add the commands to the launch description
ld.add_action(gzserver_cmd)
ld.add_action(gzclient_cmd)
ld.add_action(RegisterEventHandler(
OnShutdown(
on_shutdown=lambda event,
context: [os.remove(f'{save_path}{count+1}.sdf') for count in range(number_of_robots)]
)
))
for count, spawn_turtlebot_cmd in enumerate(spawn_turtlebot_cmd_list, start=1):
ld.add_action(GroupAction([PushRosNamespace(f'{namespace}_{count}'),
robot_state_publisher_cmd_list[count-1],
spawn_turtlebot_cmd]))
return ld
@@ -0,0 +1,60 @@
#!/usr/bin/env python3
# Copyright 2019 Open Source Robotics Foundation, Inc.
#
# 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: HyunGyu Kim
import os
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
def generate_launch_description():
TURTLEBOT3_MODEL = os.environ['TURTLEBOT3_MODEL']
x_pose = LaunchConfiguration('x_pose', default='0.0')
y_pose = LaunchConfiguration('y_pose', default='0.0')
robot_name = LaunchConfiguration('robot_name', default=TURTLEBOT3_MODEL)
namespace = LaunchConfiguration('namespace', default='')
sdf_path = LaunchConfiguration('sdf_path', default='')
declare_x_position_cmd = DeclareLaunchArgument(
'x_pose', default_value='0.0',
description='Specify namespace of the robot')
declare_y_position_cmd = DeclareLaunchArgument(
'y_pose', default_value='0.0',
description='Specify namespace of the robot')
start_gazebo_ros_spawner_cmd = Node(
package='gazebo_ros',
executable='spawn_entity.py',
arguments=[
'-entity', robot_name,
'-file', sdf_path,
'-x', x_pose,
'-y', y_pose,
'-z', '0.01',
'-robot_namespace', namespace
],
output='screen',
)
ld = LaunchDescription()
ld.add_action(declare_x_position_cmd)
ld.add_action(declare_y_position_cmd)
ld.add_action(start_gazebo_ros_spawner_cmd)
return ld
@@ -0,0 +1,62 @@
#!/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: Darby Lim
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch.substitutions import PythonExpression
from launch_ros.actions import Node
def generate_launch_description():
TURTLEBOT3_MODEL = os.environ['TURTLEBOT3_MODEL']
use_sim_time = LaunchConfiguration('use_sim_time', default='true')
urdf_file_name = 'turtlebot3_' + TURTLEBOT3_MODEL + '.urdf'
frame_prefix = LaunchConfiguration('frame_prefix', default='')
print('urdf_file_name : {}'.format(urdf_file_name))
urdf_path = os.path.join(
get_package_share_directory('turtlebot3_description'),
'urdf',
urdf_file_name)
with open(urdf_path, 'r') as infp:
robot_desc = infp.read()
return LaunchDescription([
DeclareLaunchArgument(
'use_sim_time',
default_value='false',
description='Use simulation (Gazebo) clock if true'),
Node(
package='robot_state_publisher',
executable='robot_state_publisher',
name='robot_state_publisher',
output='screen',
parameters=[{
'use_sim_time': use_sim_time,
'robot_description': robot_desc,
'frame_prefix': PythonExpression(["'", frame_prefix, "/'"])
}],
),
])
@@ -0,0 +1,70 @@
# Copyright 2019 Open Source Robotics Foundation, Inc.
#
# 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.
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
def generate_launch_description():
# Get the urdf file
TURTLEBOT3_MODEL = os.environ['TURTLEBOT3_MODEL']
model_folder = 'turtlebot3_' + TURTLEBOT3_MODEL
urdf_path = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'models',
model_folder,
'model.sdf'
)
# Launch configuration variables specific to simulation
x_pose = LaunchConfiguration('x_pose', default='0.0')
y_pose = LaunchConfiguration('y_pose', default='0.0')
# Declare the launch arguments
declare_x_position_cmd = DeclareLaunchArgument(
'x_pose', default_value='0.0',
description='Specify namespace of the robot')
declare_y_position_cmd = DeclareLaunchArgument(
'y_pose', default_value='0.0',
description='Specify namespace of the robot')
start_gazebo_ros_spawner_cmd = Node(
package='gazebo_ros',
executable='spawn_entity.py',
arguments=[
'-entity', TURTLEBOT3_MODEL,
'-file', urdf_path,
'-x', x_pose,
'-y', y_pose,
'-z', '0.01'
],
output='screen',
)
ld = LaunchDescription()
# Declare the launch options
ld.add_action(declare_x_position_cmd)
ld.add_action(declare_y_position_cmd)
# Add any conditioned actions
ld.add_action(start_gazebo_ros_spawner_cmd)
return ld
@@ -0,0 +1,77 @@
#!/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='0.8')
y_pose = LaunchConfiguration('y_pose', default='-1.747')
world = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'worlds',
'turtlebot3_autorace_2020.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
}.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
@@ -0,0 +1,80 @@
#!/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
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='0.0')
y_pose = LaunchConfiguration('y_pose', default='0.0')
world = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'worlds',
'turtlebot3_dqn_stage1.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
}.items()
)
ld = LaunchDescription()
# Add the commands to the launch description
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
@@ -0,0 +1,80 @@
#!/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
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='0.0')
y_pose = LaunchConfiguration('y_pose', default='0.0')
world = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'worlds',
'turtlebot3_dqn_stage2.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
}.items()
)
ld = LaunchDescription()
# Add the commands to the launch description
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
@@ -0,0 +1,80 @@
#!/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
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='0.0')
y_pose = LaunchConfiguration('y_pose', default='0.0')
world = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'worlds',
'turtlebot3_dqn_stage3.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
}.items()
)
ld = LaunchDescription()
# Add the commands to the launch description
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
@@ -0,0 +1,80 @@
#!/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
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='0.0')
y_pose = LaunchConfiguration('y_pose', default='0.0')
world = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'worlds',
'turtlebot3_dqn_stage4.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
}.items()
)
ld = LaunchDescription()
# Add the commands to the launch description
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
@@ -0,0 +1,80 @@
#!/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
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='-2.0')
y_pose = LaunchConfiguration('y_pose', default='-0.5')
world = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'worlds',
'turtlebot3_house.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
}.items()
)
ld = LaunchDescription()
# Add the commands to the launch description
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
@@ -0,0 +1,80 @@
#!/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
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='-2.0')
y_pose = LaunchConfiguration('y_pose', default='-0.5')
world = os.path.join(
get_package_share_directory('turtlebot3_gazebo'),
'worlds',
'turtlebot3_world.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
}.items()
)
ld = LaunchDescription()
# Add the commands to the launch description
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
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

@@ -0,0 +1,14 @@
material checker
{
technique
{
pass
{
texture_unit
{
texture checker.png
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

@@ -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>
@@ -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_autorace_2020/checker/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/checker/materials/textures</uri>
<name>checker</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
@@ -0,0 +1,14 @@
material course
{
technique
{
pass
{
texture_unit
{
texture course.png
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@@ -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>Gilbert</name>
<email>kkjong@robotis.com</email>
</author>
<description>
A simple textured ground plane
</description>
</model>
@@ -0,0 +1,41 @@
<?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>model://turtlebot3_autorace_2020/course/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/course/materials/textures</uri>
<name>course</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
@@ -0,0 +1,14 @@
material traffic_bar
{
technique
{
pass
{
texture_unit
{
texture traffic_bar.png
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<model>
<name>traffic_bar</name>
<version>1.0</version>
<sdf version='1.6'>model.sdf</sdf>
<author>
<name>Hyunok Lee</name>
<email>hyunokhyunok@naver.com</email>
<name>Hyungyu Kim</name>
<email>kimhg@robotis.com</email>
</author>
<description>
Model with links of simple shapes and texture applied.
</description>
</model>
@@ -0,0 +1,32 @@
<?xml version='1.0'?>
<sdf version="1.6">
<model name="traffic_bar">
<static>false</static>
<link name="traffic_bar">
<pose> 0 0 0 0 0 0</pose>
<collision name="collision">
<geometry>
<box>
<size>0.3 0.02 0.05</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.3 0.02 0.05</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_autorace_2020/traffic_bar/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/traffic_bar/materials/textures</uri>
<name>traffic_bar</name>
</script>
</material>
</visual>
</link>
<plugin name="traffic_bar_plugin" filename="libtraffic_bar_plugin.so">
</plugin>
</model>
</sdf>
@@ -0,0 +1,14 @@
material traffic_construction
{
technique
{
pass
{
texture_unit
{
texture traffic_construction.png
}
}
}
}
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>traffic_construction</name>
<version>1.0</version>
<sdf version='1.6'>model.sdf</sdf>
<author>
<name>Hyunok Lee</name>
<email>hyunokhyunok@naver.com</email>
</author>
<description>
Model with links of simple shapes and texture applied.
</description>
</model>
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="traffic_construction">
<static>true</static>
<link name="box">
<pose>0 0 0 0 0 0</pose>
<collision name="collision">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_autorace_2020/traffic_construction/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/traffic_construction/materials/textures</uri>
<name>traffic_construction</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
@@ -0,0 +1,14 @@
material traffic_intersection
{
technique
{
pass
{
texture_unit
{
texture traffic_intersection.png
}
}
}
}
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>traffic_intersection</name>
<version>1.0</version>
<sdf version='1.6'>model.sdf</sdf>
<author>
<name>Hyunok Lee</name>
<email>hyunokhyunok@naver.com</email>
</author>
<description>
Model with links of simple shapes and texture applied.
</description>
</model>
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="traffic_intersection">
<static>true</static>
<link name="box">
<pose>0 0 0 0 0 0</pose>
<collision name="collision">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_autorace_2020/traffic_intersection/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/traffic_intersection/materials/textures</uri>
<name>traffic_intersection</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
@@ -0,0 +1,14 @@
material traffic_left
{
technique
{
pass
{
texture_unit
{
texture traffic_left.png
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>traffic_left</name>
<version>1.0</version>
<sdf version='1.6'>model.sdf</sdf>
<author>
<name>Hyunok Lee</name>
<email>hyunokhyunok@naver.com</email>
</author>
<description>
Model with links of simple shapes and texture applied.
</description>
</model>
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="traffic_left">
<static>true</static>
<link name="box">
<pose>1.08 -0.838 0.125 0 -0 -1.57</pose>
<collision name="collision">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_autorace_2020/traffic_left/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/traffic_left/materials/textures</uri>
<name>traffic_left</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
@@ -0,0 +1,41 @@
material traffic_light_red
{
technique
{
pass
{
texture_unit
{
texture traffic_light_red.png
}
}
}
}
material traffic_light_green
{
technique
{
pass
{
texture_unit
{
texture traffic_light_green.png
}
}
}
}
material traffic_light_yellow
{
technique
{
pass
{
texture_unit
{
texture traffic_light_yellow.png
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<model>
<name>traffic_light</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>
<author>
<name>Ashekim</name>
<email>ashekim@robotis.com</email>
<name>Hyungyu Kim</name>
<email>kimhg@robotis.com</email>
</author>
<description>The traffic light.</description>
</model>
@@ -0,0 +1,32 @@
<?xml version='1.0'?>
<sdf version='1.6'>
<model name='traffic_light'>
<link name='traffic_light'>
<pose>0 0 0 0 0 0</pose>
<collision name='collision'>
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
</collision>
<visual name='visual'>
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_autorace_2020/traffic_light/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/traffic_light/materials/textures</uri>
<name>traffic_light_red</name>
</script>
</material>
</visual>
</link>
<plugin name="traffic_light_plugin" filename="libtraffic_light_plugin.so">
</plugin>
<static>1</static>
</model>
</sdf>
@@ -0,0 +1,14 @@
material traffic_noentry
{
technique
{
pass
{
texture_unit
{
texture traffic_noentry.png
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>traffic_noentry</name>
<version>1.0</version>
<sdf version='1.6'>model.sdf</sdf>
<author>
<name>Hyunok Lee</name>
<email>hyunokhyunok@naver.com</email>
</author>
<description>
Model with links of simple shapes and texture applied.
</description>
</model>
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="traffic_noentry">
<static>true</static>
<link name="box">
<pose>0 0 0 0 0 0</pose>
<collision name="collision">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_autorace_2020/traffic_noentry/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/traffic_noentry/materials/textures</uri>
<name>traffic_noentry</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
@@ -0,0 +1,14 @@
material traffic_parking
{
technique
{
pass
{
texture_unit
{
texture traffic_parking.png
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>traffic_parking</name>
<version>1.0</version>
<sdf version='1.6'>model.sdf</sdf>
<author>
<name>Hyunok Lee</name>
<email>hyunokhyunok@naver.com</email>
</author>
<description>
Model with links of simple shapes and texture applied.
</description>
</model>
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="traffic_parking">
<static>true</static>
<link name="box">
<pose>0 0 0 0 0 0</pose>
<collision name="collision">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_autorace_2020/traffic_parking/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/traffic_parking/materials/textures</uri>
<name>traffic_parking</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
@@ -0,0 +1,14 @@
material traffic_pl_left
{
technique
{
pass
{
texture_unit
{
texture traffic_pl_left.png
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>traffic_pl_left</name>
<version>1.0</version>
<sdf version='1.6'>model.sdf</sdf>
<author>
<name>Hyunok Lee</name>
<email>hyunokhyunok@naver.com</email>
</author>
<description>
Model with links of simple shapes and texture applied.
</description>
</model>
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="traffic_pl_left">
<static>true</static>
<link name="box">
<pose>0 0 0 0 0 0</pose>
<collision name="collision">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_autorace_2020/traffic_pl_left/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/traffic_pl_left/materials/textures</uri>
<name>traffic_pl_left</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
@@ -0,0 +1,14 @@
material traffic_right
{
technique
{
pass
{
texture_unit
{
texture traffic_right.png
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>traffic_right</name>
<version>1.0</version>
<sdf version='1.6'>model.sdf</sdf>
<author>
<name>Hyunok Lee</name>
<email>hyunokhyunok@naver.com</email>
</author>
<description>
Model with links of simple shapes and texture applied.
</description>
</model>
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="traffic_right">
<static>true</static>
<link name="box">
<pose>0 0 0 0 0 0</pose>
<collision name="collision">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_autorace_2020/traffic_right/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/traffic_right/materials/textures</uri>
<name>traffic_right</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
@@ -0,0 +1,14 @@
material traffic_stop
{
technique
{
pass
{
texture_unit
{
texture traffic_stop.png
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>traffic_stop</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>
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="traffic_stop">
<static>true</static>
<link name="box">
<pose>0 0 0 0 0 0</pose>
<collision name="collision">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_autorace_2020/traffic_stop/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/traffic_stop/materials/textures</uri>
<name>traffic_stop</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
@@ -0,0 +1,14 @@
material traffic_tunnel
{
technique
{
pass
{
texture_unit
{
texture tunnel.png
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>traffic_tunnel</name>
<version>1.0</version>
<sdf version='1.6'>model.sdf</sdf>
<author>
<name>Hyunok Lee</name>
<email>hyunokhyunok@naver.com</email>
</author>
<description>
Model with links of simple shapes and texture applied.
</description>
</model>
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name="traffic_tunnel">
<pose>0 0 0.125 0 0 0</pose>
<link name="box">
<pose>0 0 0 0 0 0</pose>
<collision name="collision">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.12 0.025 0.25</size>
</box>
</geometry>
<material>
<script>
<uri>model://turtlebot3_autorace_2020/traffic_tunnel/materials/scripts</uri>
<uri>model://turtlebot3_autorace_2020/traffic_tunnel/materials/textures</uri>
<name>traffic_tunnel</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
@@ -0,0 +1,408 @@
<?xml version="1.0" ?>
<sdf version="1.4">
<model name="turtlebot3_burger">
<pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
<link name="base_footprint"/>
<link name="base_link">
<inertial>
<pose>-0.032 0 0.070 0 0 0</pose>
<inertia>
<ixx>7.2397393e-01</ixx>
<ixy>4.686399e-10</ixy>
<ixz>-1.09525703e-08</ixz>
<iyy>7.2397393e-01</iyy>
<iyz>2.8582649e-09</iyz>
<izz>6.53050163e-01</izz>
</inertia>
<mass>8.2573504e-01</mass>
</inertial>
<collision name="base_collision">
<pose>-0.032 0 0.070 0 0 0</pose>
<geometry>
<box>
<size>0.140 0.140 0.140</size>
</box>
</geometry>
</collision>
<visual name="base_visual">
<pose>-0.032 0 0 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/burger_base.dae</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
</visual>
</link>
<link name="imu_link">
<sensor name="tb3_imu" type="imu">
<always_on>true</always_on>
<update_rate>200</update_rate>
<imu>
<angular_velocity>
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
</noise>
</z>
</angular_velocity>
<linear_acceleration>
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
</noise>
</z>
</linear_acceleration>
</imu>
<plugin name="turtlebot3_imu" filename="libgazebo_ros_imu_sensor.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
<remapping>~/out:=imu</remapping>
</ros>
</plugin>
</sensor>
</link>
<link name="base_scan">
<inertial>
<pose>-0.020 0 0.161 0 0 0</pose>
<inertia>
<ixx>0.001</ixx>
<ixy>0.000</ixy>
<ixz>0.000</ixz>
<iyy>0.001</iyy>
<iyz>0.000</iyz>
<izz>0.001</izz>
</inertia>
<mass>0.114</mass>
</inertial>
<collision name="lidar_sensor_collision">
<pose>-0.020 0 0.161 0 0 0</pose>
<geometry>
<cylinder>
<radius>0.0508</radius>
<length>0.055</length>
</cylinder>
</geometry>
</collision>
<visual name="lidar_sensor_visual">
<pose>-0.032 0 0.171 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/lds.dae</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
</visual>
<sensor name="hls_lfcd_lds" type="ray">
<always_on>true</always_on>
<visualize>true</visualize>
<pose>-0.032 0 0.171 0 0 0</pose>
<update_rate>5</update_rate>
<ray>
<scan>
<horizontal>
<samples>360</samples>
<resolution>1.000000</resolution>
<min_angle>0.000000</min_angle>
<max_angle>6.280000</max_angle>
</horizontal>
</scan>
<range>
<min>0.120000</min>
<max>3.5</max>
<resolution>0.015000</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin name="turtlebot3_laserscan" filename="libgazebo_ros_ray_sensor.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
<remapping>~/out:=scan</remapping>
</ros>
<output_type>sensor_msgs/LaserScan</output_type>
<frame_name>base_scan</frame_name>
</plugin>
</sensor>
</link>
<link name="wheel_left_link">
<inertial>
<pose>0 0.08 0.023 -1.57 0 0</pose>
<inertia>
<ixx>1.8158194e-03</ixx>
<ixy>-9.3392e-12</ixy>
<ixz>1.04909e-11</ixz>
<iyy>3.2922126e-03</iyy>
<iyz>5.75694e-11</iyz>
<izz>1.8158194e-03</izz>
</inertia>
<mass>2.8498940e-02</mass>
</inertial>
<collision name="wheel_left_collision">
<pose>0 0.08 0.023 -1.57 0 0</pose>
<geometry>
<cylinder>
<radius>0.033</radius>
<length>0.018</length>
</cylinder>
</geometry>
<surface>
<!-- This friction pamareter don't contain reliable data!! -->
<friction>
<ode>
<mu>100000.0</mu>
<mu2>100000.0</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0.0</slip1>
<slip2>0.0</slip2>
</ode>
</friction>
<contact>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+5</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
<visual name="wheel_left_visual">
<pose>0 0.08 0.023 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/tire.dae</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
</visual>
</link>
<link name="wheel_right_link">
<inertial>
<pose>0.0 -0.08 0.023 -1.57 0 0</pose>
<inertia>
<ixx>1.8158194e-03</ixx>
<ixy>-9.3392e-12</ixy>
<ixz>1.04909e-11</ixz>
<iyy>3.2922126e-03</iyy>
<iyz>5.75694e-11</iyz>
<izz>1.8158194e-03</izz>
</inertia>
<mass>2.8498940e-02</mass>
</inertial>
<collision name="wheel_right_collision">
<pose>0.0 -0.08 0.023 -1.57 0 0</pose>
<geometry>
<cylinder>
<radius>0.033</radius>
<length>0.018</length>
</cylinder>
</geometry>
<surface>
<!-- This friction pamareter don't contain reliable data!! -->
<friction>
<ode>
<mu>100000.0</mu>
<mu2>100000.0</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0.0</slip1>
<slip2>0.0</slip2>
</ode>
</friction>
<contact>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+5</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
<visual name="wheel_right_visual">
<pose>0.0 -0.08 0.023 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/tire.dae</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
</visual>
</link>
<link name='caster_back_link'>
<pose>-0.081 0 -0.004 -1.57 0 0</pose>
<inertial>
<mass>0.005</mass>
<inertia>
<ixx>0.001</ixx>
<ixy>0.000</ixy>
<ixz>0.000</ixz>
<iyy>0.001</iyy>
<iyz>0.000</iyz>
<izz>0.001</izz>
</inertia>
</inertial>
<collision name='collision'>
<geometry>
<sphere>
<radius>0.005000</radius>
</sphere>
</geometry>
<surface>
<contact>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+5</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
</link>
<joint name="base_joint" type="fixed">
<parent>base_footprint</parent>
<child>base_link</child>
<pose>0.0 0.0 0.010 0 0 0</pose>
</joint>
<joint name="wheel_left_joint" type="revolute">
<parent>base_link</parent>
<child>wheel_left_link</child>
<pose>0.0 0.08 0.023 -1.57 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<joint name="wheel_right_joint" type="revolute">
<parent>base_link</parent>
<child>wheel_right_link</child>
<pose>0.0 -0.08 0.023 -1.57 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<joint name='caster_back_joint' type='ball'>
<parent>base_link</parent>
<child>caster_back_link</child>
</joint>
<joint name="imu_joint" type="fixed">
<parent>base_link</parent>
<child>imu_link</child>
<pose>-0.032 0 0.068 0 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<joint name="lidar_joint" type="fixed">
<parent>base_link</parent>
<child>base_scan</child>
<pose>-0.032 0 0.171 0 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<plugin name="turtlebot3_diff_drive" filename="libgazebo_ros_diff_drive.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
</ros>
<update_rate>30</update_rate>
<!-- wheels -->
<left_joint>wheel_left_joint</left_joint>
<right_joint>wheel_right_joint</right_joint>
<!-- kinematics -->
<wheel_separation>0.160</wheel_separation>
<wheel_diameter>0.066</wheel_diameter>
<!-- limits -->
<max_wheel_torque>20</max_wheel_torque>
<max_wheel_acceleration>1.0</max_wheel_acceleration>
<command_topic>cmd_vel</command_topic>
<!-- output -->
<publish_odom>true</publish_odom>
<publish_odom_tf>true</publish_odom_tf>
<publish_wheel_tf>false</publish_wheel_tf>
<odometry_topic>odom</odometry_topic>
<odometry_frame>odom</odometry_frame>
<robot_base_frame>base_footprint</robot_base_frame>
</plugin>
<plugin name="turtlebot3_joint_state" filename="libgazebo_ros_joint_state_publisher.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
<remapping>~/out:=joint_states</remapping>
</ros>
<update_rate>30</update_rate>
<joint_name>wheel_left_joint</joint_name>
<joint_name>wheel_right_joint</joint_name>
</plugin>
</model>
</sdf>
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<model>
<name>TurtleBot3(Burger)</name>
<version>2.0</version>
<sdf version="1.4">model-1_4.sdf</sdf>
<sdf version="1.5">model.sdf</sdf>
<author>
<name>Taehun Lim(Darby)</name>
<email>thlim@robotis.com</email>
</author>
<description>
TurtleBot3 Burger
</description>
</model>
@@ -0,0 +1,467 @@
<?xml version="1.0" ?>
<sdf version="1.5">
<model name="turtlebot3_burger">
<pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
<link name="base_footprint"/>
<link name="base_link">
<inertial>
<pose>-0.032 0 0.070 0 0 0</pose>
<inertia>
<ixx>7.2397393e-01</ixx>
<ixy>4.686399e-10</ixy>
<ixz>-1.09525703e-08</ixz>
<iyy>7.2397393e-01</iyy>
<iyz>2.8582649e-09</iyz>
<izz>6.53050163e-01</izz>
</inertia>
<mass>8.2573504e-01</mass>
</inertial>
<collision name="base_collision">
<pose>-0.032 0 0.070 0 0 0</pose>
<geometry>
<box>
<size>0.140 0.140 0.140</size>
</box>
</geometry>
</collision>
<visual name="base_visual">
<pose>-0.032 0 0 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/bases/burger_base.stl</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
<material>
<ambient>0.3 0.3 0.3 1.0</ambient>
<diffuse>0.3 0.3 0.3 1.0</diffuse>
</material>
</visual>
</link>
<link name="imu_link">
<sensor name="tb3_imu" type="imu">
<always_on>true</always_on>
<update_rate>200</update_rate>
<imu>
<angular_velocity>
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
</noise>
</z>
</angular_velocity>
<linear_acceleration>
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
</noise>
</z>
</linear_acceleration>
</imu>
<plugin name="turtlebot3_imu" filename="libgazebo_ros_imu_sensor.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
<remapping>~/out:=imu</remapping>
</ros>
</plugin>
</sensor>
</link>
<link name="base_scan">
<inertial>
<pose>-0.020 0 0.161 0 0 0</pose>
<inertia>
<ixx>0.001</ixx>
<ixy>0.000</ixy>
<ixz>0.000</ixz>
<iyy>0.001</iyy>
<iyz>0.000</iyz>
<izz>0.001</izz>
</inertia>
<mass>0.114</mass>
</inertial>
<collision name="lidar_sensor_collision">
<pose>-0.020 0 0.161 0 0 0</pose>
<geometry>
<cylinder>
<radius>0.0508</radius>
<length>0.055</length>
</cylinder>
</geometry>
</collision>
<visual name="lidar_sensor_visual">
<pose>-0.032 0 0.171 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/sensors/lds.stl</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
<material>
<ambient>0.2 0.2 0.2 1.0</ambient>
<diffuse>0.2 0.2 0.2 1.0</diffuse>
</material>
</visual>
<sensor name="hls_lfcd_lds" type="ray">
<always_on>true</always_on>
<visualize>true</visualize>
<pose>-0.032 0 0.171 0 0 0</pose>
<update_rate>5</update_rate>
<ray>
<scan>
<horizontal>
<samples>360</samples>
<resolution>1.000000</resolution>
<min_angle>0.000000</min_angle>
<max_angle>6.280000</max_angle>
</horizontal>
</scan>
<range>
<min>0.120000</min>
<max>3.5</max>
<resolution>0.015000</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin name="turtlebot3_laserscan" filename="libgazebo_ros_ray_sensor.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
<remapping>~/out:=scan</remapping>
</ros>
<output_type>sensor_msgs/LaserScan</output_type>
<frame_name>base_scan</frame_name>
</plugin>
</sensor>
</link>
<link name="velodyne_link">
<pose>0 0 0.24 0 0 0</pose>
<inertial>
<mass>0.12</mass>
<inertia>
<ixx>0.00012</ixx>
<iyy>0.00012</iyy>
<izz>0.00012</izz>
</inertia>
</inertial>
<visual name="velodyne_visual">
<geometry><cylinder><radius>0.035</radius><length>0.055</length></cylinder></geometry>
<material><ambient>0.08 0.08 0.08 1</ambient><diffuse>0.12 0.12 0.12 1</diffuse></material>
</visual>
<collision name="velodyne_collision">
<geometry><cylinder><radius>0.035</radius><length>0.055</length></cylinder></geometry>
</collision>
<sensor name="velodyne_3d" type="ray">
<always_on>true</always_on>
<visualize>false</visualize>
<update_rate>10</update_rate>
<ray>
<scan>
<horizontal><samples>720</samples><resolution>1</resolution><min_angle>-3.141593</min_angle><max_angle>3.141593</max_angle></horizontal>
<vertical><samples>16</samples><resolution>1</resolution><min_angle>-0.261799</min_angle><max_angle>0.261799</max_angle></vertical>
</scan>
<range><min>0.20</min><max>20.0</max><resolution>0.01</resolution></range>
<noise><type>gaussian</type><mean>0.0</mean><stddev>0.01</stddev></noise>
</ray>
<plugin name="velodyne_3d_ros" filename="libgazebo_ros_ray_sensor.so">
<ros><remapping>~/out:=raw/lidar</remapping></ros>
<output_type>sensor_msgs/PointCloud2</output_type>
<frame_name>velodyne_link</frame_name>
</plugin>
</sensor>
</link>
<link name="wheel_left_link">
<inertial>
<pose>0 0.08 0.023 -1.57 0 0</pose>
<inertia>
<ixx>1.8158194e-03</ixx>
<ixy>-9.3392e-12</ixy>
<ixz>1.04909e-11</ixz>
<iyy>3.2922126e-03</iyy>
<iyz>5.75694e-11</iyz>
<izz>1.8158194e-03</izz>
</inertia>
<mass>2.8498940e-02</mass>
</inertial>
<collision name="wheel_left_collision">
<pose>0 0.08 0.023 -1.57 0 0</pose>
<geometry>
<cylinder>
<radius>0.033</radius>
<length>0.018</length>
</cylinder>
</geometry>
<surface>
<!-- This friction pamareter don't contain reliable data!! -->
<friction>
<ode>
<mu>100000.0</mu>
<mu2>100000.0</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0.0</slip1>
<slip2>0.0</slip2>
</ode>
</friction>
<contact>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+5</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
<visual name="wheel_left_visual">
<pose>0 0.08 0.023 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/wheels/left_tire.stl</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
<material>
<ambient>0.2 0.2 0.2 1.0</ambient>
<diffuse>0.2 0.2 0.2 1.0</diffuse>
</material>
</visual>
</link>
<link name="wheel_right_link">
<inertial>
<pose>0.0 -0.08 0.023 -1.57 0 0</pose>
<inertia>
<ixx>1.8158194e-03</ixx>
<ixy>-9.3392e-12</ixy>
<ixz>1.04909e-11</ixz>
<iyy>3.2922126e-03</iyy>
<iyz>5.75694e-11</iyz>
<izz>1.8158194e-03</izz>
</inertia>
<mass>2.8498940e-02</mass>
</inertial>
<collision name="wheel_right_collision">
<pose>0.0 -0.08 0.023 -1.57 0 0</pose>
<geometry>
<cylinder>
<radius>0.033</radius>
<length>0.018</length>
</cylinder>
</geometry>
<surface>
<!-- This friction pamareter don't contain reliable data!! -->
<friction>
<ode>
<mu>100000.0</mu>
<mu2>100000.0</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0.0</slip1>
<slip2>0.0</slip2>
</ode>
</friction>
<contact>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+5</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
<visual name="wheel_right_visual">
<pose>0.0 -0.08 0.023 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/wheels/right_tire.stl</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
<material>
<ambient>0.2 0.2 0.2 1.0</ambient>
<diffuse>0.2 0.2 0.2 1.0</diffuse>
</material>
</visual>
</link>
<link name='caster_back_link'>
<pose>-0.081 0 -0.004 -1.57 0 0</pose>
<inertial>
<mass>0.005</mass>
<inertia>
<ixx>0.001</ixx>
<ixy>0.000</ixy>
<ixz>0.000</ixz>
<iyy>0.001</iyy>
<iyz>0.000</iyz>
<izz>0.001</izz>
</inertia>
</inertial>
<collision name='collision'>
<geometry>
<sphere>
<radius>0.005000</radius>
</sphere>
</geometry>
<surface>
<contact>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+5</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
</link>
<joint name="base_joint" type="fixed">
<parent>base_footprint</parent>
<child>base_link</child>
<pose>0.0 0.0 0.010 0 0 0</pose>
</joint>
<joint name="wheel_left_joint" type="revolute">
<parent>base_link</parent>
<child>wheel_left_link</child>
<pose>0.0 0.08 0.023 -1.57 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<joint name="wheel_right_joint" type="revolute">
<parent>base_link</parent>
<child>wheel_right_link</child>
<pose>0.0 -0.08 0.023 -1.57 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<joint name='caster_back_joint' type='ball'>
<parent>base_link</parent>
<child>caster_back_link</child>
</joint>
<joint name="imu_joint" type="fixed">
<parent>base_link</parent>
<child>imu_link</child>
<pose>-0.032 0 0.068 0 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<joint name="lidar_joint" type="fixed">
<parent>base_link</parent>
<child>base_scan</child>
<pose>-0.032 0 0.171 0 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<joint name="velodyne_joint" type="fixed">
<parent>base_link</parent>
<child>velodyne_link</child>
<pose>0 0 0.24 0 0 0</pose>
</joint>
<plugin name="turtlebot3_diff_drive" filename="libgazebo_ros_diff_drive.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
</ros>
<update_rate>30</update_rate>
<!-- wheels -->
<left_joint>wheel_left_joint</left_joint>
<right_joint>wheel_right_joint</right_joint>
<!-- kinematics -->
<wheel_separation>0.160</wheel_separation>
<wheel_diameter>0.066</wheel_diameter>
<!-- limits -->
<max_wheel_torque>20</max_wheel_torque>
<max_wheel_acceleration>1.0</max_wheel_acceleration>
<command_topic>cmd_vel</command_topic>
<!-- output -->
<publish_odom>true</publish_odom>
<publish_odom_tf>true</publish_odom_tf>
<publish_wheel_tf>false</publish_wheel_tf>
<odometry_topic>odom</odometry_topic>
<odometry_frame>odom</odometry_frame>
<robot_base_frame>base_footprint</robot_base_frame>
</plugin>
<plugin name="turtlebot3_joint_state" filename="libgazebo_ros_joint_state_publisher.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
<remapping>~/out:=joint_states</remapping>
</ros>
<update_rate>30</update_rate>
<joint_name>wheel_left_joint</joint_name>
<joint_name>wheel_right_joint</joint_name>
</plugin>
</model>
</sdf>
@@ -0,0 +1,408 @@
<?xml version="1.0" ?>
<sdf version="1.4">
<model name="turtlebot3_burger">
<pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
<link name="base_footprint"/>
<link name="base_link">
<inertial>
<pose>-0.032 0 0.070 0 0 0</pose>
<inertia>
<ixx>7.2397393e-01</ixx>
<ixy>4.686399e-10</ixy>
<ixz>-1.09525703e-08</ixz>
<iyy>7.2397393e-01</iyy>
<iyz>2.8582649e-09</iyz>
<izz>6.53050163e-01</izz>
</inertia>
<mass>8.2573504e-01</mass>
</inertial>
<collision name="base_collision">
<pose>-0.032 0 0.070 0 0 0</pose>
<geometry>
<box>
<size>0.140 0.140 0.140</size>
</box>
</geometry>
</collision>
<visual name="base_visual">
<pose>-0.032 0 0 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/burger_base.dae</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
</visual>
</link>
<link name="imu_link">
<sensor name="tb3_imu" type="imu">
<always_on>true</always_on>
<update_rate>200</update_rate>
<imu>
<angular_velocity>
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
</noise>
</z>
</angular_velocity>
<linear_acceleration>
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
</noise>
</z>
</linear_acceleration>
</imu>
<plugin name="turtlebot3_imu" filename="libgazebo_ros_imu_sensor.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
<remapping>~/out:=imu</remapping>
</ros>
</plugin>
</sensor>
</link>
<link name="base_scan">
<inertial>
<pose>-0.020 0 0.161 0 0 0</pose>
<inertia>
<ixx>0.001</ixx>
<ixy>0.000</ixy>
<ixz>0.000</ixz>
<iyy>0.001</iyy>
<iyz>0.000</iyz>
<izz>0.001</izz>
</inertia>
<mass>0.114</mass>
</inertial>
<collision name="lidar_sensor_collision">
<pose>-0.020 0 0.161 0 0 0</pose>
<geometry>
<cylinder>
<radius>0.0508</radius>
<length>0.055</length>
</cylinder>
</geometry>
</collision>
<visual name="lidar_sensor_visual">
<pose>-0.032 0 0.171 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/lds.dae</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
</visual>
<sensor name="hls_lfcd_lds" type="ray">
<always_on>true</always_on>
<visualize>true</visualize>
<pose>-0.032 0 0.171 0 0 0</pose>
<update_rate>5</update_rate>
<ray>
<scan>
<horizontal>
<samples>360</samples>
<resolution>1.000000</resolution>
<min_angle>0.000000</min_angle>
<max_angle>6.280000</max_angle>
</horizontal>
</scan>
<range>
<min>0.120000</min>
<max>3.5</max>
<resolution>0.015000</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin name="turtlebot3_laserscan" filename="libgazebo_ros_ray_sensor.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
<remapping>~/out:=scan</remapping>
</ros>
<output_type>sensor_msgs/LaserScan</output_type>
<frame_name>base_scan</frame_name>
</plugin>
</sensor>
</link>
<link name="wheel_left_link">
<inertial>
<pose>0 0.08 0.023 -1.57 0 0</pose>
<inertia>
<ixx>1.8158194e-03</ixx>
<ixy>-9.3392e-12</ixy>
<ixz>1.04909e-11</ixz>
<iyy>3.2922126e-03</iyy>
<iyz>5.75694e-11</iyz>
<izz>1.8158194e-03</izz>
</inertia>
<mass>2.8498940e-02</mass>
</inertial>
<collision name="wheel_left_collision">
<pose>0 0.08 0.023 -1.57 0 0</pose>
<geometry>
<cylinder>
<radius>0.033</radius>
<length>0.018</length>
</cylinder>
</geometry>
<surface>
<!-- This friction pamareter don't contain reliable data!! -->
<friction>
<ode>
<mu>100000.0</mu>
<mu2>100000.0</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0.0</slip1>
<slip2>0.0</slip2>
</ode>
</friction>
<contact>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+5</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
<visual name="wheel_left_visual">
<pose>0 0.08 0.023 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/tire.dae</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
</visual>
</link>
<link name="wheel_right_link">
<inertial>
<pose>0.0 -0.08 0.023 -1.57 0 0</pose>
<inertia>
<ixx>1.8158194e-03</ixx>
<ixy>-9.3392e-12</ixy>
<ixz>1.04909e-11</ixz>
<iyy>3.2922126e-03</iyy>
<iyz>5.75694e-11</iyz>
<izz>1.8158194e-03</izz>
</inertia>
<mass>2.8498940e-02</mass>
</inertial>
<collision name="wheel_right_collision">
<pose>0.0 -0.08 0.023 -1.57 0 0</pose>
<geometry>
<cylinder>
<radius>0.033</radius>
<length>0.018</length>
</cylinder>
</geometry>
<surface>
<!-- This friction pamareter don't contain reliable data!! -->
<friction>
<ode>
<mu>100000.0</mu>
<mu2>100000.0</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0.0</slip1>
<slip2>0.0</slip2>
</ode>
</friction>
<contact>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+5</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
<visual name="wheel_right_visual">
<pose>0.0 -0.08 0.023 0 0 0</pose>
<geometry>
<mesh>
<uri>model://turtlebot3_common/meshes/tire.dae</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
</visual>
</link>
<link name='caster_back_link'>
<pose>-0.081 0 -0.004 -1.57 0 0</pose>
<inertial>
<mass>0.005</mass>
<inertia>
<ixx>0.001</ixx>
<ixy>0.000</ixy>
<ixz>0.000</ixz>
<iyy>0.001</iyy>
<iyz>0.000</iyz>
<izz>0.001</izz>
</inertia>
</inertial>
<collision name='collision'>
<geometry>
<sphere>
<radius>0.005000</radius>
</sphere>
</geometry>
<surface>
<contact>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+5</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
</link>
<joint name="base_joint" type="fixed">
<parent>base_footprint</parent>
<child>base_link</child>
<pose>0.0 0.0 0.010 0 0 0</pose>
</joint>
<joint name="wheel_left_joint" type="revolute">
<parent>base_link</parent>
<child>wheel_left_link</child>
<pose>0.0 0.08 0.023 -1.57 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<joint name="wheel_right_joint" type="revolute">
<parent>base_link</parent>
<child>wheel_right_link</child>
<pose>0.0 -0.08 0.023 -1.57 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<joint name='caster_back_joint' type='ball'>
<parent>base_link</parent>
<child>caster_back_link</child>
</joint>
<joint name="imu_joint" type="fixed">
<parent>base_link</parent>
<child>imu_link</child>
<pose>-0.032 0 0.068 0 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<joint name="lidar_joint" type="fixed">
<parent>base_link</parent>
<child>base_scan</child>
<pose>-0.032 0 0.171 0 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
</axis>
</joint>
<plugin name="turtlebot3_diff_drive" filename="libgazebo_ros_diff_drive.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
</ros>
<update_rate>30</update_rate>
<!-- wheels -->
<left_joint>wheel_left_joint</left_joint>
<right_joint>wheel_right_joint</right_joint>
<!-- kinematics -->
<wheel_separation>0.160</wheel_separation>
<wheel_diameter>0.066</wheel_diameter>
<!-- limits -->
<max_wheel_torque>20</max_wheel_torque>
<max_wheel_acceleration>1.0</max_wheel_acceleration>
<command_topic>cmd_vel</command_topic>
<!-- output -->
<publish_odom>true</publish_odom>
<publish_odom_tf>true</publish_odom_tf>
<publish_wheel_tf>false</publish_wheel_tf>
<odometry_topic>odom</odometry_topic>
<odometry_frame>odom</odometry_frame>
<robot_base_frame>base_footprint</robot_base_frame>
</plugin>
<plugin name="turtlebot3_joint_state" filename="libgazebo_ros_joint_state_publisher.so">
<ros>
<!-- <namespace>/tb3</namespace> -->
<remapping>~/out:=joint_states</remapping>
</ros>
<update_rate>30</update_rate>
<joint_name>wheel_left_joint</joint_name>
<joint_name>wheel_right_joint</joint_name>
</plugin>
</model>
</sdf>

Some files were not shown because too many files have changed in this diff Show More