2

I'm a beginner in ROS and started to learn the basics. So I have installed ROS and I am going through some tutorials. I have created two nodes (publisher and subscriber). Actually I was doing this ROS.org tutorial

1: At Step 3. Building your nodes, I get an error if I type catkin_make. Everything is setup like in the tutorial but its not working. The error is:

add_message_files() directory not found

And

Makefile:710: recipe for target 'cmake_check_build_system' failed

I don't know what to do here.

2: Is there a possibility to make an output without using launchfiles? I have looked it up and I noticed that you have to use launchfiles only if you want to run more than one node. In this Youtube tutorial 6:06 min the guy is using a cout in his callback function. I have also tried it like him and I changed my cmakelists equally like his but I don't get an output in my terminal. He does. In the next part the guy is changing some parts in his cmakelists but it doesn't help to get an output in the terminal.

So my question summarized is: How do I use cout and ROS_INFO or ROS_DEBUG correctly?

Benyamin Jafari
  • 27,880
  • 26
  • 135
  • 150

1 Answers1

0
  1. Your CMakeLists.txt file contains add_message_files that has no a path to .msg file (or wrong syntax)
  2. Post your CMakeLists.txt if you want further help on that.
  3. Launch files are merely .xml files that tells ROS system to run specific node and make it easier to pass params or env variables to nodes. you can run single node with rosrun command or even finding its binary file (wherever u compiled or installed it)

And of course you can cout it's C++ after all.

Also if you need help on ROS_<log_level> you can take a look at rosccp logging overview

Benyamin Jafari
  • 27,880
  • 26
  • 135
  • 150
Mohammad Ali
  • 569
  • 4
  • 10