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

error catkin_make .msg files

asked 2015-08-24 13:49:16 -0500

Emilio gravatar image

updated 2015-08-25 08:03:10 -0500

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.

edit retag flag offensive close merge delete

Comments

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

mgruhler gravatar image mgruhler  ( 2015-08-25 07:16:20 -0500 )edit

You say

The first opening < i remove by accident.

So, do you still have the same error?

mgruhler gravatar image mgruhler  ( 2015-08-25 07:44:38 -0500 )edit

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

Emilio gravatar image Emilio  ( 2015-08-25 08:02:30 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-08-25 01:27:45 -0500

mgruhler gravatar image

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...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-08-24 13:49:16 -0500

Seen: 266 times

Last updated: Aug 25 '15