Ask Your Question
0

Problem generating message headers for arduino [closed]

asked 2015-06-06 09:12:10 -0500

Pandaii gravatar image

Hello !

I generate Encoders.h from the following code put in Encoders.msg.

Header header
int32 left
int32 right

I generate the .h file trhough the CmakeLists.txt:

find_package(catkin REQUIRED COMPONENTS message_generation geometry_msgs std_msgs)

add_message_files(
  DIRECTORY msg
  FILES
  Encoders.msg
)

generate_messages(
  DEPENDENCIES
    std_msgs
  geometry_msgs
)

catkin_package(CATKIN_DEPENDS message_runtime std_msgs)

install(DIRECTORY include/${PROJECT_NAME}/
  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  FILES_MATCHING PATTERN "*.h")

But at the end the Encoders.h file starts with:

#include <string>
#include <vector>
#include <map>

#include <ros/types.h>
#include <ros/serialization.h>
#include <ros/builtin_message_traits.h>
#include <ros/message_operations.h>

#include <std_msgs/Header.h>

But all these files that need to be included are not found by arduino ide. What's more, when I fill in the path to the files, there are new problems because ros/serialization.h tries to include shared_array.hpp file ... but .hpp is not supported by arduino.

What do I need to check? How am I supposed to generate message headers for arduino?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Pandaii
close date 2015-10-16 16:41:03.395500

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-06-06 11:33:05 -0500

You should read the the rosserial_tutorial that explains that the headers used are different than the normal ones. You can create them using rosrun rosserial_arduino make_libraries.py LOCATION.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-06-06 09:12:10 -0500

Seen: 148 times

Last updated: Jun 06 '15