Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing a Point Cloud Topic? #28

Closed
stefie10 opened this issue Dec 23, 2014 · 7 comments
Closed

Publishing a Point Cloud Topic? #28

stefie10 opened this issue Dec 23, 2014 · 7 comments

Comments

@stefie10
Copy link

Hi --

Thanks for writing the Kinect 2 driver. I'm wondering if the driver publishes a point cloud topic, so we can view the points in RVIZ?

I found this package which converts it to PCL:
https://github.com/giacomodabisias/libfreenect2pclgrabber so I think it would be something like, convert the cloud to PCL and then publish a PountCloud2 topic for both the low and highres camera streams: http://docs.ros.org/api/sensor_msgs/html/msg/PointCloud2.html

Stefanie

@paulbovbel
Copy link

This would be done with a depth_image_proc node instead

@stefie10
Copy link
Author

Gotcha, will give it a try. Thanks!

@stefie10
Copy link
Author

Hi --

I created a launch file that publishes the points using depth_image_proc. Feel free to distribute with kinect2_bridge.

Stefanie

<launch>
    <arg name="manager" value="kinect2_nodelet_manager" />
    <include file="$(find rgbd_launch)/launch/includes/manager.launch.xml">
      <arg name="name"                value="$(arg manager)" />
      <arg name="debug"               value="false" />
      <arg name="num_worker_threads"  value="4" />
    </include>
    <node pkg="nodelet" type="nodelet" name="points_xyzrgb_lowres"
          args="load depth_image_proc/point_cloud_xyzrgb $(arg manager)"
          respawn="false">
      <!-- Explicit topic remappings, shouldn't need all of these -->
      <remap from="rgb/camera_info"             to="/kinect2_head/rgb_rect/camera_info" />
      <remap from="rgb/image_rect_color"             to="/kinect2_head/rgb_rect/image" />
      <remap from="depth_registered/image_rect" to="/kinect2_head/depth_lowres/image" />
      <remap from="depth_registered/points"     to="/kinect2_head/depth_lowres/points" />-->
    </node>

    <node pkg="nodelet" type="nodelet" name="points_xyzrgb_highres"
          args="load depth_image_proc/point_cloud_xyzrgb $(arg manager)"
          respawn="false">
      <!-- Explicit topic remappings, shouldn't need all of these -->
      <remap from="rgb/camera_info"             to="/kinect2_head/rgb_rect/camera_info" />
      <remap from="rgb/image_rect_color"             to="/kinect2_head/rgb_rect/image" />
      <remap from="depth_registered/image_rect" to="/kinect2_head/depth_highres/image" />
      <remap from="depth_registered/points"     to="/kinect2_head/depth_highres/points" />-->
    </node>
</launch>

@kohrt
Copy link

kohrt commented Jan 13, 2015

I added the nodes for publishing to the launch file

@andreykurenkov
Copy link

Hi,
I know that this is a closed issue, but I am looking into subscribing to the point cloud topic and am not sure if I am doing something wrong or if there is a problem. When I run the kinect2_bridge, if I do rostopic list I do not see the points topics but only the image topics for depth:
/kinect2/depth_highres/image
/kinect2/depth_highres/image/compressedDepth
/kinect2/depth_lowres/camera_info
/kinect2/depth_lowres/image
/kinect2/depth_lowres/image/compressedDepth
/kinect2/depth_rect/camera_info
/kinect2/depth_rect/image
/kinect2/depth_rect/image/compressedDepth

I am trying to use the point cloud for SLAM, but just cannot understand why it is not published. Do I neet to set some paramter for the points topics to be published, or is there something wrong?

@kohrt
Copy link

kohrt commented Mar 22, 2015

Point clouds are created by image_proc. Those nodes are only started with the launch file. You have to launch the launch file instead of directly running the node.

@andreykurenkov
Copy link

Ah, thank you - though it is fairly obvious I did not think of it after
always using rosrun with kinect2_bridge.

On Sun, Mar 22, 2015 at 4:54 AM, Thiemo Wiedemeyer <notifications@github.com

wrote:

Point clouds are created by image_proc. Those nodes are only started with
the launch file. You have to launch the launch file instead of directly
running the node.


Reply to this email directly or view it on GitHub
#28 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants