depth_image_proc subscriber
I am trying to use the depth_image_proc node and am unsure how to connect it to my network. I have no experience with a nodelet and cannot seem to remap the topics correctly. Below is my output rqt_graph.
I wish to connect to topics published from the matlab global node and cannot subscribe correctly.
Here is my launch file:
<launch>
<group ns="cloud_gen">
<!-- This launch file uses the depth_image_proc node to transform a color image and a depth image
into an xyzrgb point cloud for use with the Navigation Stack -->
<!-- This file is to be used with the Intel Realsense node rs_rgbd.launch and the MATLAB code titles
realsense_lane_detect.m outputting the processed images-->
<arg name="rgb_camera_info" value="/camera/color/camera_info"/>
<arg name="rgb_rimg_ect" value="/processed_color"/> <!--Rectified color image-->
<arg name="depReg_imgrect" value="/processed_depth"/> <!--Rectified depth image-->
<arg name="out_cloud" value="/white_lines"/>
<!-- Nodelet manager for this pipeline -->
<node pkg="nodelet" type="nodelet" args="manager"
name="standalone_nodelet" output="screen"/>
<!-- Construct point cloud of the rgb and depth topics -->
<node pkg="nodelet" type="nodelet" name="depth_image_proc"
args="load depth_image_proc/point_cloud_xyzrgb standalone_nodelet" output="screen">
<remap from="rgb/camera_info" to="/camera/color/camera_info" />
<remap from="rgb/image_rect_color" to="$(arg rgb_rimg_ect)"/>
<remap from="depth_registered/image_rect" to="$(arg depReg_imgrect)"/>
<remap from="depth_registered/points" to="$(arg out_cloud)"/>
</node>
</group>
</launch>
Any help is appreciated!
Edit 1: Below is the output of rosnode info on that MATLAB node.
rosnode info /matlab_global_node_59233
--------------------------------------------------------------------------------
Node [/matlab_global_node_59233]
Publications:
* /processed_color [sensor_msgs/Image]
* /processed_depth [sensor_msgs/Image]
* /rosout [rosgraph_msgs/Log]
Subscriptions:
* /camera/depth_registered/points [sensor_msgs/PointCloud2]
Services: None
contacting node http://whitelines:42372/ ...
Pid: 21599
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
* topic: /camera/depth_registered/points
* to: /camera/realsense2_camera_manager (http://whitelines:44751/)
* direction: inbound
* transport: TCPROS
Hello cmfuhrman, could you please elaborate more what you are trying to do? Which node needs to be connected to which? Which node needs to be connected to MATLAB node? Is it realsense->depth_image_proc->matlab?
I am taking the point cloud from the RealSense node and processing in MATLAB. I want to send the processed depth image and the processed rgb image back to the depth_image_proc node. I would be going RealSense-->MATLAB-->depth_image_proc. I am unsure why I cannot get the topics properly remapped.
I wand the depth_image_proc to subsribe to the following: "/camera/color/camera_info" "/processed_color" "/processed_depth" through remapping.
Thanks for the explanation! I have actually tried running your launch script with some
.bag
files and it worked right away. Mydepth_image_proc
node subscribes to all the topics from the.bag
and produces pointcloud visible in rviz. Could you please providerosnode info
of your MATLAB node?Sorry to take so long - did not have access to the camera. Please see edit 1.