From 8024ea55386343faec3abca955e83592ad783af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B1=BC=E9=A6=99ROS?= <87068644+fishros@users.noreply.github.com> Date: Mon, 22 Jul 2024 12:01:20 +0800 Subject: [PATCH] feat: modify nav param --- chapt7/chapt7_ws/README.md | 2 +- .../fishbot_description/config/fishbot_ros2_controller.yaml | 6 +++--- .../urdf/fishbot/plugins/gazebo_sensor_plugin.xacro | 6 +++--- chapt7/chapt7_ws/src/navigation2 | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) create mode 160000 chapt7/chapt7_ws/src/navigation2 diff --git a/chapt7/chapt7_ws/README.md b/chapt7/chapt7_ws/README.md index ec1ddee..d220f6e 100644 --- a/chapt7/chapt7_ws/README.md +++ b/chapt7/chapt7_ws/README.md @@ -61,7 +61,7 @@ colcon build ``` source install/setup.bash -ros2 launch fishbot_description gazebo.launch.py +ros2 launch fishbot_description gazebo_sim.launch.py ``` 运行导航 diff --git a/chapt7/chapt7_ws/src/fishbot_description/config/fishbot_ros2_controller.yaml b/chapt7/chapt7_ws/src/fishbot_description/config/fishbot_ros2_controller.yaml index 8a60aeb..5bcf6cc 100644 --- a/chapt7/chapt7_ws/src/fishbot_description/config/fishbot_ros2_controller.yaml +++ b/chapt7/chapt7_ws/src/fishbot_description/config/fishbot_ros2_controller.yaml @@ -29,7 +29,7 @@ fishbot_diff_drive_controller: left_wheel_names: ["left_wheel_joint"] right_wheel_names: ["right_wheel_joint"] - wheel_separation: 0.17 + wheel_separation: 0.20 #wheels_per_side: 1 # actually 2, but both are controlled by 1 signal wheel_radius: 0.032 @@ -40,8 +40,8 @@ fishbot_diff_drive_controller: publish_rate: 50.0 odom_frame_id: odom base_frame_id: base_footprint - pose_covariance_diagonal : [0.001, 0.001, 0.0, 0.0, 0.0, 0.01] - twist_covariance_diagonal: [0.001, 0.0, 0.0, 0.0, 0.0, 0.01] + pose_covariance_diagonal : [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] + twist_covariance_diagonal: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] open_loop: true enable_odom_tf: true diff --git a/chapt7/chapt7_ws/src/fishbot_description/urdf/fishbot/plugins/gazebo_sensor_plugin.xacro b/chapt7/chapt7_ws/src/fishbot_description/urdf/fishbot/plugins/gazebo_sensor_plugin.xacro index c69cbb4..c45ad66 100644 --- a/chapt7/chapt7_ws/src/fishbot_description/urdf/fishbot/plugins/gazebo_sensor_plugin.xacro +++ b/chapt7/chapt7_ws/src/fishbot_description/urdf/fishbot/plugins/gazebo_sensor_plugin.xacro @@ -6,14 +6,14 @@ / - ~/out:=scan + ~/out:=scan1 sensor_msgs/LaserScan laser_link true - true - 5 + false + 10 0 0 0 0 0 0 diff --git a/chapt7/chapt7_ws/src/navigation2 b/chapt7/chapt7_ws/src/navigation2 new file mode 160000 index 0000000..150dd6b --- /dev/null +++ b/chapt7/chapt7_ws/src/navigation2 @@ -0,0 +1 @@ +Subproject commit 150dd6beb50aee502ada8935cee23d7160a40f57