Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As described on http://www.ros.org/wiki/Remapping%20Arguments, remapping happens on full names, and after the names are resolved. So for your second remap,

  1. Resolving 'sim/twist' would result in either '/mynode/sim/twist' or '/sim/twist' depending on whether you put the remap inside or outside the <node> tag for mynode.
  2. '/mynode/myrobot/sim/twist' does not equal '/mynode/sim/twist' so would be unaffected by the remap.

I'm not sure how to do what you want in roslaunch — you'd need for the robot name to be known at the point that the node is launched, and passed in somehow.

See also http://www.ros.org/wiki/Names.

As described on http://www.ros.org/wiki/Remapping%20Arguments, http://www.ros.org/wiki/Remapping%20Arguments remapping happens on full names, and after the names are resolved. So for your second remap,

  1. Resolving 'sim/twist' would result in either '/mynode/sim/twist' or '/sim/twist' depending on whether you put the remap inside or outside the <node> tag for mynode.
  2. '/mynode/myrobot/sim/twist' does not equal '/mynode/sim/twist' so would be unaffected by the remap.

I'm not sure how to do what you want in roslaunch — you'd need for the robot name to be known at the point that the node is launched, and passed in somehow.

See also http://www.ros.org/wiki/Names.