ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

how can i use costmap_2d with sonar sensor

asked 2016-06-05 14:25:57 -0600

naqi.nick gravatar image

i am working on an obstacle avoiding robot which should build a map i am practically using a sonar sensor to avoid the obstacles can someone help me on how to build a map based on a sonar sensor data instead of a laser sensor.

the .yaml file i am using is as follow it uses a laser sensor how can i convert it to sonar sensor

`#Sample parameters footprint: [[0.1, 0.0], [0.0, 0.1], [0.0, -0.1], [-0.1, 0.0]] #robot_radius: 0.10

        transform_tolerance: 0.3
        update_frequency: 5.0
        publish_frequency: 2.0

        global_frame: robot_0/odom
        robot_base_frame: robot_0/base_link
        resolution: 0.02
        width: 20.0
        height: 20.0

        rolling_window: true
        track_unknown_space: true

        plugins: 

            - {name: explore_boundary, type: "frontier_exploration::BoundedExploreLayer"}
            - {name: sensor,           type: "costmap_2d::ObstacleLayer"}
            - {name: inflation,        type: "costmap_2d::InflationLayer"}

        explore_boundary:
            resize_to_boundary: true
            frontier_travel_point: closest

        sensor:
            observation_sources: laser
            laser: {data_type: LaserScan, clearing: true, marking: true, topic: /robot_0/base_scan, inf_is_valid: true, raytrace_range: 1.5, obstacle_range: 0.9}

        inflation:
            inflation_radius: 0.15`

plz help me thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-06-28 04:50:01 -0600

أسامة الادريسي gravatar image

Me to i have the same problem i should do mapping and localization using ultrasonic sensor and IMU. I found this but i am not sure if it's the solution of the problem : Other sensor and ros gmapping (SLAM)

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-06-05 14:25:57 -0600

Seen: 737 times

Last updated: Jun 28 '17