Read-only mirror of https://github.com/ethz-asl/scenenn_to_rosbag — ETHZ ASL. Issues & pull requests at the source.
  • Python 98.2%
  • CMake 1.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Margarita Grinvald 107f73168c
Update README.md
2019-06-13 14:17:47 +02:00
nodes Fix error message 2019-04-05 14:19:58 +02:00
.gitignore Initial commit 2018-01-15 17:48:54 +01:00
CMakeLists.txt Move python node and fix CMakelists 2018-02-05 10:22:59 +01:00
LICENSE Create LICENSE 2019-06-13 14:12:13 +02:00
package.xml Fix description 2018-06-08 11:10:34 +02:00
README.md Update README.md 2019-06-13 14:17:47 +02:00

Interfacing SceneNN and ROS

Dataset tools for working with the SceneNN dataset and converting its raw sequence data to a ROS bag.

How to use these tools

  1. Follow the instructions in the scenenn repository and download the SceneNN data. Your scenenn_data folder structure should be at the end as follows:

    scenenn_data
    ├── 123
    │   ├── depth
    │   │   ├── depth00001.png
    │   │   ├── ...
    │   ├── image
    │   │   ├── image00001.png
    │   │   ├── ...
    │   ├── mask
    │   │   ├── mask00001.png
    │   │   ├── ...
    │   ├── timestamp.txt
    │   ├── trajectory.log
    │   ├── ...
    └── intrinsic
        ├──  asus.ini
        ├──  kinect2.ini
    
  2. Clone this repository to the src folder of your catkin workspace, build your workspace and source it.

    cd <catkin_ws>/src
    git clone git@github.com:ethz-asl/scenenn_ros_tools.git
    catkin build
    source <catkin_ws>/devel/setup.bash
    
  3. Make the Python script executable and run it as a ROS node to convert data from a SceneNN scene to a rosbag. The rosbag will contain a sequence of RGB and depth images, ground truth 2D instance label images, and relative transforms. Optionally, it can contain colorized ground truth 2D instance label images, colored pointclouds of the scene, and colored pointclouds of ground truth instance segments.

    cd scenenn_ros_tools && chmod +x nodes/scenenn_to_rosbag.py
    rosrun scenenn_ros_tools scenenn_to_rosbag.py --scenenn-path PATH/TO/scenenn_data --scene-id ID [--limit NUM] [--output-bag NAME]
    

    For example:

    rosrun scenenn_ros_tools scenenn_to_rosbag.py --scenenn-path ../../../scenenn/download/scenenn_data/ --scene-id 066 --output-bag scenenn_066.bag
    

    The output bag contains the following topics:

    # RGB and depth images
    /camera/rgb/camera_info         : sensor_msgs/CameraInfo
    /camera/rgb/image_raw           : sensor_msgs/Image
    /camera/depth/camera_info       : sensor_msgs/CameraInfo
    /camera/depth/image_raw         : sensor_msgs/Image        
    
    # Ground truth 2D instance segmentation image
    /camera/instances/image_raw     : sensor_msgs/Image
    
    # Ground truth colorized 2D instance segmentation image [Disabled by default]
    /camera/instances/image_rgb     : sensor_msgs/Image
    
    # Colored pointclouds of ground truth instance segments [Disabled by default]
    /scenenet_node/object_segment   : sensor_msgs/PointCloud2
    
    # Colored pointcloud of the scene                       [Disabled by default]
    /scenenn_node/scene            : sensor_msgs/PointCloud2
    
    # Transform from /scenenn_camera_frame to /world
    /tf                             : tf/tfMessage