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

Sample rosbag file for laser scanner data

asked 2017-08-29 04:46:54 -0600

I need a bag file for laser scanner data. The bag file should have a node publishing tf2_msgs/TFMessage and sensor_msgs/LaserScan type messages to topics.

I started out with this tutorial - Introduction to Working With Laser Scanner Data but the bag file provided here has odometry data (nav_msgs/Odometry type message). I just don't understand how to transform odometry data to tf data. Either help is appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-08-29 09:10:05 -0600

lucasw gravatar image

updated 2017-08-29 09:10:52 -0600

https://discourse.ros.org/t/rosbag-sh... mentions https://marvhub.com and https://botbags.com/bags - it looks like marvhub has the better searching facility (multiple filters applied in a boolean fashion would be nice to have, currently only one message type filter can be applied).

This is one search result that has a LaserScan and a /tf, I found it with this search: https://marvhub.com/aew7osa/?filter=e... (not sure why the urls are so long and cryptic, they don't inspire confidence they'll work for anyone else or will continue to work in the future...).

If you want to republish an odom as a tf look at the message definitions:

$ rosmsg show Odometry
[nav_msgs/Odometry]:
std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
string child_frame_id
geometry_msgs/PoseWithCovariance pose
  geometry_msgs/Pose pose
    geometry_msgs/Point position
      float64 x
      float64 y
      float64 z
    geometry_msgs/Quaternion orientation
      float64 x
      float64 y
      float64 z
      float64 w
  float64[36] covariance
geometry_msgs/TwistWithCovariance twist
  geometry_msgs/Twist twist
    geometry_msgs/Vector3 linear
      float64 x
      float64 y
      float64 z
    geometry_msgs/Vector3 angular
      float64 x
      float64 y
      float64 z
  float64[36] covariance

$ rosmsg show tf2_msgs/TFMessage 
geometry_msgs/TransformStamped[] transforms
  std_msgs/Header header
    uint32 seq
    time stamp
    string frame_id
  string child_frame_id
  geometry_msgs/Transform transform
    geometry_msgs/Vector3 translation
      float64 x
      float64 y
      float64 z
    geometry_msgs/Quaternion rotation
      float64 x
      float64 y
      float64 z
      float64 w

You could copy odometry pose.pose.position into tf transform.translation, copy each x y and z, luckily rotation can be copied straight across since they are the same type, and copy the header and child_frame_id also. (Is there an existing node available that does this?)

edit flag offensive delete link more

Comments

Thank you. Especially for laser_scan repositories!! I don't think there's a pre-existing node. But this will work.

Harsh2308 gravatar image Harsh2308  ( 2017-09-01 02:31:40 -0600 )edit

@Harsh2308 If this worked for you, then you should mark it as correct.

jayess gravatar image jayess  ( 2017-09-04 10:48:13 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2017-08-29 04:46:54 -0600

Seen: 5,196 times

Last updated: Aug 29 '17