ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
<launch>
     <remap from="~input" to="/rectified/left/image"/>
     ...
</launch>

This won't work: the ~ there is typically used to refer to the private namespace of a node. Your remap tag is however not a child of any node, so this doesn't remapping doesn't make sense.

You'll want to move the remap down to where the mask_rcnn_node node is being launched:

<node pkg="mask_rcnn_ros" type="mask_rcnn_node" name="mask_rcnn">
  <remap from="input" to="/rectified/left/image" />
</node>

and drop the ~.

<launch>
     <remap from="~input" to="/rectified/left/image"/>
     ...
</launch>

This won't work: the ~ there is typically used to refer to the private namespace of a node. Your remap tag is however not a child of any node, so this doesn't remapping doesn't make sense.

You'll want to move the remap down to where the mask_rcnn_node node is being launched:

<node pkg="mask_rcnn_ros" type="mask_rcnn_node" name="mask_rcnn">
  <remap from="input" to="/rectified/left/image" />
</node>

and drop the ~.

Edit: seems the ~ does make this work, at least for me.

I don't have an Ensenso to test with, but with the Simple Publisher and Subsciber from this tutorial (edited to use the same topic names as the nodes the OP uses), the following works for me:

<launch>
  <node pkg="..." type="simple_pub.py" name="ensenso_camera_node" />
  <node pkg="..." type="simple_sub.py" name="mask_rcnn">
    <remap from="~input" to="/rectified/left/image"/>
  </node>
</launch>

Original answer:

<launch>
     <remap from="~input" to="/rectified/left/image"/>
     ...
</launch>

This won't work: the ~ there is typically used to refer to the private namespace of a node. Your remap tag is however not a child of any node, so this remapping doesn't make sense.

You'll want to move the remap down to where the mask_rcnn_node node is being launched:

<node pkg="mask_rcnn_ros" type="mask_rcnn_node" name="mask_rcnn">
  <remap from="input" to="/rectified/left/image" />
</node>

and drop the ~.

Edit: seems the ~ does make this work, at least for me.

I don't have an Ensenso to test with, but with the Simple Publisher and Subsciber from this tutorial (edited to use the same topic names as the nodes the OP uses), the following works for me:

<launch>
  <node pkg="..." type="simple_pub.py" name="ensenso_camera_node" />
  <node pkg="..." type="simple_sub.py" name="mask_rcnn">
    <remap from="~input" to="/rectified/left/image"/>
  </node>
</launch>

Output of rostopic list with this running:

/rectified/left/image
/rosout
/rosout_agg

which is what I would expect: the input topic no longer "exists" (as it's been completely remapped to /rectified/left/image).


Original answer:

<launch>
     <remap from="~input" to="/rectified/left/image"/>
     ...
</launch>

This won't work: the ~ there is typically used to refer to the private namespace of a node. Your remap tag is however not a child of any node, so this remapping doesn't make sense.

You'll want to move the remap down to where the mask_rcnn_node node is being launched:

<node pkg="mask_rcnn_ros" type="mask_rcnn_node" name="mask_rcnn">
  <remap from="input" to="/rectified/left/image" />
</node>

and drop the ~.

Edit: seems the ~ does make this work, at least for me.

I don't have an Ensenso to test with, but with the Simple Publisher and Subsciber from this tutorial (edited to use the same topic names as the nodes the OP uses), the following works for me:

<launch>
  <node pkg="..." type="simple_pub.py" name="ensenso_camera_node" />
  <node pkg="..." type="simple_sub.py" name="mask_rcnn">
    <remap from="~input" to="/rectified/left/image"/>
  </node>
</launch>

Output of rostopic list with this running:

/rectified/left/image
/rosout
/rosout_agg

which is what I would expect: the the input topic no longer "exists" (as it's been completely remapped to /rectified/left/image).


Original answer:

<launch>
     <remap from="~input" to="/rectified/left/image"/>
     ...
</launch>

This won't work: the ~ there is typically used to refer to the private namespace of a node. Your remap tag is however not a child of any node, so this remapping doesn't make sense.

You'll want to move the remap down to where the mask_rcnn_node node is being launched:

<node pkg="mask_rcnn_ros" type="mask_rcnn_node" name="mask_rcnn">
  <remap from="input" to="/rectified/left/image" />
</node>

and drop the ~.