Ask Your Question

Problem compiling node with Geany

asked 2020-03-02 05:02:27 -0500

Yadav gravatar image

updated 2020-03-03 01:51:22 -0500

mgruhler gravatar image

Hello everyone when i compile my Node;cpp file it points me towards an error in Node.h file And the error it shows is

Node.h : fatal error: ros/ros.h : No file or folder of this type

I have looked into previous questions asked on this topic, so my file "package.xml" and "CmakeLists.txt" for this node seems correct to me, though i am posting them


<?xml version="1.0"?>
  <description>Fusion of pointcloud sonar and scan laser</description>

  <maintainer email="">Rob</maintainer>


  <!-- todo -->

  <!-- The export tag contains other, unspecified, tags -->
    <!-- Other tools can request additional information be placed here -->



cmake_minimum_required(VERSION 2.8.12)


## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED

#  INCLUDE_DIRS include
#  LIBRARIES p_sedimentation_estimator
#  CATKIN_DEPENDS other_catkin_pkg
#  DEPENDS system_lib

find_package(OpenCV REQUIRED)
find_package(Boost 1.54.0 REQUIRED COMPONENTS )

## Build ##

## Specify additional locations of header files
## Your package locations should be listed before other locations

file(GLOB Node_SRC

## Declare a C++ executable
add_executable(p_sedimentation_estimator ${Node_SRC})

## Specify libraries to link a library or executable target against

## Install ##

# all install targets should use catkin DESTINATION variables
# See

## Mark executables and/or libraries for installation
install(TARGETS p_sedimentation_estimator p_sedimentation_estimator

WHAT or Where could be the problem ??

1)catkin_make runs without error

2)Compilation of the node.cpp program gives this error(Node.h : fatal error: ros/ros.h : No file or folder of this type) in node.h file

3) is it necesarry to use build also , other than sourcing, catkin_make and compiling.

Help Needed :) Thanku in advance :)

edit retag flag offensive close merge delete


Could I ask you to please format your questions properly? I've done it for you now (and in your previous questions as well), but for next time: select any code/console text/etc and press ctrl+k or click the Preformatted Text button (the one with 101010 on it).

gvdhoorn gravatar image gvdhoorn  ( 2020-03-02 06:04:31 -0500 )edit

@gvdhoorn Thanku so much...i will keep it in mind next time :)

Yadav gravatar image Yadav  ( 2020-03-02 06:38:16 -0500 )edit

@Yadav If I understand your question correctly, at the end you specify three points 1), 2), 3) that you step through, right?

Could you please explain how you "compile" your node? Because this is actually what catkin_make will do for you and thus I don't think you can have 1) successfull and 2) not if you are using the standard workflow...

mgruhler gravatar image mgruhler  ( 2020-03-02 08:01:50 -0500 )edit

@mgruhler Yes,catkin_make runs without error But when i compile the code in the Node.cpp file alone, using "Geany" it shows me the error(Node.h : fatal error: ros/ros.h : No file or folder of this type) in node.h file So by catkin_make it gets compiled but it doen't work according to the code in Node.cpp file

Standard workflow ?

Yadav gravatar image Yadav  ( 2020-03-02 08:52:10 -0500 )edit

@Yadav then you don't have a problem with compiling your code in general, but only using geany. I've retagged and reworded your question title as such.

mgruhler gravatar image mgruhler  ( 2020-03-03 01:51:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-03-03 01:58:50 -0500

mgruhler gravatar image

As ROS and caktin heavily builds on CMake as a build system, you at least need an IDE that supports it. Even though it is stated that Geany can use CMake, I haven't found a way to properly configure it with a few minutes of search. You might have to use some plugins.

This is even more true that ROS also requires a few more quirks to set up, usually. There is a large list of IDEs and how to use them with ROS on the wiki. I suggest you try one of those if you want to compile from source. If you want more fancy stuff like jumping to external (out of your source) function definitions, those instructions might come in handy.

On another note: you tagged your question with Indigo. Indigo is EOL since for almost a year now, I suggest to update to a new one

edit flag offensive delete link more


I could suggest to not use GEANY also :) Thanks @mgruhler @gvdhoom for the help :)

Yadav gravatar image Yadav  ( 2020-03-10 05:27:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-03-02 05:02:27 -0500

Seen: 91 times

Last updated: Mar 10 '20