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

File output With roslaunch

asked 2017-07-12 10:10:14 -0500

TTDM gravatar image

updated 2017-07-12 10:10:42 -0500

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

edit retag flag offensive close merge delete

Comments

1

Can you check whether you can find the files in $HOME/.ros?

gvdhoorn gravatar image gvdhoorn  ( 2017-07-12 10:30:53 -0500 )edit

can you post your node?

Kailegh gravatar image Kailegh  ( 2017-07-13 03:20:10 -0500 )edit

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 ;)

TTDM gravatar image TTDM  ( 2017-07-13 05:49:08 -0500 )edit

And I will add a question since it's not very practical, Would you have an idee on how to change it's location ?

TTDM gravatar image TTDM  ( 2017-07-13 05:51:29 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-07-13 05:53:08 -0500

gvdhoorn gravatar image

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.

edit flag offensive delete link more

Comments

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

TTDM gravatar image TTDM  ( 2017-07-13 07:35:22 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-07-12 10:10:14 -0500

Seen: 2,085 times

Last updated: Jul 13 '17