How to change subscribed topics of depth_image_proc/point_cloud_xyz node??
Hi, how do I change the topic subscriptions of depth_image_proc's depth_image_proc/point_cloud_xyz
node?
I have made a node which publishes a sensor_msgs/Image
topics which is:
/face_detector/depth_image_roi
Through openni_launch, I also have topic camera/depth/camera_info
published.
If I understand correctly, the depth_image_proc/point_cloud_xyz
node subscribes to the following topics:
depth/camera_info (sensor_msgs/CameraInfo)
depth_registered/image_rect (sensor_msgs/Image)
As such, I think I have the required topics published.
I found this. However, I don't know how to change the topic subscriptions to suit my needs.
Any help would be appreciated!
edit 1:
rosnode info /standalone_nodelet
:
Node [/standalone_nodelet]
Publications:
* /point_cloud/points [sensor_msgs/PointCloud2]
* /rosout [rosgraph_msgs/Log]
* /standalone_nodelet/bond [bond/Status]
Subscriptions:
* /camera/rgb/camera_info [sensor_msgs/CameraInfo]
* /face_detector/depth_image_roi [sensor_msgs/Image]
* /face_detector/rgb_image_roi [sensor_msgs/Image]
* /standalone_nodelet/bond [bond/Status]
Services:
* /standalone_nodelet/get_loggers
* /standalone_nodelet/list
* /standalone_nodelet/load_nodelet
* /standalone_nodelet/set_logger_level
* /standalone_nodelet/unload_nodelet
[....]
depth_image_proc/point_cloud_xyz
launch file:
<!-- Convert the depth image and the rgb image into a xyzrgb Point Cloud -->
<launch>
<!-- Nodelet manager for this pipeline -->
<node pkg="nodelet" type="nodelet" args="manager" name="standalone_nodelet" output="screen"/>
<!-- Convert to point cloud -->
<node pkg="nodelet" type="nodelet" name="depth_image_proc" args="load depth_image_proc/point_cloud_xyzrgb standalone_nodelet" output="screen">
<!-- Input: Camera calibration and metadata. (sensor_msgs/CameraInfo) -->
<remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>
<!-- Input: Rectified color image. (sensor_msgs/Image) -->
<remap from="rgb/image_rect_color" to="/face_detector/rgb_image_roi"/>
<!-- Input: Rectified depth image, registered to the RGB camera. (sensor_msgs/Image) -->
<remap from="depth_registered/image_rect" to="/face_detector/depth_image_roi"/>
<!-- Output: XYZ point cloud. If using PCL, subscribe as PointCloud<PointXYZ>. (sensor_msgs/PointCloud2) -->
<remap from="depth_registered/points" to="/point_cloud/points"/>
</node>
</launch>
Also based on depth_image_proc's lazy subscribing behavior, my face_detector
node subscribes to output /point_cloud/points
.
Without subscribing to the output, the depth_image_proc/point_cloud_xyz
node will not subscribe to the required topics stated above.
Do you mean that the
depth_image_proc/point_cloud_xyzrgb
node is subscribed to the topics mentioned above but receiving nothing?Sorry, I edited the question. I meant
depth_image_proc/point_cloud_xyz
node. By default, I think that node subscribes to default topic names ofdepth/camera_info
anddepth_registered/image_rect
which is not publishing anything since those topic names does not exist. Is there any way to change those default subscribed topics tocamera/depth/camera_info
and/face_detectoe/depth_image_roi
?