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,23 @@
#!/usr/bin/env python
from dynamic_reconfigure.parameter_generator_catkin import ParameterGenerator, double_t, int_t, str_t
gen = ParameterGenerator()
gen.add("transform_tolerance", double_t, 0, "Specifies the delay in transform (tf) data that is tolerable in seconds.", 0.3, 0, 10)
gen.add("update_frequency", double_t, 0, "The frequency in Hz for the map to be updated.", 5, 0, 100)
gen.add("publish_frequency", double_t, 0, "The frequency in Hz for the map to publish display information.", 0, 0, 100)
#map params
gen.add("width", int_t, 0, "The width of the map in meters.", 10, 0)
gen.add("height", int_t, 0, "The height of the map in meters.", 10, 0)
gen.add("resolution", double_t, 0, "The resolution of the map in meters/cell.", 0.05, 0, 50)
gen.add("origin_x", double_t, 0, "The x origin of the map in the global frame in meters.", 0)
gen.add("origin_y", double_t, 0, "The y origin of the map in the global frame in meters.", 0)
# robot footprint shape
gen.add("footprint", str_t, 0, "The footprint of the robot specified in the robot_base_frame coordinate frame as a list in the format: [ [x1, y1], [x2, y2], ...., [xn, yn] ].", "[]")
gen.add("robot_radius", double_t, 0, 'The radius of the robot in meters, this parameter should only be set for circular robots, all others should use the footprint parameter described above.', 0.46, 0, 10)
gen.add("footprint_padding", double_t, 0, "How much to pad (increase the size of) the footprint, in meters.", 0.01)
exit(gen.generate("costmap_2d", "costmap_2d", "Costmap2D"))

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env python
from dynamic_reconfigure.parameter_generator_catkin import ParameterGenerator, bool_t
gen = ParameterGenerator()
gen.add("enabled", bool_t, 0, "Whether to apply this plugin or not", True)
exit(gen.generate("costmap_2d", "costmap_2d", "GenericPlugin"))

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env python
from dynamic_reconfigure.parameter_generator_catkin import ParameterGenerator, bool_t, double_t
gen = ParameterGenerator()
gen.add("enabled", bool_t, 0, "Whether to apply this plugin or not", True)
gen.add("cost_scaling_factor", double_t, 0, "A scaling factor to apply to cost values during inflation.", 15, 0, 100)
gen.add("inflation_radius", double_t, 0, "The radius in meters to which the map inflates obstacle cost values.", 0.55, 0, 50)
gen.add("inflate_unknown", bool_t, 0, "Whether to inflate unknown cells.", False)
exit(gen.generate("costmap_2d", "costmap_2d", "InflationPlugin"))

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env python
from dynamic_reconfigure.parameter_generator_catkin import ParameterGenerator, bool_t, double_t, int_t
gen = ParameterGenerator()
gen.add("enabled", bool_t, 0, "Whether to apply this plugin or not", True)
gen.add("footprint_clearing_enabled", bool_t, 0, "Whether to clear the robot's footprint of lethal obstacles", True)
gen.add("max_obstacle_height", double_t, 0, "The maximum height of any obstacle to be inserted into the costmap in meters.", 2, 0, 50)
combo_enum = gen.enum([gen.const("Overwrite", int_t, 0, "Overwrite values"),
gen.const("Maximum", int_t, 1, "Take the maximum of the values"),
gen.const("Nothing", int_t, 99, "Do nothing")],
"Method for combining layers enum")
gen.add("combination_method", int_t, 0, "Method for combining two layers", 1, edit_method=combo_enum)
#gen.add("max_obstacle_range", double_t, 0, "The default maximum distance from the robot at which an obstacle will be inserted into the cost map in meters.", 2.5, 0, 50)
#gen.add("raytrace_range", double_t, 0, "The default range in meters at which to raytrace out obstacles from the map using sensor data.", 3, 0, 50)
exit(gen.generate("costmap_2d", "costmap_2d", "ObstaclePlugin"))

View File

@@ -0,0 +1,22 @@
#!/usr/bin/env python
from dynamic_reconfigure.parameter_generator_catkin import ParameterGenerator, bool_t, double_t, int_t
gen = ParameterGenerator()
gen.add("enabled", bool_t, 0, "Whether to use this plugin or not", True)
gen.add("footprint_clearing_enabled", bool_t, 0, "Whether to clear the robot's footprint of lethal obstacles", True)
gen.add("max_obstacle_height", double_t, 0, "Max Obstacle Height", 2.0, 0, 50)
gen.add("origin_z", double_t, 0, "The z origin of the map in meters.", 0, 0)
gen.add("z_resolution", double_t, 0, "The z resolution of the map in meters/cell.", 0.2, 0, 50)
gen.add("z_voxels", int_t, 0, "The number of voxels to in each vertical column.", 10, 0, 16)
gen.add("unknown_threshold", int_t, 0, 'The number of unknown cells allowed in a column considered to be known', 15, 0, 16)
gen.add("mark_threshold", int_t, 0, 'The maximum number of marked cells allowed in a column considered to be free', 0, 0, 16)
combo_enum = gen.enum([gen.const("Overwrite", int_t, 0, "Overwrite values"),
gen.const("Maximum", int_t, 1, "Take the maximum of the values"),
gen.const("Nothing", int_t, 99, "Do nothing")],
"Method for combining layers enum")
gen.add("combination_method", int_t, 0, "Method for combining two layers", 1, 0, 2, edit_method=combo_enum)
exit(gen.generate("costmap_2d", "costmap_2d", "VoxelPlugin"))