From f7e70475f968debd1dc2017a1caa6fae97fd1f7c Mon Sep 17 00:00:00 2001 From: jj7258 Date: Fri, 26 Jul 2024 19:55:26 +0530 Subject: [PATCH] Trying to perform autonomous nav using the octomap data --- .../octomap_config/costmap_common_params.yaml | 32 ++++++++++++ .../octomap_config/global_costmap_params.yaml | 13 +++++ .../octomap_config/local_costmap_params.yaml | 14 ++++++ .../config/octomap_config/move_base.yaml | 21 ++++++++ src/navrover_navigation/launch/amcl.launch | 49 +++++++++++++++++++ .../launch/octomap_nav.launch | 30 ++++++++++++ src/navrover_simulation/launch/gazebo.launch | 4 +- 7 files changed, 161 insertions(+), 2 deletions(-) create mode 100644 src/navrover_navigation/config/octomap_config/costmap_common_params.yaml create mode 100644 src/navrover_navigation/config/octomap_config/global_costmap_params.yaml create mode 100644 src/navrover_navigation/config/octomap_config/local_costmap_params.yaml create mode 100644 src/navrover_navigation/config/octomap_config/move_base.yaml create mode 100644 src/navrover_navigation/launch/amcl.launch create mode 100644 src/navrover_navigation/launch/octomap_nav.launch diff --git a/src/navrover_navigation/config/octomap_config/costmap_common_params.yaml b/src/navrover_navigation/config/octomap_config/costmap_common_params.yaml new file mode 100644 index 0000000..e733bea --- /dev/null +++ b/src/navrover_navigation/config/octomap_config/costmap_common_params.yaml @@ -0,0 +1,32 @@ +footprint: [[-0.25, -0.20], [-0.25, 0.20], [0.25, 0.20], [0.25, -0.20]] +footprint_padding: 0.01 + +robot_radius: 0.3 +transform_tolerance: 0.2 + +obstacle_layer: + enabled: true + obstacle_range: 5.5 + raytrace_range: 6.0 + inflation_radius: 0.2 + track_unknown_space: true + combination_method: 1 + + observation_sources: point_cloud_sensor + point_cloud_sensor: + sensor_frame: map + data_type: PointCloud2 + topic: /kinect/depth/points + marking: true + clearing: true + min_obstacle_height: 0.05 + max_obstacle_height: 2.0 + +inflation_layer: + enabled: true + cost_scaling_factor: 10.0 + inflation_radius: 0.5 + +static_layer: + enabled: true + map_topic: "/map" \ No newline at end of file diff --git a/src/navrover_navigation/config/octomap_config/global_costmap_params.yaml b/src/navrover_navigation/config/octomap_config/global_costmap_params.yaml new file mode 100644 index 0000000..0325e22 --- /dev/null +++ b/src/navrover_navigation/config/octomap_config/global_costmap_params.yaml @@ -0,0 +1,13 @@ +global_costmap: + global_frame: map + robot_base_frame: base_footprint + update_frequency: 1.0 + publish_frequency: 0.5 + static_map: false + rolling_window: false + resolution: 0.05 + transform_tolerance: 0.5 + plugins: + - {name: static_layer, type: "costmap_2d::StaticLayer"} + - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"} + - {name: inflation_layer, type: "costmap_2d::InflationLayer"} \ No newline at end of file diff --git a/src/navrover_navigation/config/octomap_config/local_costmap_params.yaml b/src/navrover_navigation/config/octomap_config/local_costmap_params.yaml new file mode 100644 index 0000000..b30739c --- /dev/null +++ b/src/navrover_navigation/config/octomap_config/local_costmap_params.yaml @@ -0,0 +1,14 @@ +local_costmap: + global_frame: odom + robot_base_frame: base_footprint + update_frequency: 5.0 + publish_frequency: 2.0 + static_map: false + rolling_window: true + width: 4.0 + height: 4.0 + resolution: 0.05 + transform_tolerance: 0.5 + plugins: + - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"} + - {name: inflation_layer, type: "costmap_2d::InflationLayer"} \ No newline at end of file diff --git a/src/navrover_navigation/config/octomap_config/move_base.yaml b/src/navrover_navigation/config/octomap_config/move_base.yaml new file mode 100644 index 0000000..8a6f1c7 --- /dev/null +++ b/src/navrover_navigation/config/octomap_config/move_base.yaml @@ -0,0 +1,21 @@ +shutdown_costmaps: false +controller_frequency: 5.0 +planner_patience: 5.0 +controller_patience: 15.0 +conservative_reset_dist: 3.0 +planner_frequency: 1.0 +oscillation_timeout: 10.0 +oscillation_distance: 0.2 + +global_costmap: + static_map: true + +local_costmap: + static_map: false + rolling_window: true + width: 4.0 + height: 4.0 + resolution: 0.05 + +base_global_planner: "navfn/NavfnROS" +base_local_planner: "base_local_planner/TrajectoryPlannerROS" \ No newline at end of file diff --git a/src/navrover_navigation/launch/amcl.launch b/src/navrover_navigation/launch/amcl.launch new file mode 100644 index 0000000..4f3fd2f --- /dev/null +++ b/src/navrover_navigation/launch/amcl.launch @@ -0,0 +1,49 @@ + + + + +​ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/navrover_navigation/launch/octomap_nav.launch b/src/navrover_navigation/launch/octomap_nav.launch new file mode 100644 index 0000000..a99a9f7 --- /dev/null +++ b/src/navrover_navigation/launch/octomap_nav.launch @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/navrover_simulation/launch/gazebo.launch b/src/navrover_simulation/launch/gazebo.launch index 3885b2c..9c96126 100644 --- a/src/navrover_simulation/launch/gazebo.launch +++ b/src/navrover_simulation/launch/gazebo.launch @@ -23,8 +23,8 @@ - - + +