forked from hq/office_RRT_star
无相机稳定版
This commit is contained in:
parent
112b10137f
commit
a4e7060ce3
13
README.md
13
README.md
|
|
@ -37,20 +37,19 @@ echo 'export NAV2_MAP_PATH=/workspace/src/turtlebot3_simulations/turtlebot3_gaze
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
```
|
```
|
||||||
|
|
||||||
1. 每个终端都要按照3.2.1前置准备操作
|
启动仿真, Nav2导航栈, AMCL节点,rviz
|
||||||
2. 启动仿真, Nav2导航栈, AMCL节点,rviz
|
|
||||||
```bash
|
```bash
|
||||||
./gzsim_run.sh
|
./gzsim_run.sh
|
||||||
|
|
||||||
ros2 launch nav2_bringup navigation_launch.py \
|
|
||||||
use_sim_time:=True \
|
|
||||||
params_file:=$HOME/ros_ws/src/vlm-semantic-nav2/TurtleBot-RRT-Star/nav2_params.yaml \
|
|
||||||
map:=$NAV2_MAP_PATH
|
|
||||||
|
|
||||||
ros2 launch nav2_rrtstar_planner bringup_localization_with_initial_pose.launch.py \
|
ros2 launch nav2_rrtstar_planner bringup_localization_with_initial_pose.launch.py \
|
||||||
use_sim_time:=true \
|
use_sim_time:=true \
|
||||||
map:=$NAV2_MAP_PATH
|
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
|
ros2 run rviz2 rviz2 -d /opt/ros/humble/share/nav2_bringup/rviz/nav2_default_view.rviz --ros-args -p use_sim_time:=true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,33 +23,6 @@
|
||||||
gz_type_name: gz.msgs.LaserScan
|
gz_type_name: gz.msgs.LaserScan
|
||||||
direction: GZ_TO_ROS
|
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_topic_name: /clock
|
||||||
ros_type_name: rosgraph_msgs/msg/Clock
|
ros_type_name: rosgraph_msgs/msg/Clock
|
||||||
gz_topic_name: /clock
|
gz_topic_name: /clock
|
||||||
|
|
|
||||||
|
|
@ -308,63 +308,6 @@
|
||||||
</geometry>
|
</geometry>
|
||||||
</collision>
|
</collision>
|
||||||
<pose>0.076 0 0.093 0 0 0</pose>
|
<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>
|
</link>
|
||||||
|
|
||||||
<joint name="base_joint" type="fixed">
|
<joint name="base_joint" type="fixed">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue