Hello,
i can create map with gmapping and hector_slam. since i dont have a robot system (just laser scanner) i'm just trying to use costmap_2d individually so i created a launch file (based on example.launch in costmap_2d launch directory)
while i was running gmapping (with laser scan matcher), in another terminal i run, "rosrun map_server map_server mymap.yaml" ...then my costmap.launch, didnt gave any error, but in rviz nothing has changed.
what am i missing? Should i add something to rviz to show costmap?
*note: i created launch directory in laser_scan_matcher in the first place so i continue to use that directory for creating new launch and yaml files for my case.
my costmap.launch file:
<launch>
<!-- 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 laser_scan_matcher)/launch/myparams.yaml" command="load" ns="costmap" />
</node>
</launch>
my params.yaml file:
global_frame: /map
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 1.0
publish_voxel_map: true
static_map: false
map_type: voxel
origin_z: 0.0
z_resolution: 0.2
z_voxels: 10
unknown_threshold: 10
mark_threshold: 0
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}
Originally posted by bsk on ROS Answers with karma: 73 on 2016-06-15
Post score: 0