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

SEnergy's profile - activity

2020-04-18 02:55:34 -0500 received badge  Famous Question (source)
2019-12-18 12:53:26 -0500 received badge  Notable Question (source)
2019-12-18 12:53:26 -0500 received badge  Popular Question (source)
2019-09-21 11:48:13 -0500 marked best answer CLion doesn't see header generated by service

I have a fresh install of all - Ubuntu, CLion and ROS Melodic, and I am having troubles with how CLion handles the headers

I have a package called maze_controller, which contains a custom service and a robot controller

compiling works without a problem, but CLion, for some reason, reports that it can't find a message.h header, even tho it is in devel/include and the code compiles fine despite that... as you might already guess, the message used is also reported as unknown, but catkin compiles the code juuust fine...

is there a way to fix this? I don't remember having such issue before I updated everything (coming from Lunar and Ubuntu 16.04)

yes, CLion is opened from a terminal with sourced workspace yes, project was built before yes, I tried deleting .idea

CMake for the package:

cmake_minimum_required(VERSION 2.8.3)
project(maze_controller)

add_compile_options(-std=c++11)

find_package(catkin REQUIRED COMPONENTS
  message_generation
  roscpp
  std_msgs
)

add_service_files(
        FILES
        movement.srv
)

generate_messages(
        DEPENDENCIES
        std_msgs
)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES maze_controller
  CATKIN_DEPENDS roscpp std_msgs message_runtime
)

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)

add_library(${PROJECT_NAME} src/virtual_controller.cpp src/real_controller.cpp)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})

add_executable(${PROJECT_NAME}_test_sim src/virtual_controller_test.cpp)
target_link_libraries(${PROJECT_NAME}_test_sim ${PROJECT_NAME})

add_executable(${PROJECT_NAME}_test src/real_controller_test.cpp)
target_link_libraries(${PROJECT_NAME}_test ${PROJECT_NAME})

## Mark executables and/or libraries for installation
install(TARGETS ${PROJECT_NAME}
        ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
        LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
        RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
        )

## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
        DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
        FILES_MATCHING PATTERN "*.h"
        PATTERN ".svn" EXCLUDE
        )

image description

2019-09-21 11:48:13 -0500 received badge  Scholar (source)
2019-09-21 11:48:05 -0500 received badge  Rapid Responder (source)
2019-09-21 11:48:05 -0500 answered a question CLion doesn't see header generated by service

I didn't really realize this, as I've been using CLion only for editing, not for compiling & running, but I still ha

2019-09-21 11:35:49 -0500 commented question CLion doesn't see header generated by service

yes... I never had this problem before when I was using Ubuntu 16.04 and Lunar, however I just switched to 18.04 and Mel

2019-09-21 11:29:52 -0500 edited question CLion doesn't see header generated by service

CLion doesn't see header generated by service I have a fresh install of all - Ubuntu, CLion and ROS Melodic, and I am ha

2019-09-21 11:29:52 -0500 received badge  Editor (source)
2019-09-21 11:27:38 -0500 commented question CLion doesn't see header generated by service

@gvdhoorn I just went over http://wiki.ros.org/catkin/CMakeLists.txt and made slightly different CMake file (basically t

2019-09-21 11:26:13 -0500 edited question CLion doesn't see header generated by service

CLion doesn't see header generated by service I have a fresh install of all - Ubuntu, CLion and ROS Melodic, and I am ha

2019-09-21 11:20:26 -0500 asked a question CLion doesn't see header generated by service

CLion doesn't see header generated by service I have a fresh install of all - Ubuntu, CLion and ROS Melodic, and I am ha