socrob / autonomous_systems

Material used for learning ROS and robotics, as part of the Autonomous Systems course at Instituto Superior Tecnico
34 stars 9 forks source link

Hokuyo Data Recording #19

Open sickROS opened 6 years ago

sickROS commented 6 years ago

We are having trouble organizing the data we receive from Hokuyo. We created a bag and when we type "rosbag info .bag" we can see it has 344 messages. We believe that the data we have access is only the last scanning, which means our "ranges" vector has only 700 elements... We think this number of measurement per scan must be correct because we can calculate it once we know the angle_min, angle_max and the angle increment, and they are the same. The information we have access in the rosbag concerns only the last scan?

oscar-lima commented 6 years ago

Each of the 344 msgs contains one scan (with n beams i.e. 580 beams)

sickROS commented 6 years ago

Is there any specific function that reads the data from each msg?

oscar-lima commented 6 years ago

You need to play the file, then do rostopic echo /desired_tooic to see the data.

From code you will need to subscribe to the topic and unwrap the msg content