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

Can't print in a file using "fprintf" when running the node through roslaunch

asked 2018-03-20 14:39:07 -0500

bemran gravatar image

updated 2018-03-20 16:50:13 -0500

jayess gravatar image

Hello, I have a node that uses printf, File and fprintf functions. If I run it using rosrun it works perfectly:

  1. it shows output on the screen
  2. It creates a file and prints data inside it.

However, if I run it through roslaunch:

  1. Nothing is showed in the screen
  2. It creates a file. However, the file is always empty; nothing is stored inside it.

I used output=screen in roslaunch put still can't see anything on the screen and nothing is stored in the file.

Could you please help.

edit retag flag offensive close merge delete

Comments

Welcome! It's difficult to help you because you haven't included any code (.cpp and .launch files). Please update your question with this information (using the preformatted text or 101010 button) and exactly how you're running everything.

jayess gravatar image jayess  ( 2018-03-20 16:51:44 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-09-08 13:59:48 -0500

darthShana gravatar image

can you try using

ROS_INFO("%s", msg.data.c_str());

along with what you have in your launch file output=screen

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-03-20 14:39:07 -0500

Seen: 622 times

Last updated: Sep 08 '20