Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It is not possible to do it like this because > outputfile.txt is a bash / shell specific operation. Unlike -p /tf_P3AT which are passed to the executable as argv to its main( int argc, char** argv ) function the part > outputfile.txt is handled by the shell itself. Therefore if used in a launch file roslaunch would have to handle it, which it is not able to.

So you need another solution. Maybe you can ad the node without > outputfile.txt and set output attribute to log. Then you should find a log somewhere in $ROS_HOME/log, which defaults to $HOME/.ros/log. However, I am not sure how/if you can specifiy the log name. Maybe run rosclean purge to remove previous log files so it'll be easier to find the log file of you node....