Add costmap_2d package sources

Convert navigations/costmap_2d from gitlink to normal tracked files.
This commit is contained in:
2026-05-28 10:44:00 +07:00
parent 167c52aeb6
commit c478cbee78
72 changed files with 11576 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
<launch>
<!--
NOTE: You'll need to bring up something that publishes sensor data (see
rosstage), something that publishes a map (see map_server), and something to
visualize a costmap (see nav_view), to see things work.
Also, on a real robot, you'd want to set the "use_sim_time" parameter to false, or just not set it.
-->
<param name="/use_sim_time" value="true"/>
<!-- Publishes the voxel grid to rviz for display -->
<node pkg="costmap_2d" type="costmap_2d_markers" name="voxel_visualizer">
<remap from="voxel_grid" to="costmap/voxel_grid"/>
</node>
<!-- Run the costmap node -->
<node name="costmap_node" pkg="costmap_2d" type="costmap_2d_node" >
<rosparam file="$(find costmap_2d)/launch/example_params.yaml" command="load" ns="costmap" />
</node>
</launch>

View File

@@ -0,0 +1,40 @@
global_frame: map
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 1.0
#set if you want the voxel map published
publish_voxel_map: true
#set to true if you want to initialize the costmap from a static map
static_map: false
#begin - COMMENT these lines if you set static_map to true
rolling_window: true
width: 6.0
height: 6.0
resolution: 0.025
#end - COMMENT these lines if you set static_map to true
#START VOXEL STUFF
map_type: voxel
origin_z: 0.0
z_resolution: 0.2
z_voxels: 10
unknown_threshold: 10
mark_threshold: 0
#END VOXEL STUFF
transform_tolerance: 0.3
obstacle_range: 2.5
max_obstacle_height: 2.0
raytrace_range: 3.0
footprint: [[-0.325, -0.325], [-0.325, 0.325], [0.325, 0.325], [0.46, 0.0], [0.325, -0.325]]
#robot_radius: 0.46
footprint_padding: 0.01
inflation_radius: 0.55
cost_scaling_factor: 10.0
lethal_cost_threshold: 100
observation_sources: base_scan
base_scan: {data_type: LaserScan, expected_update_rate: 0.4,
observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08}