OpenPTrack / open_ptrack

Original open source people tracking library (now deprecated with the release of OPT v2 "Gnocchi").
http://openptrack.org/
BSD 3-Clause "New" or "Revised" License
319 stars 109 forks source link

Kinect v2 record bag file - topics not found #128

Closed enrabre closed 7 years ago

enrabre commented 7 years ago

Hello,

I use Kinects v2 and I want to record a given Kinect sensor. For testing, I changed the ROS_MASTER_URI to http://localhost:11311/ and ROS_IP to my ipv4 address, so I don't need to be plugged in my network and the command roslaunch opt_calibration sensor_<kinect_name>.launch does not complain. I tried the instructions I found under the "Tips and tricks" section:

It creates this type of bag file:

path:        tuto.bag
version:     2.0
duration:    59.8s
start:       Mar 29 2017 14:40:54.50 (1490791254.50)
end:         Mar 29 2017 14:41:54.31 (1490791314.31)
size:        1.3 MB
messages:    4758
compression: none [2/2 chunks]
types:       sensor_msgs/CameraInfo [c9a58c1b0b154e0e6da7578cb991d214]
             tf2_msgs/TFMessage     [94810edda583a504dfda3829e70d7eec]
topics:      /tf                              2990 msgs    : tf2_msgs/TFMessage     (5 connections)
             Kinect_Sabrine/rgb/camera_info   1768 msgs    : sensor_msgs/CameraInfo

I cannot recreate pointCloud with this bag (roscore, then rosparam set /use_sim_time true, then launch Rviz, then rosbag play --clock tuto.bag, with the bag file named tuto, fixed frame set to /<kinect_name>_link)

None of the given topics are published. Here is the list of topic published (using the command rostopic list -v when one sensor is running):

/Kinect_Sabrine/depth/camera_info
/Kinect_Sabrine/depth/image
/Kinect_Sabrine/depth/image/compressedDepth
/Kinect_Sabrine/depth_highres/camera_info
/Kinect_Sabrine/depth_highres/image
/Kinect_Sabrine/depth_highres/image/compressedDepth
/Kinect_Sabrine/depth_ir/points
/Kinect_Sabrine/depth_lowres/camera_info
/Kinect_Sabrine/depth_lowres/image
/Kinect_Sabrine/depth_lowres/image/compressedDepth
/Kinect_Sabrine/depth_rect/camera_info
/Kinect_Sabrine/depth_rect/image
/Kinect_Sabrine/depth_rect/image/compressedDepth
/Kinect_Sabrine/ir/camera_info
/Kinect_Sabrine/ir/image
/Kinect_Sabrine/ir/image/compressed
/Kinect_Sabrine/ir_rect/camera_info
/Kinect_Sabrine/ir_rect/image
/Kinect_Sabrine/ir_rect/image/compressed
/Kinect_Sabrine/ir_rect_eq/camera_info
/Kinect_Sabrine/ir_rect_eq/image
/Kinect_Sabrine/ir_rect_eq/image/compressed
/Kinect_Sabrine/mono/camera_info
/Kinect_Sabrine/mono/image
/Kinect_Sabrine/mono/image/compressed
/Kinect_Sabrine/mono_lowres/camera_info
/Kinect_Sabrine/mono_lowres/image
/Kinect_Sabrine/mono_lowres/image/compressed
/Kinect_Sabrine/mono_rect/camera_info
/Kinect_Sabrine/mono_rect/image
/Kinect_Sabrine/mono_rect/image/compressed
/Kinect_Sabrine/rgb/camera_info
/Kinect_Sabrine/rgb/image
/Kinect_Sabrine/rgb/image/compressed
/Kinect_Sabrine/rgb_lowres/camera_info
/Kinect_Sabrine/rgb_lowres/image
/Kinect_Sabrine/rgb_lowres/image/compressed
/Kinect_Sabrine/rgb_rect/camera_info
/Kinect_Sabrine/rgb_rect/image
/Kinect_Sabrine/rgb_rect/image/compressed
/rosout
/rosout_agg
/tf

I am able to visualized pointCloud when I record /Kinect_Sabrine/depth_ir/points topic, but the bag file is really big.

In the kinect2_bridge_ir.launch file, I found this:

    <remap from="rgb/camera_info"             to="/$(arg sensor_name)/ir_rect/camera_info" />
    <remap from="rgb/image_rect_color"        to="/$(arg sensor_name)/ir_rect_eq/image" />
    <remap from="depth_registered/image_rect" to="/$(arg sensor_name)/depth_rect/image" />
    <remap from="depth_registered/points"     to="/$(arg sensor_name)/depth_ir/points" />

I am quite new in ROS, so I don't know what it means.

Where can I found the depth's disparity topic ?

More generally, I would like to record kinect v2 information (color and depth), which topics should I take ?

Also can I record a given Kinect v2 for a long time ? (10 hours)

marketto89 commented 7 years ago

@enrabre

The ROS_MASTER_URI and ROS_IP you set are ok.

If your goal is to create the point cloud from the data you recorded you have two choices:

Please note that in order to reduce the final size of your bag it is also possible to record the topic .../compressed. However, in this case is up to you to decompress the data once the bag is played (have a look to the republish node and at this answer).

Personally, I did not try to record data for such a long time (10 hours), I am expecting that your final bag file will be really big.