Costmap2D.cfg 1.7 KB

12345678910111213141516171819202122232425
  1. #!/usr/bin/env python
  2. from dynamic_reconfigure.parameter_generator_catkin import ParameterGenerator, double_t, int_t, str_t
  3. # 用dynamic_reconfigure包的Python脚本,它用于生成动态重配置服务器的配置文件。dynamic_reconfigure是ROS中的一个功能,允许在运行时修改配置参数,而不需要停止和重新启动节点
  4. gen = ParameterGenerator()
  5. gen.add("transform_tolerance", double_t, 0, "Specifies the delay in transform (tf) data that is tolerable in seconds.", 0.3, 0, 10)
  6. gen.add("update_frequency", double_t, 0, "The frequency in Hz for the map to be updated.", 5, 0, 100)
  7. gen.add("publish_frequency", double_t, 0, "The frequency in Hz for the map to publish display information.", 0, 0, 100)
  8. #map params
  9. gen.add("width", int_t, 0, "The width of the map in meters.", 10, 0)
  10. gen.add("height", int_t, 0, "The height of the map in meters.", 10, 0)
  11. gen.add("resolution", double_t, 0, "The resolution of the map in meters/cell.", 0.05, 0, 50)
  12. gen.add("origin_x", double_t, 0, "The x origin of the map in the global frame in meters.", 0)
  13. gen.add("origin_y", double_t, 0, "The y origin of the map in the global frame in meters.", 0)
  14. # robot footprint shape
  15. 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] ].", "[]")
  16. 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)
  17. gen.add("footprint_padding", double_t, 0, "How much to pad (increase the size of) the footprint, in meters.", 0.01)
  18. exit(gen.generate("costmap_2d", "costmap_2d", "Costmap2D"))