Ask Your Question
0

costmap does not subscribe /scan

asked 2012-07-19 23:27:53 -0500

pkohout gravatar image

updated 2012-07-22 20:37:16 -0500

hi, i have a litte problem, my costmap2d node does not subscribe my /scan topic which publishes sensor_msgs/LaserScan

Rosparam get /costmap_node/scan/: {clearing: true, data_type: LaserScan, expected_update_rate: 0.5, marking: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08, observation_persistence: 0.0, topic: /scan}

In rxgraph i see that it does not subscribe my /scan topic, but my gmapping is unsing /scan and all works fine.

here is my costmap_common.yaml : costmap/transform_tolerance: 1.0 costmap/footprint: [[-0.3, -0.3], [-0.3, 0.3], [0.3, 0.3], [0.3, -0.3]] observation_sources: scan scan: {data_type: LaserScan, expected_update_rate: 0.5, topic: /scan, observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08}

any ideas ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-07-20 07:38:13 -0500

allenh1 gravatar image

Try this configuration:

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true, expected_update_rate: 0.5}

If you are still having issues, please post the rest of your configuration file. Not a lot of info was given to figure out your issues... Also, a screenshot of RXGRAPH would be nice alongside the output of this command:

rostopic info scan
edit flag offensive delete link more

Comments

have tried your configuration does't work. A picture of rxgrap : http://i.imgur.com/DBeHE.png

output of rostopic info scan:Type: sensor_msgs/LaserScan

Publishers: * /gazebo (http://peter-XPS-15Z:35525/)

Subscribers: * /hector_mapping (http://peter-XPS-15Z:50795/)

pkohout gravatar image pkohout  ( 2012-07-22 20:18:15 -0500 )edit

global_frame: /map robot_base_frame: base_link costmap/update_frequency: 0.2 costmap/static_map: true costmap/transform_tolerance: 1.0costmap/footprint: [[-0.3, -0.3], [-0.3, 0.3], [0.3, 0.3], [0.3, -0.3]] observation_sources: laser_scan_sensor

pkohout gravatar image pkohout  ( 2012-07-22 20:20:08 -0500 )edit

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true, expected_update_rate: 0.5}

the whole config

pkohout gravatar image pkohout  ( 2012-07-22 22:54:41 -0500 )edit
1

ok found my fault..i was setting observation_sources: laser_scan_sensor wrong.. now it works. but now i get an error, [ERROR] [13, 5.46]: Client [/costmap_node] wants topic /scan to have datatype/md5sum [sensor_msgs/PointCloud/d8.. bur our version has sensor_msgs/LaserScan[...] drop connectino

pkohout gravatar image pkohout  ( 2012-07-23 00:06:35 -0500 )edit

Please post your configuration file again... I think you have a data type issue.

allenh1 gravatar image allenh1  ( 2012-07-23 04:26:43 -0500 )edit

ok was looking at my file once again and there was realy a little issue, i forgot to delete my laser_scan_sensor entry. thanks a lot dude (:

pkohout gravatar image pkohout  ( 2012-07-23 21:29:04 -0500 )edit

global_frame: /map

robot_base_frame: base_link

costmap:

update_frequency: 0.2

publish_frequency: 0.2

static_map: true

transform_tolerance: 1.0

footprint: [[-0.3, -0.3], [-0.3, 0.3], [0.3, 0.3], [0.3, -0.3]]

observation_sources: laser_scan_sensor

pkohout gravatar image pkohout  ( 2012-07-23 21:32:43 -0500 )edit

laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true, expected_update_rate: 0.5}

take a look at it...maybe there is somthing wrong i don't see

pkohout gravatar image pkohout  ( 2012-07-23 21:34:35 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-07-19 23:27:53 -0500

Seen: 1,145 times

Last updated: Jul 22 '12