0
$\begingroup$

Rosanswers logo

Hello everyone,

I just have a simple question on which i'm stuck for a few days : I have a node in which I output a hand written log file using the c++ functions from fstream.

When i'm starting it using rosrun, my file are correctly generated. However, using a rosrun is not practical when you want to use topics rename and I wanted to make it generic and to launch it with a roslaunch. However, it appears that, when I start it with the roslaunch, I don't suceed anymore to write my output files.

I looked into the output option from the roslaunch, "screen" or "log" ( default) are available but in the doc it's written that they should redirect stdout/stderr (http://wiki.ros.org/roslaunch/XML/node) and not other custom outputs.

If you have any solution or any idee to fix it, I will welcome them with pleasure =D


Originally posted by TTDM on ROS Answers with karma: 267 on 2017-07-12

Post score: 0


Original comments

Comment by gvdhoorn on 2017-07-12:
Can you check whether you can find the files in $HOME/.ros?

Comment by Kailegh on 2017-07-13:
can you post your node?

Comment by TTDM on 2017-07-13:
It's indeed in my $HOME/.ros which, in my opnion shouldn't be but ti's there, thanks a lot for your answer, waiting for you for a fewdays if you want to make an answer below ;)

Comment by TTDM on 2017-07-13:
And I will add a question since it's not very practical, Would you have an idee on how to change it's location ?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It's indeed in my $HOME/.ros which, in my opnion shouldn't be but ti's there [..]

Please see #q235337.

Best practice is to use absolute paths, not relative ones.

Use parameters (and rospack find ..) to be able to keep flexibility.


Originally posted by gvdhoorn with karma: 86574 on 2017-07-13

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by TTDM on 2017-07-13:
Thanks =D So the relative paths work with "direct" rosrun calls but not with roslaunch ones. Currently looking into your link for more details ! Thanks once more

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.