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

nav_msgs/OccupancyGrid topic doesn't exist

asked 2018-04-18 15:11:46 -0500

FateInHaze gravatar image

Hi, I have set up a simple subsriber like the one in this tutorial and am trying to use it to get data from the nav_msgs/OccupancyGrid topic. As the doc specifies, this data is in the form of an Int8 [] so the only difference between the tutorial and my code is I replaced "String" with "Int8MultiArray"

I am running what I think is a fairly standard hector_mapping setup, and then I try and launch my subscriber node. The node launches fine and sits there forever, never receiving any messages. When I try rostopic list the topic is not there, despite the fact that the documentation for hector_mapping says that it publishes to this nav_msgs/OccupancyGrid topic.

It seems like I'm missing something to tell hector_mapping to publish, except that using rosrun map_server map_saver works perfectly, so clearly the data is there. What am I doing wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-19 20:23:22 -0500

Troski gravatar image

nav_msgs/OccupancyGrid is not a topic, is a message type. the topic in the tutorial you point out is "/robot0/odom"

when you launch the packages in ros do in another console "rostopic list " ..... find the topic you like then do "rostopic info + <topic_name>" that will show you what kind of message the subscriber needs. then follow the tutorial and you should get your sub callback going.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2018-04-18 15:11:46 -0500

Seen: 428 times

Last updated: Apr 19 '18