Nodes not connecting through remap in launch file
Hello I am using ROS kinetic with ensenso/ros_driver and akio/mask_rcnn_ros, both the master branch. Running on Ubuntu 16.04 kernel version 4.15.0-46-generic.
I am using an Nvidia RTX 2080 ti with cuda 418.39
I am trying to connect the ensenso_camera_node to the mask_rcnn_node using a launch file in which I remap the input of the model to the output of the camera.
<launch>
<remap from="~input" to="/rectified/left/image"/>
<arg name="configuratie" value="$(find ensenso_camera)/configs/configuratie.json"/>
<node pkg="ensenso_camera" type="ensenso_camera_node" name="ensenso_camera_node">
<param name="settings" value="$(arg configuratie)"/>
</node>
<node pkg="ensenso_camera" type="request_data" name="image_data"></node>
<node pkg="tf" type="static_transform_publisher" name="ensenso_optical_frame"
args="0 0 0 0 0 0 world ensenso_optical_frame 100"/>
<node pkg="mask_rcnn_ros" type="mask_rcnn_node" name="mask_rcnn"></node>
</launch>
The nodes are started without an error, however, when I check with roswtf it states that either the input of the model is not connected, or that the camera and the model should be connected but aren't depending on the position of the remap statement in the launch file.
WARNING The following node subscriptions are unconnected:
* /mask_rcnn:
* /mask_rcnn/input
or
ERROR The following nodes should be connected but aren't:
* /ensenso_camera_node->/mask_rcnn (/camera_image)
I am guessing that I am making a mistake in the remapping of the topics but my experience with ROS is about as much as can be seen above so I am not sure. Hopefully someone can help me out with this.
Thanks in advance!
Environment:
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/riwo-rack-pc/ROS_Mask_rcnn/src:/opt/ros/kinetic/share
ROS_MASTER_URI=http://localhost:11311
ROSCONSOLE_CONFIG_FILE=/home/riwo-rack-
pc/ROS_Mask_rcnn/src/ros_comm/tools/rosconsole/config/rosconsole.config
ROS_VERSION=1
LD_LIBRARY_PATH=/home/riwo-rack-pc/ROS_Mask_rcnn/devel/lib:/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-
gnu
PATH=/home/riwo-rack-pc/ROS_Mask_rcnn/devel/bin:/opt/ros/kinetic/bin:/home/riwo-rack-pc/bin:/home/riwo-rack-
pc/.local/bin:/home/riwo-rack-
pc/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/sbin/
ROSLISP_PACKAGE_DIRECTORIES=/home/riwo-rack-pc/ROS_Mask_rcnn/devel/share/common-lisp
ROS_DISTRO=kinetic
PYTHONPATH=/home/riwo-rack-pc/ROS_Mask_rcnn/devel/lib/python2.7/dist-
packages:/opt/ros/kinetic/lib/python2.7/dist-packages
PKG_CONFIG_PATH=/home/riwo-rack-
pc/ROS_Mask_rcnn/devel/lib/pkgconfig:/opt/ros/kinetic/lib/pkgconfig:/opt/ros/kinetic/lib/x86_64-linux-gnu/pkgconfig
CMAKE_PREFIX_PATH=/home/riwo-rack-pc/ROS_Mask_rcnn/devel:/opt/ros/kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
As a reponse to the comments:
With the remap still in place the rosnode info mask_rcnn returns:
Node [/mask_rcnn]
Publications:
* /mask_rcnn/result [mask_rcnn_ros/Result]
* /mask_rcnn/visualization [sensor_msgs/Image]
* /rosout [rosgraph_msgs/Log]
Subscriptions:
* /mask_rcnn/input [unknown type]
Services:
* /mask_rcnn/get_loggers
* /mask_rcnn/set_logger_level
contacting node http://riworackpc-System-Product-Name:45449/ ...
Pid: 7733
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
With remap removed rosnode list returns:
/ensenso_camera_node
/ensenso_optical_frame
/image_stream_node
/mask_rcnn
/rosout
rostopic list returns:
/access_tree/cancel
/access_tree/feedback
/access_tree/goal
/access_tree/result
/access_tree/status
/calibrate_hand_eye/cancel
/calibrate_hand_eye/feedback
/calibrate_hand_eye/goal
/calibrate_hand_eye/result
/calibrate_hand_eye/status
/calibrate_workspace/cancel
/calibrate_workspace/feedback
/calibrate_workspace/goal ...
Maybe the
mask_rcnn
node is a lazy subscriber which means it only subscribes to the input topics (/rectified/left/image
) when another node is subscribing to its output topic (/mask_rcnn/result
,/mask_rcnn/visualization
). Have you tried having a node which subscribes to its output topic?I have tried to open the visualization topic in rviz, that is about it. Would a dummy node that simply requests data cause a different reaction?
@ZeroSan: that is a good thing to check, but looking at the source I don't believe this is the case.