Robotics StackExchange | Archived questions

error catkin_make .msg files

Hi all!!

I try to create a .msg files to send a value to a program. I follow the tutorials to create the msg file and .msg files, but when i run ' catkin_make' i get the following error:

[ 86%] Built target uno_CORE

[ 91%] Built target uno_Servo

Scanning dependencies of target move

[ 95%] Building CXX object CMakeFiles/move.dir/move.cpp.obj

In file included from /home/emilio/catkin_ws/src/emilio_arduino/firmware/move.cpp:12:0:
/home/emilio/catkin_ws/devel/include/emilio_arduino/Num.h:9:18: fatal error: string: No existe el archivo o el directorio
 #include <string>

compilation terminated.

make[6]: *** [CMakeFiles/move.dir/move.cpp.obj] Error 1

make[5]: *** [CMakeFiles/move.dir/all] Error 2

make[4]: *** [CMakeFiles/move.dir/rule] Error 2

make[3]: *** [move] Error 2

make[2]: *** [emilio_arduino/CMakeFiles/emilio_arduino_firmware_move] Error 2

make[1]: *** [emilio_arduino/CMakeFiles/emilio_arduino_firmware_move.dir/all] Error 2

make: *** [all] Error 2

Invoking "make -j2 -l2" failed

emilio@emilio-N61Vg:~/catkin_ws$ roscd emilio_arduino/

FIRST EDIT

The first opening < i remove by accident. I am using Indigo distro to control servos using an Arduino board.

The message file is:

    Num.msg
    int64 a

And the CmakeLists.txt is:

cmake_minimum_required(VERSION 2.8.3)
project(emilio_arduino)
find_package(catkin REQUIRED COMPONENTS
  rosserial_arduino
  rosserial_client
  std_msgs
  message_generation
  sensor_msgs
  geometry_msgs
)

add_message_files(
   FILES
   Num.msg
   Num1.msg
 )

 generate_messages(
   DEPENDENCIES
   std_msgs
   sensor_msgs
   geometry_msgs
 )


catkin_package(
CATKIN_DEPENDS rosserial_arduino rosserial_client std_msgs message_runtime sensor_msgs geometry_msgs
)

rosserial_generate_ros_lib(
  PACKAGE rosserial_arduino
  SCRIPT make_libraries.py
)

rosserial_configure_client(
     DIRECTORY firmware 
     TOOLCHAIN_FILE ${ROSSERIAL_ARDUINO_TOOLCHAIN}
)

rosserial_add_client_target(firmware move ALL)

rosserial_add_client_target(firmware move-upload)

include_directories(
  ${catkin_INCLUDE_DIRS}
)

Thanks if somebody know what is happening.

Asked by Emilio on 2015-08-24 13:49:16 UTC

Comments

please use the code formatting (the button with ones and zeros) for making the code more readble...

Asked by mgruhler on 2015-08-25 07:16:20 UTC

You say

The first opening < i remove by accident.

So, do you still have the same error?

Asked by mgruhler on 2015-08-25 07:44:38 UTC

i remove it when i copied the code here but in the real code it is.

Asked by Emilio on 2015-08-25 08:02:30 UTC

Answers

The problem seems to be the following line

 #include string>

in the file

/home/emilio/catkin_ws/devel/include/emilio_arduino/Num.h 

Did you by accident remote the first opening <? It should probably read #include <string>?

If this does not help you, you need to provide more information. What does you CMakeLists.txt look like? On what system (seems to be Arduino, right?), what distro? Maybe the source code of the files where you have the problem... and the msg definition...

Asked by mgruhler on 2015-08-25 01:27:45 UTC

Comments