Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 6

Comment by Dragonslayer for First, is this really your formating in the yaml files? There should be indentations. Then i miss definition like the API discribes (http://wiki.ros.org/range_sensor_layer), its not the same as laser scan, similar: sonar_layer: topics: ["/sonar"] no_readings_timeout: 1.0 Further I would look at this posts, -> post ->link text

Next: Answer by Dragonslayer for Hey guys!I would like some help with my problem. I've a project where I use a front and a side sonar to locate a mobile robot in a known environment (in combination with relative measurement sensors). For this I made a gazebo simulation and made a link to rviz, what is working good (the sonar beam is displaying). Now I'm stuck for some time with localization of the robot in rviz. I would like to use the range_sensor_layer to display data point(s) of a (known) obstacle, and to localize the robot like here or here. When I add a laser scanner, the visualization works good and as expected, but I want to do the same with a sonar.TLDR: range_sensor_layer doesn't give me data points in rviz (something I was expecting).costmap_common_params.yaml:map_type: costmap footprint: [[0.25, 0.25], [0.25,-0.25], [-0.25,-0.25], [-0.25,0.25]] inflation_layer: inflation_radius: 0.3 obstacle_layer: obstacle_range: 2.5 raytrace_range: 3.0 sonar_layer: nr: /sonar topics: ["/sonar_front", "/sonar_side"] no_readings_timeout: 1.0 clear_threshold: 0.2 mark_threshold: 0.8 local_costmap_params.yaml:local_costmap: global_frame: odom robot_base_frame: robot_footprint update_frequency: 1.0 publish_frequency: 1.0 width: 20.0 height: 20.0 resolution: 0.05 static_map: false rolling_window: true plugins: - {name: sonar_layer, type: "range_sensor_layer::RangeSensorLayer"} - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"} - {name: inflation_layer, type: "costmap_2d::InflationLayer"} global_costmap_params.yaml:global_costmap: global_frame: map robot_base_frame: robot_footprint update_frequency: 10.0 publish_frequency: 10.0 width: 40.0 height: 40.0 resolution: 0.05 static_map: true rolling_window: false plugins: - {name: sonar_layer, type: "range_sensor_layer::RangeSensorLayer"} - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"} - {name: inflation_layer, type: "costmap_2d::InflationLayer"} I hope this gives enough information! If I'm not clear or need to add more information, please tell me. Thank you in advance.
$
0
0
I once red that the listing of layers can mess the costmap up. You could try 1. obstacle_layer 2. sonar_layer 3. inflation_layer. You might also check rostopic for spelling errors in the topics and/or namespaces. Maybe costmap is looking for a /sonar in his own namespace or something like that (/local_costmap/sonar?). And of course the sonar might be timing out, ultrasonics are usually working at low update frequency, rviz is more flexible. Checked the logs?

Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>