update
97
README.md
|
|
@ -1,18 +1,93 @@
|
|||
# 开始拉取代码
|
||||
* 语义推理与导航
|
||||
|
||||
智能语义推理框架包含两个核心模块:
|
||||
语义目标标注:利用 VLM识别物体
|
||||
语义导航:机器人借助已保存的物体记忆,通过语义路标完成导航。
|
||||
|
||||
语义标注模块将 Faster R-CNN 与 CLIP 结合,实现零样本目标检测。
|
||||
|
||||
给定一个物体列表(例如:["Refrigerator", "water dispenser", "sofa", "white toilet", "office chair with wheels"]),由 Faster R-CNN 从 RGB 图像帧中生成候选区域。
|
||||
|
||||
随后,使用 CLIP 将每个候选区域进行特征编码,并与文本标签做余弦相似度对比,为区域分配最可能的类别标签。
|
||||
|
||||
点击 RViz2 中Nav2 Goal,在地图上选择目标位置,调整箭头设置机器人到达后的朝向,确认后机器人将自主导航,在探索过程中,系统会结合 RGB-D 数据 记录物体的中心坐标,并将置信度分数与位置信息存入 JSON 文件。
|
||||
只有当检测到更高置信度的结果时,才会更新原有记录。
|
||||
|
||||
## 1. 环境要求
|
||||
- Ubuntu 22.04
|
||||
- ROS2 Humble
|
||||
- Gazebo Sim Harmonic
|
||||
---
|
||||
```
|
||||
git clone http://git-test.databall.tech:3000/hq/ros2_office_vlm.git
|
||||
|
||||
cd ros2_office_vlm
|
||||
### 编译
|
||||
|
||||
# add your files to repo
|
||||
git push
|
||||
```bash
|
||||
cd /workspace
|
||||
colcon build --symlink-install
|
||||
source /opt/ros/humble/setup.bash
|
||||
source install/setup.bash
|
||||
```
|
||||
---
|
||||
|
||||
### 注意事项
|
||||
之后每打开一个新终端,都建议先执行:
|
||||
|
||||
```bash
|
||||
source /opt/ros/humble/setup.bash
|
||||
source install/setup.bash
|
||||
export TURTLEBOT3_MODEL=burger
|
||||
export NAV2_MAP_PATH=/workspace/src/turtlebot3_simulations/turtlebot3_gazebo/map/office_map.yaml
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin http://git-test.databall.tech:3000/hq/ros2_office_vlm.git
|
||||
git branch -M main
|
||||
git push -uf origin main
|
||||
|
||||
为了方便,也可以写入 `~/.bashrc`:
|
||||
|
||||
```bash
|
||||
echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc
|
||||
echo 'source /workspace/install/setup.bash' >> ~/.bashrc
|
||||
echo 'export TURTLEBOT3_MODEL=burger' >> ~/.bashrc
|
||||
echo 'export NAV2_MAP_PATH=/workspace/src/turtlebot3_simulations/turtlebot3_gazebo/map/office_map.yaml' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
```
|
||||
1. 启动仿真, Nav2导航栈, AMCL节点,rviz
|
||||
|
||||
```bash
|
||||
./gzsim_run.sh
|
||||
|
||||
ros2 launch nav2_rrtstar_planner bringup_localization_with_initial_pose.launch.py \
|
||||
use_sim_time:=true \
|
||||
map:=$NAV2_MAP_PATH
|
||||
|
||||
ros2 launch nav2_bringup navigation_launch.py \
|
||||
use_sim_time:=True \
|
||||
params_file:=/workspace/src/TurtleBot-RRT-Star/nav2_params.yaml \
|
||||
map:=$NAV2_MAP_PATH
|
||||
|
||||
ros2 run rviz2 rviz2 -d /opt/ros/humble/share/nav2_bringup/rviz/nav2_default_view.rviz --ros-args -p use_sim_time:=true
|
||||
|
||||
```
|
||||
2. 新开终端,执行环境生效后启动vlm_perception_pkg的语义检测节点,开始目标语义标注并构建语义记忆库,在机器人导航过程中,节点实时检测环境中的目标并生成语义标注结果,保存JSON 格式的语义记忆库到指定路径。
|
||||
```bash
|
||||
ros2 run vlm_perception_pkg vlm_detection
|
||||
# ros2 run vlm_perception_pkg vlm_detection --ros-args -p use_sim_time:=true -p reset_records_on_startup:=true # 重置检测记录
|
||||
```
|
||||
3. 加载生成的语义记忆库文件(in /workspace/src/vlm_nav_pkg/config),通过 CLIP 将语义标签编码为shared embedding space,当用户输入自然语言查询时,系统匹配最接近的已知目标,提取其坐标并发送至 Nav2,实现基于自然语言的语义导航。以下是验证步骤:
|
||||
4. 重新启动仿真, Nav2导航栈, AMCL节点,rviz
|
||||
```bash
|
||||
|
||||
./gzsim_run.sh
|
||||
|
||||
ros2 launch nav2_rrtstar_planner bringup_localization_with_initial_pose.launch.py \
|
||||
use_sim_time:=true \
|
||||
map:=$NAV2_MAP_PATH
|
||||
|
||||
ros2 launch nav2_bringup navigation_launch.py \
|
||||
use_sim_time:=True \
|
||||
params_file:=/workspace/src/TurtleBot-RRT-Star/nav2_params.yaml \
|
||||
map:=$NAV2_MAP_PATH
|
||||
|
||||
ros2 run rviz2 rviz2 -d /opt/ros/humble/share/nav2_bringup/rviz/nav2_default_view.rviz --ros-args -p use_sim_time:=true
|
||||
|
||||
pip3 install "numpy<2"
|
||||
ros2 run vlm_nav_pkg semantic_nav
|
||||
```
|
||||
|
||||
节点启动后,在终端输入自然语言语义目标(如 “water dispenser”“sofa”),系统将自动完成:语义查询与shared embedding space匹配,提取目标对应的地图坐标并向 Nav2 发送导航目标位姿,然后机器人自主规划路径并导航至语义目标位置,RViz2 中实时可视化规划路径与导航过程
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 230 KiB |
|
|
@ -0,0 +1,68 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
ROOT="/workspace"
|
||||
|
||||
sleep 5
|
||||
|
||||
set +u
|
||||
source /opt/ros/humble/setup.bash
|
||||
source "${ROOT}/install/setup.bash"
|
||||
set -u
|
||||
|
||||
LOG_DIR="${ROOT}/autorun_logs/autorun_$(date +%Y%m%d_%H%M%S)"
|
||||
mkdir -p "$LOG_DIR"
|
||||
|
||||
kill_port_listeners() {
|
||||
local port="$1"
|
||||
local pids
|
||||
pids="$(ss -ltnp 2>/dev/null | grep ":${port} " | sed -E 's/.*pid=([0-9]+).*/\1/' | sort -u || true)"
|
||||
if [[ -n "${pids}" ]]; then
|
||||
echo "[run_all] port ${port} already in use, killing: ${pids}"
|
||||
kill ${pids} 2>/dev/null || true
|
||||
sleep 1
|
||||
fi
|
||||
}
|
||||
|
||||
kill_port_listeners 9002
|
||||
|
||||
export TURTLEBOT3_MODEL=burger
|
||||
ros2 launch turtlebot3_gazebo turtlebot3_office.launch.py > "${LOG_DIR}/tb3_gzsim.log" 2>&1 &
|
||||
GZSIM_PID=$!
|
||||
# gz sim -v 4 -s -r empty.sdf > "${LOG_DIR}/empty_gzsim.log" 2>&1 &
|
||||
# GZSIM_PID=$!
|
||||
|
||||
echo "[autorun] tb3_gzsim pid=${GZSIM_PID}, log=${LOG_DIR}/tb3_gzsim.log"
|
||||
|
||||
sleep 8
|
||||
|
||||
if ps -p "$GZSIM_PID" > /dev/null; then
|
||||
echo "[autorun] tb3_gzsim is still running"
|
||||
else
|
||||
echo "[autorun] tb3_gzsim exited early. Log:"
|
||||
cat "${LOG_DIR}/tb3_gzsim.log"
|
||||
fi
|
||||
|
||||
echo "[autorun] starting websocket ..."
|
||||
|
||||
gz launch "${ROOT}/src/websocket.gzlaunch" > "${LOG_DIR}/websocket.log" 2>&1 &
|
||||
WEBSOCKET_PID=$!
|
||||
|
||||
echo "[autorun] websocket pid=${WEBSOCKET_PID}, log=${LOG_DIR}/websocket.log"
|
||||
|
||||
sleep 10
|
||||
|
||||
if ps -p "$WEBSOCKET_PID" > /dev/null; then
|
||||
echo "[autorun] websocket is still running"
|
||||
else
|
||||
echo "[autorun] websocket exited early. Log:"
|
||||
cat "${LOG_DIR}/websocket.log"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[autorun] all services started."
|
||||
echo "[autorun] tb3_gzsim pid=${GZSIM_PID}"
|
||||
echo "[autorun] websocket pid=${WEBSOCKET_PID}"
|
||||
|
||||
wait
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
################################################################################
|
||||
# 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
|
||||
# NOTE: Migrating from Gazebo Classic to Gazebo Sim (gz-8 / Harmonic)
|
||||
################################################################################
|
||||
find_package(ament_cmake REQUIRED)
|
||||
|
||||
# ROS 2 core packages
|
||||
find_package(geometry_msgs REQUIRED)
|
||||
find_package(nav_msgs REQUIRED)
|
||||
find_package(rclcpp REQUIRED)
|
||||
find_package(sensor_msgs REQUIRED)
|
||||
find_package(tf2 REQUIRED)
|
||||
|
||||
# Gazebo Sim (Harmonic) libraries
|
||||
find_package(gz-sim8 REQUIRED)
|
||||
find_package(gz-msgs10 REQUIRED)
|
||||
find_package(gz-transport13 REQUIRED)
|
||||
find_package(gz-physics7 REQUIRED)
|
||||
find_package(gz-math7 REQUIRED)
|
||||
find_package(gz-common5 REQUIRED)
|
||||
find_package(gz-plugin2 REQUIRED)
|
||||
find_package(sdformat14 REQUIRED)
|
||||
|
||||
# Optional: ros_gz bridge packages (for launch integration)
|
||||
find_package(ros_gz_bridge QUIET)
|
||||
find_package(ros_gz_sim QUIET)
|
||||
|
||||
################################################################################
|
||||
# Build
|
||||
################################################################################
|
||||
|
||||
include_directories(
|
||||
include
|
||||
${gz-sim8_INCLUDE_DIRS}
|
||||
${gz-msgs10_INCLUDE_DIRS}
|
||||
${gz-transport13_INCLUDE_DIRS}
|
||||
${gz-physics7_INCLUDE_DIRS}
|
||||
${gz-math7_INCLUDE_DIRS}
|
||||
${gz-common5_INCLUDE_DIRS}
|
||||
${gz-plugin2_INCLUDE_DIRS}
|
||||
${sdformat14_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(dependencies
|
||||
"geometry_msgs"
|
||||
"nav_msgs"
|
||||
"rclcpp"
|
||||
"sensor_msgs"
|
||||
"tf2"
|
||||
)
|
||||
|
||||
# --- Executable: turtlebot3_drive (ROS 2 navigation node, no gazebo deps) ---
|
||||
set(EXEC_NAME "turtlebot3_drive")
|
||||
add_executable(${EXEC_NAME} src/turtlebot3_drive.cpp)
|
||||
ament_target_dependencies(${EXEC_NAME} ${dependencies})
|
||||
|
||||
# --- Shared Libraries: Custom Gazebo Sim System Plugins ---
|
||||
# NOTE: These plugins originally used the Gazebo Classic API (gazebo::ModelPlugin)
|
||||
# with headers like <gazebo/gazebo.hh>. They must be rewritten to use the
|
||||
# gz-sim System API (ISystemPreUpdate, EntityComponentManager, etc.)
|
||||
# before they can compile. Default OFF until porting is done.
|
||||
option(BUILD_GAZEBO_PLUGINS "Build custom Gazebo Sim system plugins" OFF)
|
||||
|
||||
if(BUILD_GAZEBO_PLUGINS)
|
||||
set(GZ_PLUGIN_LIBRARIES
|
||||
gz-sim8::gz-sim8
|
||||
gz-msgs10::gz-msgs10
|
||||
gz-transport13::gz-transport13
|
||||
gz-physics7::gz-physics7
|
||||
gz-math7::gz-math7
|
||||
gz-common5::gz-common5
|
||||
gz-plugin2::gz-plugin2
|
||||
sdformat14::sdformat14
|
||||
)
|
||||
|
||||
add_library(traffic_light_plugin SHARED src/traffic_light_plugin.cpp)
|
||||
target_link_libraries(traffic_light_plugin ${GZ_PLUGIN_LIBRARIES})
|
||||
|
||||
add_library(traffic_bar_plugin SHARED src/traffic_bar_plugin.cpp)
|
||||
target_link_libraries(traffic_bar_plugin ${GZ_PLUGIN_LIBRARIES})
|
||||
|
||||
add_library(obstacle1 SHARED src/obstacle1.cpp)
|
||||
target_link_libraries(obstacle1 ${GZ_PLUGIN_LIBRARIES})
|
||||
|
||||
add_library(obstacle2 SHARED src/obstacle2.cpp)
|
||||
target_link_libraries(obstacle2 ${GZ_PLUGIN_LIBRARIES})
|
||||
|
||||
add_library(obstacles SHARED src/obstacles.cpp)
|
||||
target_link_libraries(obstacles ${GZ_PLUGIN_LIBRARIES})
|
||||
endif()
|
||||
|
||||
################################################################################
|
||||
# Install
|
||||
################################################################################
|
||||
install(TARGETS ${EXEC_NAME}
|
||||
DESTINATION lib/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
install(DIRECTORY launch config models rviz urdf worlds scripts gui
|
||||
DESTINATION share/${PROJECT_NAME}/
|
||||
)
|
||||
|
||||
# Install Python scripts with correct permissions
|
||||
install(PROGRAMS scripts/scan_frame_fix.py scripts/camera_topic_remap.py
|
||||
DESTINATION lib/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
install(DIRECTORY include/
|
||||
DESTINATION include/
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Export & Macro for ament package
|
||||
################################################################################
|
||||
ament_export_include_directories(include)
|
||||
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,69 @@
|
|||
# TurtleBot3 Burger - Gz Sim to ROS 2 Bridge Configuration
|
||||
# For use with ros_gz_bridge bridge_node
|
||||
#
|
||||
# Key migration notes (Gazebo Classic -> Gazebo Sim):
|
||||
# 1. gz-sim-diff-drive publishes Odometry but NOT TF (unlike Classic).
|
||||
# TF is bridged from /world/<world>/pose/info (gz.msgs.Pose_V -> TFMessage).
|
||||
# 2. Sensor frame_ids use Gazebo scoped names (e.g. burger/base_scan/...).
|
||||
# Overridden below via 'frame_id' field to match URDF/robot_state_publisher tree.
|
||||
|
||||
# === TF: bridge Gazebo model tf to ROS2 /tf ===
|
||||
# /model/burger/tf publishes gz.msgs.Pose_V (NOT Pose!)
|
||||
# ros_gz_bridge converts Pose_V -> TFMessage correctly.
|
||||
- ros_topic_name: /tf
|
||||
ros_type_name: tf2_msgs/msg/TFMessage
|
||||
gz_topic_name: /model/burger/tf
|
||||
gz_type_name: gz.msgs.Pose_V
|
||||
direction: GZ_TO_ROS
|
||||
|
||||
# === Sensor bridges ===
|
||||
- ros_topic_name: /scan_raw
|
||||
ros_type_name: sensor_msgs/msg/LaserScan
|
||||
gz_topic_name: /world/default/model/burger/link/base_scan/sensor/hls_lfcd_lds/scan
|
||||
gz_type_name: gz.msgs.LaserScan
|
||||
direction: GZ_TO_ROS
|
||||
|
||||
- ros_topic_name: /intel_realsense_r200_rgb/image_raw
|
||||
ros_type_name: sensor_msgs/msg/Image
|
||||
gz_topic_name: /world/default/model/burger/link/realsense_link/sensor/intel_realsense_r200_rgb/image
|
||||
gz_type_name: gz.msgs.Image
|
||||
direction: GZ_TO_ROS
|
||||
|
||||
- ros_topic_name: /intel_realsense_r200_rgb/camera_info
|
||||
ros_type_name: sensor_msgs/msg/CameraInfo
|
||||
gz_topic_name: /world/default/model/burger/link/realsense_link/sensor/intel_realsense_r200_rgb/camera_info
|
||||
gz_type_name: gz.msgs.CameraInfo
|
||||
direction: GZ_TO_ROS
|
||||
|
||||
# === Depth image (L16 workaround for Humble) ===
|
||||
# Gazebo depth camera with <format>L16</format> publishes on /depth_image topic
|
||||
# as gz.msgs.Image type (NOT /image). This bypasses unsupported gz.msgs.DepthImage.
|
||||
- ros_topic_name: /intel_realsense_r200_depth/depth/image_raw
|
||||
ros_type_name: sensor_msgs/msg/Image
|
||||
gz_topic_name: /world/default/model/burger/link/realsense_link/sensor/intel_realsense_r200_depth/depth_image
|
||||
gz_type_name: gz.msgs.Image
|
||||
direction: GZ_TO_ROS
|
||||
|
||||
- ros_topic_name: /intel_realsense_r200_depth/camera_info
|
||||
ros_type_name: sensor_msgs/msg/CameraInfo
|
||||
gz_topic_name: /world/default/model/burger/link/realsense_link/sensor/intel_realsense_r200_depth/camera_info
|
||||
gz_type_name: gz.msgs.CameraInfo
|
||||
direction: GZ_TO_ROS
|
||||
|
||||
- ros_topic_name: /clock
|
||||
ros_type_name: rosgraph_msgs/msg/Clock
|
||||
gz_topic_name: /clock
|
||||
gz_type_name: gz.msgs.Clock
|
||||
direction: GZ_TO_ROS
|
||||
|
||||
- ros_topic_name: /cmd_vel
|
||||
ros_type_name: geometry_msgs/msg/Twist
|
||||
gz_topic_name: /model/burger/cmd_vel
|
||||
gz_type_name: gz.msgs.Twist
|
||||
direction: ROS_TO_GZ
|
||||
|
||||
- ros_topic_name: /odom
|
||||
ros_type_name: nav_msgs/msg/Odometry
|
||||
gz_topic_name: /model/burger/odometry
|
||||
gz_type_name: gz.msgs.Odometry
|
||||
direction: GZ_TO_ROS
|
||||
|
|
@ -0,0 +1,270 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- Quick start dialog -->
|
||||
<dialog name="quick_start" show_again="true"/>
|
||||
|
||||
<!-- Window -->
|
||||
<window>
|
||||
<width>1400</width>
|
||||
<height>900</height>
|
||||
<style
|
||||
material_theme="Light"
|
||||
material_primary="DeepOrange"
|
||||
material_accent="LightBlue"
|
||||
toolbar_color_light="#f3f3f3"
|
||||
toolbar_text_color_light="#111111"
|
||||
toolbar_color_dark="#414141"
|
||||
toolbar_text_dark="#f3f3f3"
|
||||
plugin_toolbar_color_light="#bbdefb"
|
||||
plugin_toolbar_text_color_light="#111111"
|
||||
plugin_toolbar_color_dark="#607d8b"
|
||||
plugin_toolbar_text_color_dark="#eeeeee"
|
||||
/>
|
||||
<menus>
|
||||
<drawer default="false">
|
||||
</drawer>
|
||||
</menus>
|
||||
<dialog_on_exit>true</dialog_on_exit>
|
||||
</window>
|
||||
|
||||
<!-- GUI plugins -->
|
||||
|
||||
<!-- 3D scene -->
|
||||
<plugin filename="MinimalScene" name="3D View">
|
||||
<gz-gui>
|
||||
<title>3D View</title>
|
||||
<property type="bool" key="showTitleBar">false</property>
|
||||
<property type="string" key="state">docked</property>
|
||||
</gz-gui>
|
||||
|
||||
<engine>ogre2</engine>
|
||||
<scene>scene</scene>
|
||||
<ambient_light>0.4 0.4 0.4</ambient_light>
|
||||
<background_color>0.8 0.8 0.8</background_color>
|
||||
<camera_pose>0 -5 12 0 1.2 1.57</camera_pose>
|
||||
</plugin>
|
||||
|
||||
<!-- Plugins that add functionality to the scene -->
|
||||
<plugin filename="EntityContextMenuPlugin" name="Entity context menu">
|
||||
<gz-gui>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="width" type="double">5</property>
|
||||
<property key="height" type="double">5</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
<plugin filename="GzSceneManager" name="Scene Manager">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="width" type="double">5</property>
|
||||
<property key="height" type="double">5</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
<plugin filename="InteractiveViewControl" name="Interactive view control">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="width" type="double">5</property>
|
||||
<property key="height" type="double">5</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
<plugin filename="CameraTracking" name="Camera Tracking">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="width" type="double">5</property>
|
||||
<property key="height" type="double">5</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
<plugin filename="MarkerManager" name="Marker manager">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="width" type="double">5</property>
|
||||
<property key="height" type="double">5</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
<plugin filename="SelectEntities" name="Select Entities">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="width" type="double">5</property>
|
||||
<property key="height" type="double">5</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
||||
<plugin filename="Spawn" name="Spawn Entities">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="width" type="double">5</property>
|
||||
<property key="height" type="double">5</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
||||
<plugin filename="VisualizationCapabilities" name="Visualization Capabilities">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="width" type="double">5</property>
|
||||
<property key="height" type="double">5</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
||||
<!-- World control -->
|
||||
<plugin filename="WorldControl" name="World control">
|
||||
<gz-gui>
|
||||
<title>World control</title>
|
||||
<property type="bool" key="showTitleBar">false</property>
|
||||
<property type="bool" key="resizable">false</property>
|
||||
<property type="double" key="height">72</property>
|
||||
<property type="double" key="z">1</property>
|
||||
|
||||
<property type="string" key="state">floating</property>
|
||||
<anchors target="3D View">
|
||||
<line own="left" target="left"/>
|
||||
<line own="bottom" target="bottom"/>
|
||||
</anchors>
|
||||
</gz-gui>
|
||||
|
||||
<play_pause>true</play_pause>
|
||||
<step>true</step>
|
||||
<start_paused>true</start_paused>
|
||||
<use_event>true</use_event>
|
||||
|
||||
</plugin>
|
||||
|
||||
<!-- World statistics -->
|
||||
<plugin filename="WorldStats" name="World stats">
|
||||
<gz-gui>
|
||||
<title>World stats</title>
|
||||
<property type="bool" key="showTitleBar">false</property>
|
||||
<property type="bool" key="resizable">false</property>
|
||||
<property type="double" key="height">110</property>
|
||||
<property type="double" key="width">290</property>
|
||||
<property type="double" key="z">1</property>
|
||||
|
||||
<property type="string" key="state">floating</property>
|
||||
<anchors target="3D View">
|
||||
<line own="right" target="right"/>
|
||||
<line own="bottom" target="bottom"/>
|
||||
</anchors>
|
||||
</gz-gui>
|
||||
|
||||
<sim_time>true</sim_time>
|
||||
<real_time>true</real_time>
|
||||
<real_time_factor>true</real_time_factor>
|
||||
<iterations>true</iterations>
|
||||
</plugin>
|
||||
|
||||
<!-- Insert simple shapes -->
|
||||
<plugin filename="Shapes" name="Shapes">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="x" type="double">0</property>
|
||||
<property key="y" type="double">0</property>
|
||||
<property key="width" type="double">300</property>
|
||||
<property key="height" type="double">50</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
<property key="cardBackground" type="string">#666666</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
||||
<!-- Insert lights -->
|
||||
<plugin filename="Lights" name="Lights">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="x" type="double">300</property>
|
||||
<property key="y" type="double">0</property>
|
||||
<property key="width" type="double">150</property>
|
||||
<property key="height" type="double">50</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
<property key="cardBackground" type="string">#666666</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
||||
<!-- Translate / rotate -->
|
||||
<plugin filename="TransformControl" name="Transform control">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="x" type="double">0</property>
|
||||
<property key="y" type="double">50</property>
|
||||
<property key="width" type="double">250</property>
|
||||
<property key="height" type="double">50</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
<property key="cardBackground" type="string">#777777</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
||||
<!-- Screenshot -->
|
||||
<plugin filename="Screenshot" name="Screenshot">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="x" type="double">250</property>
|
||||
<property key="y" type="double">50</property>
|
||||
<property key="width" type="double">50</property>
|
||||
<property key="height" type="double">50</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
<property key="cardBackground" type="string">#777777</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
||||
<!-- Copy/Paste -->
|
||||
<plugin filename="CopyPaste" name="CopyPaste">
|
||||
<gz-gui>
|
||||
<property key="resizable" type="bool">false</property>
|
||||
<property key="x" type="double">300</property>
|
||||
<property key="y" type="double">50</property>
|
||||
<property key="width" type="double">100</property>
|
||||
<property key="height" type="double">50</property>
|
||||
<property key="state" type="string">floating</property>
|
||||
<property key="showTitleBar" type="bool">false</property>
|
||||
<property key="cardBackground" type="string">#777777</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
||||
<!-- Inspector -->
|
||||
<plugin filename="ComponentInspector" name="Component inspector">
|
||||
<gz-gui>
|
||||
<property type="bool" key="showTitleBar">false</property>
|
||||
<property type="string" key="state">docked</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
||||
<!-- Entity tree -->
|
||||
<plugin filename="EntityTree" name="Entity tree">
|
||||
<gz-gui>
|
||||
<property type="bool" key="showTitleBar">false</property>
|
||||
<property type="string" key="state">docked</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
||||
<!-- Image Display - show camera images from GzSim sensors -->
|
||||
<plugin filename="ImageDisplay" name="Image Display">
|
||||
<gz-gui>
|
||||
<title>Image Display</title>
|
||||
<property type="bool" key="showTitleBar">true</property>
|
||||
<property type="string" key="state">docked</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
||||
<!-- Visualize Lidar - show lidar point cloud visualization -->
|
||||
<plugin filename="VisualizeLidar" name="Visualize Lidar">
|
||||
<gz-gui>
|
||||
<title>Visualize Lidar</title>
|
||||
<property type="bool" key="showTitleBar">true</property>
|
||||
<property type="string" key="state">docked</property>
|
||||
</gz-gui>
|
||||
</plugin>
|
||||
|
|
@ -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_gazebo'),
|
||||
'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,87 @@
|
|||
# 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.
|
||||
# Migrated from Gazebo Classic to Gazebo Sim (gz-sim / Harmonic)
|
||||
|
||||
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():
|
||||
# Pre-resolve package paths (portable across environments)
|
||||
turtlebot3_gazebo_share = get_package_share_directory('turtlebot3_gazebo')
|
||||
|
||||
# Get the SDF file
|
||||
TURTLEBOT3_MODEL = os.environ['TURTLEBOT3_MODEL']
|
||||
model_folder = 'turtlebot3_' + TURTLEBOT3_MODEL
|
||||
sdf_path = os.path.join(
|
||||
turtlebot3_gazebo_share,
|
||||
'models',
|
||||
model_folder,
|
||||
'model_gz.sdf'
|
||||
)
|
||||
|
||||
# Bridge configuration YAML (avoids --ros-args -p @ parsing issue)
|
||||
bridge_config_path = os.path.join(
|
||||
turtlebot3_gazebo_share, 'config', 'turtlebot3_gz_bridge.yaml'
|
||||
)
|
||||
|
||||
# Launch configuration variables specific to simulation
|
||||
x_pose = LaunchConfiguration('x_pose', default='3.0')
|
||||
y_pose = LaunchConfiguration('y_pose', default='3.0')
|
||||
|
||||
# Declare the launch arguments
|
||||
declare_x_position_cmd = DeclareLaunchArgument(
|
||||
'x_pose', default_value='3.0',
|
||||
description='Specify namespace of the robot')
|
||||
|
||||
declare_y_position_cmd = DeclareLaunchArgument(
|
||||
'y_pose', default_value='3.0',
|
||||
description='Specify namespace of the robot')
|
||||
|
||||
start_gz_spawner_cmd = Node(
|
||||
package='ros_gz_sim',
|
||||
executable='create',
|
||||
arguments=[
|
||||
'-name', TURTLEBOT3_MODEL,
|
||||
'-file', sdf_path,
|
||||
'-x', x_pose,
|
||||
'-y', y_pose,
|
||||
'-z', '0.03'
|
||||
],
|
||||
output='screen',
|
||||
)
|
||||
|
||||
start_bridge_cmd = Node(
|
||||
package='ros_gz_bridge',
|
||||
executable='bridge_node',
|
||||
parameters=[{
|
||||
'config_file': bridge_config_path,
|
||||
'use_sim_time': True,
|
||||
}],
|
||||
output='screen'
|
||||
)
|
||||
|
||||
ld = LaunchDescription()
|
||||
|
||||
ld.add_action(declare_x_position_cmd)
|
||||
ld.add_action(declare_y_position_cmd)
|
||||
ld.add_action(start_gz_spawner_cmd)
|
||||
ld.add_action(start_bridge_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,100 @@
|
|||
#!/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
|
||||
# Migrated from Gazebo Classic to Gazebo Sim (gz-sim / Harmonic)
|
||||
|
||||
import os
|
||||
|
||||
from ament_index_python.packages import get_package_share_directory
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import IncludeLaunchDescription, SetEnvironmentVariable
|
||||
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
||||
from launch.substitutions import LaunchConfiguration
|
||||
from launch_ros.actions import Node
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
launch_file_dir = os.path.join(get_package_share_directory('turtlebot3_gazebo'), 'launch')
|
||||
|
||||
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')
|
||||
|
||||
pkg_share_dir = get_package_share_directory('turtlebot3_gazebo')
|
||||
world = os.path.join(pkg_share_dir, 'worlds', 'office_gz_dartsim.sdf')
|
||||
models_path = os.path.join(pkg_share_dir, 'models')
|
||||
office_models_path = os.path.join(models_path, 'turtlebot3_office')
|
||||
|
||||
# Headless mode: no GUI, no RVIZ
|
||||
# gui_config = os.path.join(pkg_share_dir, 'gui', 'office_gui.config')
|
||||
# gz_args = f'-r {world} --gui-config {gui_config}'
|
||||
gz_args = f'-r -s {world}'
|
||||
# gz_args = f'-r {world}'
|
||||
|
||||
gz_sim_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(
|
||||
get_package_share_directory('ros_gz_sim'),
|
||||
'launch',
|
||||
'gz_sim.launch.py'
|
||||
)
|
||||
),
|
||||
launch_arguments={'gz_args': gz_args}.items()
|
||||
)
|
||||
|
||||
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()
|
||||
)
|
||||
|
||||
# Fix LaserScan frame_id:
|
||||
# bridge publishes on /scan_raw (frame_id = 'burger/base_scan/hls_lfcd_lds')
|
||||
# this node republishes on /scan with corrected frame_id = 'base_scan'
|
||||
scan_frame_fix_cmd = Node(
|
||||
package='turtlebot3_gazebo',
|
||||
executable='scan_frame_fix.py',
|
||||
output='screen',
|
||||
parameters=[{'use_sim_time': True}],
|
||||
)
|
||||
|
||||
ld = LaunchDescription()
|
||||
|
||||
# Set GZ_SIM_RESOURCE_PATH so gz sim can resolve model:// URIs
|
||||
ld.add_action(SetEnvironmentVariable(
|
||||
name='GZ_SIM_RESOURCE_PATH',
|
||||
value=office_models_path + os.pathsep + models_path
|
||||
))
|
||||
|
||||
# Add the commands to the launch description
|
||||
ld.add_action(gz_sim_cmd)
|
||||
ld.add_action(robot_state_publisher_cmd)
|
||||
ld.add_action(spawn_turtlebot_cmd)
|
||||
ld.add_action(scan_frame_fix_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
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
image: office_map.pgm
|
||||
mode: trinary
|
||||
resolution: 0.05
|
||||
origin: [-5.71, -2.68, 0]
|
||||
negate: 0
|
||||
occupied_thresh: 0.65
|
||||
free_thresh: 0.25
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
|
|
@ -0,0 +1,14 @@
|
|||
material checker
|
||||
{
|
||||
technique
|
||||
{
|
||||
pass
|
||||
{
|
||||
texture_unit
|
||||
{
|
||||
texture checker.png
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 76 KiB |
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 66 KiB |
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
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,424 @@
|
|||
<?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="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>
|
||||
|
||||
<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>
|
||||
|
|
@ -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,530 @@
|
|||
<?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>6.0</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/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="camera_joint" type="fixed">
|
||||
<parent>base_link</parent>
|
||||
<child>realsense_link</child>
|
||||
<pose>0.076 0.0 0.093 0 0 0</pose>
|
||||
</joint>
|
||||
|
||||
|
||||
<link name="realsense_link">
|
||||
<inertial>
|
||||
<pose>0.076 0.0 0.093 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.035</mass>
|
||||
</inertial>
|
||||
|
||||
<collision name="collision">
|
||||
<pose>0 0.047 0 0 0 0</pose>
|
||||
<geometry>
|
||||
<box>
|
||||
<size>0.008 0.130 0.022</size>
|
||||
</box>
|
||||
</geometry>
|
||||
</collision>
|
||||
<pose>0.076 0.0 0.093 0 0 0</pose>
|
||||
|
||||
<sensor name="intel_realsense_r200_depth" type="depth">
|
||||
<always_on>1</always_on>
|
||||
<update_rate>30</update_rate>
|
||||
<pose>0.076 0.0 0.093 0 0 0</pose>
|
||||
<camera name="realsense_depth_camera">
|
||||
<image>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
<!-- <width>1920</width> -->
|
||||
<!-- <height>1080</height> -->
|
||||
<format>R8G8B8</format>
|
||||
</image>
|
||||
<clip>
|
||||
<near>0.02</near>
|
||||
<far>10</far>
|
||||
</clip>
|
||||
</camera>
|
||||
<plugin name="intel_realsense_r200_depth_driver" filename="libgazebo_ros_camera.so">
|
||||
<ros>
|
||||
<!--
|
||||
<argument>custom_camera/image_raw:=custom_camera/custom_image</argument>
|
||||
<argument>custom_camera/image_depth:=custom_camera/custom_image_depth</argument>
|
||||
<argument>custom_camera/camera_info:=custom_camera/custom_info_raw</argument>
|
||||
<argument>custom_camera/camera_info_depth:=custom_camera/custom_info_depth</argument>
|
||||
<argument>custom_camera/points:=custom_camera/custom_points</argument>
|
||||
-->
|
||||
</ros>
|
||||
<camera_name>intel_realsense_r200_depth</camera_name>
|
||||
<frame_name>realsense_depth_frame</frame_name>
|
||||
<hack_baseline>0.07</hack_baseline>
|
||||
<min_depth>0.001</min_depth>
|
||||
</plugin>
|
||||
</sensor>
|
||||
|
||||
<sensor name="intel_realsense_r200_rgb" type="camera">
|
||||
<always_on>true</always_on>
|
||||
<visualize>true</visualize>
|
||||
<update_rate>30</update_rate>
|
||||
<pose>0.076 0.0 0.093 0 0 0</pose>
|
||||
<camera name="realsense_rgb_camera">
|
||||
<horizontal_fov>1.02974</horizontal_fov>
|
||||
<image>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
<!-- <width>1920</width> -->
|
||||
<!-- <height>1080</height> -->
|
||||
<format>R8G8B8</format>
|
||||
</image>
|
||||
<clip>
|
||||
<near>0.02</near>
|
||||
<far>300</far>
|
||||
</clip>
|
||||
<noise>
|
||||
<type>gaussian</type>
|
||||
<mean>0.0</mean>
|
||||
<stddev>0.007</stddev>
|
||||
</noise>
|
||||
</camera>
|
||||
<plugin name="intel_realsense_r200_rgb_driver" filename="libgazebo_ros_camera.so">
|
||||
<ros>
|
||||
<!--
|
||||
<namespace>custom_ns</namespace>
|
||||
<argument>image_raw:=custom_image</argument>
|
||||
<argument>camera_info:=custom_info_raw</argument>
|
||||
-->
|
||||
</ros>
|
||||
<camera_name>intel_realsense_r200_rgb</camera_name>
|
||||
<frame_name>realsense_rgb_frame</frame_name>
|
||||
<hack_baseline>0.07</hack_baseline>
|
||||
</plugin>
|
||||
</sensor>
|
||||
</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,457 @@
|
|||
<?xml version="1.0" ?>
|
||||
<sdf version="1.9">
|
||||
<model name="turtlebot3_burger">
|
||||
<pose>0 0 0 0 0 0</pose>
|
||||
|
||||
<link name="base_footprint"/>
|
||||
|
||||
<link name="base_link">
|
||||
<!-- Preserved from original model.sdf -->
|
||||
<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</mean><stddev>2e-4</stddev></noise></x>
|
||||
<y><noise type="gaussian"><mean>0</mean><stddev>2e-4</stddev></noise></y>
|
||||
<z><noise type="gaussian"><mean>0</mean><stddev>2e-4</stddev></noise></z>
|
||||
</angular_velocity>
|
||||
<linear_acceleration>
|
||||
<x><noise type="gaussian"><mean>0</mean><stddev>1.7e-2</stddev></noise></x>
|
||||
<y><noise type="gaussian"><mean>0</mean><stddev>1.7e-2</stddev></noise></y>
|
||||
<z><noise type="gaussian"><mean>0</mean><stddev>1.7e-2</stddev></noise></z>
|
||||
</linear_acceleration>
|
||||
</imu>
|
||||
</sensor>
|
||||
</link>
|
||||
|
||||
<link name="base_scan">
|
||||
<!-- Preserved from original model.sdf -->
|
||||
<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>
|
||||
<!-- gpu_lidar sensor: parameters match original ray sensor -->
|
||||
<sensor name="hls_lfcd_lds" type="gpu_lidar">
|
||||
<pose>-0.032 0 0.171 0 0 0</pose>
|
||||
<always_on>true</always_on>
|
||||
<visualize>true</visualize>
|
||||
<update_rate>5</update_rate>
|
||||
<lidar>
|
||||
<scan>
|
||||
<horizontal>
|
||||
<samples>360</samples>
|
||||
<resolution>1</resolution>
|
||||
<min_angle>0</min_angle>
|
||||
<max_angle>6.283185307179586</max_angle>
|
||||
</horizontal>
|
||||
<vertical>
|
||||
<samples>1</samples>
|
||||
<resolution>1</resolution>
|
||||
<min_angle>0</min_angle>
|
||||
<max_angle>0</max_angle>
|
||||
</vertical>
|
||||
</scan>
|
||||
<range>
|
||||
<min>0.120000</min>
|
||||
<max>6.0</max>
|
||||
<resolution>0.015000</resolution>
|
||||
</range>
|
||||
<noise>
|
||||
<type>gaussian</type>
|
||||
<mean>0.0</mean>
|
||||
<stddev>0.01</stddev>
|
||||
</noise>
|
||||
</lidar>
|
||||
</sensor>
|
||||
</link>
|
||||
|
||||
<link name="wheel_left_link">
|
||||
<!-- Preserved from original model.sdf -->
|
||||
<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">
|
||||
<!-- Preserved from original model.sdf -->
|
||||
<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>
|
||||
|
||||
<link name="realsense_link">
|
||||
<inertial>
|
||||
<pose>0.076 0.0 0.093 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.035</mass>
|
||||
</inertial>
|
||||
<collision name="collision">
|
||||
<pose>0 0.047 0 0 0 0</pose>
|
||||
<geometry>
|
||||
<box>
|
||||
<size>0.008 0.130 0.022</size>
|
||||
</box>
|
||||
</geometry>
|
||||
</collision>
|
||||
<pose>0.076 0 0.093 0 0 0</pose>
|
||||
|
||||
<!-- Depth camera sensor - migrated from libgazebo_ros_camera.so to gz-sim native
|
||||
Original plugin had: hack_baseline=0.07 (stereo baseline), min_depth=0.001
|
||||
Note: hack_baseline is a Gazebo Classic plugin-specific param for stereo simulation;
|
||||
Gz Sim uses raycasting rendering so it is NOT needed here.
|
||||
Note: min_depth is replaced by <clip><near>=0.02 for minimum sensing distance. -->
|
||||
<sensor name="intel_realsense_r200_depth" type="depth">
|
||||
<always_on>1</always_on>
|
||||
<update_rate>30</update_rate>
|
||||
<pose>0.076 0.0 0.093 0 0 0</pose>
|
||||
<camera name="realsense_depth_camera">
|
||||
<image>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
<!-- L16 format: encodes depth as 16-bit uint (pixel value = depth in mm)
|
||||
This bypasses gz.msgs.DepthImage (unsupported in Humble ros_gz_bridge)
|
||||
and outputs standard gz.msgs.Image that can be bridged directly. -->
|
||||
<format>L16</format>
|
||||
</image>
|
||||
<clip>
|
||||
<near>0.02</near>
|
||||
<far>10</far>
|
||||
</clip>
|
||||
</camera>
|
||||
<!-- Disable native DepthImage output to avoid topic conflict.
|
||||
With this false, Gazebo only publishes /image (L16) instead of /depth_image
|
||||
NOTE: <output_depth_image> removed — not valid SDF for Gz Sim Harmonic -->
|
||||
</sensor>
|
||||
|
||||
<!-- RGB camera sensor - migrated from libgazebo_ros_camera.so to gz-sim native
|
||||
Original plugin had: hack_baseline=0.07 (stereo baseline)
|
||||
Note: Not applicable in Gz Sim native sensor (same reason as depth camera above). -->
|
||||
<sensor name="intel_realsense_r200_rgb" type="camera">
|
||||
<always_on>true</always_on>
|
||||
<visualize>true</visualize>
|
||||
<update_rate>30</update_rate>
|
||||
<pose>0.076 0.0 0.093 0 0 0</pose>
|
||||
<camera name="realsense_rgb_camera">
|
||||
<horizontal_fov>1.02974</horizontal_fov>
|
||||
<image>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
<!-- <width>1920</width> -->
|
||||
<!-- <height>1080</height> -->
|
||||
<format>R8G8B8</format>
|
||||
</image>
|
||||
<clip>
|
||||
<near>0.02</near>
|
||||
<far>300</far>
|
||||
</clip>
|
||||
<noise>
|
||||
<type>gaussian</type>
|
||||
<mean>0.0</mean>
|
||||
<stddev>0.007</stddev>
|
||||
</noise>
|
||||
</camera>
|
||||
</sensor>
|
||||
</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>
|
||||
<limit>
|
||||
<lower>-1.79769e+308</lower>
|
||||
<upper>1.79769e+308</upper>
|
||||
</limit>
|
||||
</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>
|
||||
<limit>
|
||||
<lower>-1.79769e+308</lower>
|
||||
<upper>1.79769e+308</upper>
|
||||
</limit>
|
||||
</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="camera_joint" type="fixed">
|
||||
<parent>base_link</parent>
|
||||
<child>realsense_link</child>
|
||||
<pose>0.076 0.0 0.093 0 0 0</pose>
|
||||
</joint>
|
||||
|
||||
<!-- Diff Drive plugin: migrated from libgazebo_ros_diff_drive.so to gz-sim system -->
|
||||
<plugin filename="gz-sim-diff-drive-system" name="gz::sim::systems::DiffDrive">
|
||||
<left_joint>wheel_left_joint</left_joint>
|
||||
<right_joint>wheel_right_joint</right_joint>
|
||||
<frame_id>odom</frame_id>
|
||||
<child_frame_id>base_footprint</child_frame_id>
|
||||
<wheel_separation>0.160</wheel_separation>
|
||||
<wheel_radius>0.033</wheel_radius>
|
||||
<odom_publish_frequency>30</odom_publish_frequency>
|
||||
<!-- Original model.sdf had: max_wheel_torque=20, max_wheel_acceleration=1.0 -->
|
||||
<max_linear_acceleration>1.0</max_linear_acceleration>
|
||||
<min_linear_acceleration>-1.0</min_linear_acceleration>
|
||||
<max_angular_acceleration>2.0</max_angular_acceleration>
|
||||
<min_angular_acceleration>-2.0</min_angular_acceleration>
|
||||
<!-- TurtleBot3 Burger typical max speeds -->
|
||||
<max_linear_velocity>0.22</max_linear_velocity>
|
||||
<min_linear_velocity>-0.22</min_linear_velocity>
|
||||
<max_angular_velocity>2.84</max_angular_velocity>
|
||||
<min_angular_velocity>-2.84</min_angular_velocity>
|
||||
</plugin>
|
||||
|
||||
<!-- Joint State Publisher: migrated from libgazebo_ros_joint_state_publisher.so -->
|
||||
<plugin filename="gz-sim-joint-state-publisher-system" name="gz::sim::systems::JointStatePublisher">
|
||||
</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>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<model>
|
||||
<name>TurtleBot3(Burger_cam)</name>
|
||||
<version>2.0</version>
|
||||
<sdf version="1.4">model-1_4.sdf</sdf>
|
||||
<sdf version="1.6">model.sdf</sdf>
|
||||
|
||||
<author>
|
||||
<name>Taehun Lim(Darby)</name>
|
||||
<name>Hyungyu Kim</name>
|
||||
<email>thlim@robotis.com</email>
|
||||
<email>kimhg@robotis.com</email>
|
||||
</author>
|
||||
|
||||
<description>
|
||||
TurtleBot3 Burger
|
||||
</description>
|
||||
</model>
|
||||
|
|
@ -0,0 +1,495 @@
|
|||
<?xml version="1.0" ?>
|
||||
<sdf version="1.6">
|
||||
<model name="turtlebot3_burger_cam">
|
||||
<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>false</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/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>
|
||||
|
||||
<link name="camera_link">
|
||||
<inertial>
|
||||
<pose>0.076 0.0 0.093 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.035</mass>
|
||||
</inertial>
|
||||
|
||||
<pose>0.076 0.0 0.093 0 0 0</pose>
|
||||
<sensor name="camera" type="wideanglecamera">
|
||||
<always_on>true</always_on>
|
||||
<visualize>true</visualize>
|
||||
<update_rate>30</update_rate>
|
||||
<camera name="picam">
|
||||
<horizontal_fov>3.183</horizontal_fov>
|
||||
<image>
|
||||
<width>320</width>
|
||||
<height>240</height>
|
||||
<format>R8G8B8</format>
|
||||
</image>
|
||||
<clip>
|
||||
<near>0.03</near>
|
||||
<far>100</far>
|
||||
</clip>
|
||||
<lens>
|
||||
<type>custom</type>
|
||||
<custom_function>
|
||||
<c1>1.05</c1>
|
||||
<c2>4</c2>
|
||||
<f>1.0</f>
|
||||
<fun>tan</fun>
|
||||
</custom_function>
|
||||
<scale_to_hfov>true</scale_to_hfov>
|
||||
<cutoff_angle>3.1415</cutoff_angle>
|
||||
<env_texture_size>512</env_texture_size>
|
||||
</lens>
|
||||
</camera>
|
||||
<plugin name="camera_driver" filename="libgazebo_ros_camera.so">
|
||||
<alwaysOn>true</alwaysOn>
|
||||
<updateRate>30.0</updateRate>
|
||||
<cameraName>camera</cameraName>
|
||||
<frameName>camera_link</frameName>
|
||||
<imageTopicName>image_raw</imageTopicName>
|
||||
<cameraInfoTopicName>camera_info</cameraInfoTopicName>
|
||||
<hackBaseline>0.07</hackBaseline>
|
||||
<distortionK1>0.0</distortionK1>
|
||||
<distortionK2>0.0</distortionK2>
|
||||
<distortionK3>0.0</distortionK3>
|
||||
<distortionT1>0.0</distortionT1>
|
||||
<distortionT2>0.0</distortionT2>
|
||||
<ros>
|
||||
</ros>
|
||||
</plugin>
|
||||
</sensor>
|
||||
</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="camera_joint" type="fixed">
|
||||
<parent>base_link</parent>
|
||||
<child>camera_link</child>
|
||||
<pose>0.040 -0.000 0.110 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,220 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<asset>
|
||||
<contributor>
|
||||
<author>Blender User</author>
|
||||
<authoring_tool>Blender 2.83.0 commit date:2020-06-03, commit time:14:38, hash:211b6c29f771</authoring_tool>
|
||||
</contributor>
|
||||
<created>2020-06-29T17:10:17</created>
|
||||
<modified>2020-06-29T17:10:17</modified>
|
||||
<unit name="meter" meter="1"/>
|
||||
<up_axis>Z_UP</up_axis>
|
||||
</asset>
|
||||
<library_cameras>
|
||||
<camera id="Camera-camera" name="Camera">
|
||||
<optics>
|
||||
<technique_common>
|
||||
<perspective>
|
||||
<xfov sid="xfov">39.59775</xfov>
|
||||
<aspect_ratio>1.777778</aspect_ratio>
|
||||
<znear sid="znear">0.1</znear>
|
||||
<zfar sid="zfar">100</zfar>
|
||||
</perspective>
|
||||
</technique_common>
|
||||
</optics>
|
||||
<extra>
|
||||
<technique profile="blender">
|
||||
<shiftx sid="shiftx" type="float">0</shiftx>
|
||||
<shifty sid="shifty" type="float">0</shifty>
|
||||
<dof_distance sid="dof_distance" type="float">10</dof_distance>
|
||||
</technique>
|
||||
</extra>
|
||||
</camera>
|
||||
</library_cameras>
|
||||
<library_lights>
|
||||
<light id="Light-light" name="Light">
|
||||
<technique_common>
|
||||
<point>
|
||||
<color sid="color">1000 1000 1000</color>
|
||||
<constant_attenuation>1</constant_attenuation>
|
||||
<linear_attenuation>0</linear_attenuation>
|
||||
<quadratic_attenuation>0.00111109</quadratic_attenuation>
|
||||
</point>
|
||||
</technique_common>
|
||||
<extra>
|
||||
<technique profile="blender">
|
||||
<type sid="type" type="int">0</type>
|
||||
<flag sid="flag" type="int">0</flag>
|
||||
<mode sid="mode" type="int">1</mode>
|
||||
<gamma sid="blender_gamma" type="float">1</gamma>
|
||||
<red sid="red" type="float">1</red>
|
||||
<green sid="green" type="float">1</green>
|
||||
<blue sid="blue" type="float">1</blue>
|
||||
<shadow_r sid="blender_shadow_r" type="float">0</shadow_r>
|
||||
<shadow_g sid="blender_shadow_g" type="float">0</shadow_g>
|
||||
<shadow_b sid="blender_shadow_b" type="float">0</shadow_b>
|
||||
<energy sid="blender_energy" type="float">1000</energy>
|
||||
<dist sid="blender_dist" type="float">29.99998</dist>
|
||||
<spotsize sid="spotsize" type="float">75</spotsize>
|
||||
<spotblend sid="spotblend" type="float">0.15</spotblend>
|
||||
<att1 sid="att1" type="float">0</att1>
|
||||
<att2 sid="att2" type="float">1</att2>
|
||||
<falloff_type sid="falloff_type" type="int">2</falloff_type>
|
||||
<clipsta sid="clipsta" type="float">0.04999995</clipsta>
|
||||
<clipend sid="clipend" type="float">30.002</clipend>
|
||||
<bias sid="bias" type="float">1</bias>
|
||||
<soft sid="soft" type="float">3</soft>
|
||||
<bufsize sid="bufsize" type="int">2880</bufsize>
|
||||
<samp sid="samp" type="int">3</samp>
|
||||
<buffers sid="buffers" type="int">1</buffers>
|
||||
<area_shape sid="area_shape" type="int">1</area_shape>
|
||||
<area_size sid="area_size" type="float">0.1</area_size>
|
||||
<area_sizey sid="area_sizey" type="float">0.1</area_sizey>
|
||||
<area_sizez sid="area_sizez" type="float">1</area_sizez>
|
||||
</technique>
|
||||
</extra>
|
||||
</light>
|
||||
</library_lights>
|
||||
<library_effects>
|
||||
<effect id="Material-effect">
|
||||
<profile_COMMON>
|
||||
<technique sid="common">
|
||||
<lambert>
|
||||
<emission>
|
||||
<color sid="emission">0 0 0 1</color>
|
||||
</emission>
|
||||
<diffuse>
|
||||
<color sid="diffuse">0.8 0.8 0.8 1</color>
|
||||
</diffuse>
|
||||
<index_of_refraction>
|
||||
<float sid="ior">1.45</float>
|
||||
</index_of_refraction>
|
||||
</lambert>
|
||||
</technique>
|
||||
</profile_COMMON>
|
||||
</effect>
|
||||
</library_effects>
|
||||
<library_images/>
|
||||
<library_materials>
|
||||
<material id="Material-material" name="Material">
|
||||
<instance_effect url="#Material-effect"/>
|
||||
</material>
|
||||
</library_materials>
|
||||
<library_geometries>
|
||||
<geometry id="Cube_001-mesh" name="Cube.001">
|
||||
<mesh>
|
||||
<source id="Cube_001-mesh-positions">
|
||||
<float_array id="Cube_001-mesh-positions-array" count="48">-0.5664003 -1 -1 -1 -0.5664004 -1 -1 -0.5664003 1.061318 -0.5664004 -1 1.061318 -1 0.5664003 -1 -0.5664004 1 -1 -0.5664003 1 1.061318 -1 0.5664004 1.061318 1 -0.5664003 -1 0.5664004 -1 -1 0.5664003 -1 1.061318 1 -0.5664004 1.061318 0.5664003 1 -1 1 0.5664004 -1 1 0.5664003 1.061318 0.5664004 1 1.061318</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Cube_001-mesh-positions-array" count="16" stride="3">
|
||||
<param name="X" type="float"/>
|
||||
<param name="Y" type="float"/>
|
||||
<param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<source id="Cube_001-mesh-normals">
|
||||
<float_array id="Cube_001-mesh-normals-array" count="60">0 -1 0 1 0 0 0 0 1 -1 0 0 0 1 0 -0.7071068 -0.7071068 0 -0.7071068 0.7071068 0 0.7071068 0.7071068 0 0.7071068 -0.7071068 0 0 0 -1 0 -1 0 0 0 1 0 0 1 0 1 0 -0.7071068 -0.7071068 0 -0.7071068 0.7071068 0 0.7071068 0.7071068 0 0.7071068 -0.7071068 0 0 0 -1 0 0 -1</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Cube_001-mesh-normals-array" count="20" stride="3">
|
||||
<param name="X" type="float"/>
|
||||
<param name="Y" type="float"/>
|
||||
<param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<source id="Cube_001-mesh-map-0">
|
||||
<float_array id="Cube_001-mesh-map-0-array" count="168">0.625 0.8041999 0.375 0.9458001 0.375 0.8041999 0.625 0.5541999 0.375 0.6958 0.375 0.5541999 0.8208 0.75 0.6792 0.75 0.625 0.6958 0.625 0.05419993 0.375 0.1958 0.375 0.05419993 0.625 0.3041999 0.375 0.4458 0.375 0.3041999 0.625 0.9458001 0.375 1 0.375 0.9458001 0.375 0.3041999 0.625 0.1958 0.625 0.3041999 0.375 0.5541999 0.625 0.4458 0.625 0.5541999 0.375 0.8041999 0.625 0.6958 0.625 0.8041999 0.3208 0.75 0.1791999 0.75 0.125 0.6958 0.625 0.8041999 0.625 0.9458001 0.375 0.9458001 0.625 0.5541999 0.625 0.6958 0.375 0.6958 0.625 0.6958 0.625 0.5541999 0.875 0.5541999 0.625 0.5541999 0.6791999 0.5 0.875 0.5541999 0.6791999 0.5 0.8208 0.5 0.875 0.5541999 0.875 0.5541999 0.875 0.6958 0.625 0.6958 0.875 0.6958 0.8208 0.75 0.625 0.6958 0.625 0.05419993 0.625 0.1958 0.375 0.1958 0.625 0.3041999 0.625 0.4458 0.375 0.4458 0.625 0.9458001 0.625 1 0.375 1 0.375 0.3041999 0.375 0.1958 0.625 0.1958 0.375 0.5541999 0.375 0.4458 0.625 0.4458 0.375 0.8041999 0.375 0.6958 0.625 0.6958 0.125 0.6958 0.125 0.5541999 0.375 0.5541999 0.125 0.5541999 0.1791999 0.5 0.375 0.5541999 0.1791999 0.5 0.3208 0.5 0.375 0.5541999 0.375 0.5541999 0.375 0.6958 0.125 0.6958 0.375 0.6958 0.3208 0.75 0.125 0.6958</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Cube_001-mesh-map-0-array" count="84" stride="2">
|
||||
<param name="S" type="float"/>
|
||||
<param name="T" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<vertices id="Cube_001-mesh-vertices">
|
||||
<input semantic="POSITION" source="#Cube_001-mesh-positions"/>
|
||||
</vertices>
|
||||
<triangles count="28">
|
||||
<input semantic="VERTEX" source="#Cube_001-mesh-vertices" offset="0"/>
|
||||
<input semantic="NORMAL" source="#Cube_001-mesh-normals" offset="1"/>
|
||||
<input semantic="TEXCOORD" source="#Cube_001-mesh-map-0" offset="2" set="0"/>
|
||||
<p>10 0 0 0 0 1 9 0 2 14 1 3 8 1 4 13 1 5 3 2 6 10 2 7 11 2 8 2 3 9 4 3 10 1 3 11 6 4 12 12 4 13 5 4 14 3 5 15 1 5 16 0 5 17 5 6 18 7 6 19 6 6 20 13 7 21 15 7 22 14 7 23 9 8 24 11 8 25 10 8 26 9 9 27 0 9 28 1 9 29 10 10 30 3 10 31 0 10 32 14 1 33 11 1 34 8 1 35 11 11 36 14 11 37 7 11 38 14 2 39 15 2 40 7 2 41 15 2 42 6 2 43 7 2 44 7 12 45 2 12 46 11 12 47 2 2 48 3 2 49 11 2 50 2 3 51 7 3 52 4 3 53 6 13 54 15 13 55 12 13 56 3 14 57 2 14 58 1 14 59 5 15 60 4 15 61 7 15 62 13 16 63 12 16 64 15 16 65 9 17 66 8 17 67 11 17 68 1 18 69 4 18 70 13 18 71 4 9 72 5 9 73 13 9 74 5 9 75 12 9 76 13 9 77 13 19 78 8 19 79 1 19 80 8 9 81 9 9 82 1 9 83</p>
|
||||
</triangles>
|
||||
</mesh>
|
||||
</geometry>
|
||||
<geometry id="Cube-mesh" name="Cube">
|
||||
<mesh>
|
||||
<source id="Cube-mesh-positions">
|
||||
<float_array id="Cube-mesh-positions-array" count="24">1 1 1 1 1 -1 1 -1 1 1 -1 -1 -1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Cube-mesh-positions-array" count="8" stride="3">
|
||||
<param name="X" type="float"/>
|
||||
<param name="Y" type="float"/>
|
||||
<param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<source id="Cube-mesh-normals">
|
||||
<float_array id="Cube-mesh-normals-array" count="18">0 0 1 0 -1 0 -1 0 0 0 0 -1 1 0 0 0 1 0</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Cube-mesh-normals-array" count="6" stride="3">
|
||||
<param name="X" type="float"/>
|
||||
<param name="Y" type="float"/>
|
||||
<param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<source id="Cube-mesh-map-0">
|
||||
<float_array id="Cube-mesh-map-0-array" count="72">0.875 0.5 0.625 0.75 0.625 0.5 0.625 0.75 0.375 1 0.375 0.75 0.625 0 0.375 0.25 0.375 0 0.375 0.5 0.125 0.75 0.125 0.5 0.625 0.5 0.375 0.75 0.375 0.5 0.625 0.25 0.375 0.5 0.375 0.25 0.875 0.5 0.875 0.75 0.625 0.75 0.625 0.75 0.625 1 0.375 1 0.625 0 0.625 0.25 0.375 0.25 0.375 0.5 0.375 0.75 0.125 0.75 0.625 0.5 0.625 0.75 0.375 0.75 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Cube-mesh-map-0-array" count="36" stride="2">
|
||||
<param name="S" type="float"/>
|
||||
<param name="T" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<vertices id="Cube-mesh-vertices">
|
||||
<input semantic="POSITION" source="#Cube-mesh-positions"/>
|
||||
</vertices>
|
||||
<triangles material="Material-material" count="12">
|
||||
<input semantic="VERTEX" source="#Cube-mesh-vertices" offset="0"/>
|
||||
<input semantic="NORMAL" source="#Cube-mesh-normals" offset="1"/>
|
||||
<input semantic="TEXCOORD" source="#Cube-mesh-map-0" offset="2" set="0"/>
|
||||
<p>4 0 0 2 0 1 0 0 2 2 1 3 7 1 4 3 1 5 6 2 6 5 2 7 7 2 8 1 3 9 7 3 10 5 3 11 0 4 12 3 4 13 1 4 14 4 5 15 1 5 16 5 5 17 4 0 18 6 0 19 2 0 20 2 1 21 6 1 22 7 1 23 6 2 24 4 2 25 5 2 26 1 3 27 3 3 28 7 3 29 0 4 30 2 4 31 3 4 32 4 5 33 0 5 34 1 5 35</p>
|
||||
</triangles>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</library_geometries>
|
||||
<library_visual_scenes>
|
||||
<visual_scene id="Scene" name="Scene">
|
||||
<node id="Cube_001" name="Cube.001" type="NODE">
|
||||
<matrix sid="transform">68.44905 0 0 0 0 68.44905 0 0 0 0 68.44905 68.59841 0 0 0 1</matrix>
|
||||
<instance_geometry url="#Cube_001-mesh" name="Cube.001"/>
|
||||
</node>
|
||||
<node id="Camera" name="Camera" type="NODE">
|
||||
<matrix sid="transform">0.6859207 -0.3240135 0.6515582 7.358891 0.7276763 0.3054208 -0.6141704 -6.925791 0 0.8953956 0.4452714 4.958309 0 0 0 1</matrix>
|
||||
<instance_camera url="#Camera-camera"/>
|
||||
</node>
|
||||
<node id="Light" name="Light" type="NODE">
|
||||
<matrix sid="transform">-0.2908646 -0.7711008 0.5663932 4.076245 0.9551712 -0.1998834 0.2183912 1.005454 -0.05518906 0.6045247 0.7946723 5.903862 0 0 0 1</matrix>
|
||||
<instance_light url="#Light-light"/>
|
||||
</node>
|
||||
<node id="Cube" name="Cube" type="NODE">
|
||||
<matrix sid="transform">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix>
|
||||
<instance_geometry url="#Cube-mesh" name="Cube">
|
||||
<bind_material>
|
||||
<technique_common>
|
||||
<instance_material symbol="Material-material" target="#Material-material">
|
||||
<bind_vertex_input semantic="UVMap" input_semantic="TEXCOORD" input_set="0"/>
|
||||
</instance_material>
|
||||
</technique_common>
|
||||
</bind_material>
|
||||
</instance_geometry>
|
||||
</node>
|
||||
</visual_scene>
|
||||
</library_visual_scenes>
|
||||
<scene>
|
||||
<instance_visual_scene url="#Scene"/>
|
||||
</scene>
|
||||
</COLLADA>
|
||||