Custom Message header for arduino code not found
Hi all,
I have a code to be run on Arduino Mega 2560. This code depends on custom message header that I created for the package.
catkin_make on the workspace shows:
mypc@mypc:~/cairo_mm_ws$ catkin_make
Base path: /home/mypc/cairo_mm_ws
Source space: /home/mypc/cairo_mm_ws/src
Build space: /home/mypc/cairo_mm_ws/build
Devel space: /home/mypc/cairo_mm_ws/devel
Install space: /home/mypc/cairo_mm_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/mypc/cairo_mm_ws/build"
####
####
#### Running command: "make -j6 -l6" in "/home/mypc/cairo_mm_ws/build"
####
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] [ 0%] [ 0%] Built target _cairo_mm_msgs_generate_messages_check_deps_encoder_ticks
Built target _cairo_mm_msgs_generate_messages_check_deps_current
Built target _cairo_mm_msgs_generate_messages_check_deps_voltage
[ 0%] Built target _cairo_mm_msgs_generate_messages_check_deps_relay_status
[ 0%] Built target _cairo_mm_msgs_generate_messages_check_deps_turn_dc_motor
[ 0%] Built target _cairo_mm_msgs_generate_messages_check_deps_servo_activation_status
[ 0%] Built target std_msgs_generate_messages_cpp
[ 4%] [ 4%] Built target arduino_communicator_ros_lib
Built target std_msgs_generate_messages_py
[ 4%] Built target _cairo_mm_msgs_generate_messages_check_deps_turn_servo
[ 87%] [ 91%] [ 95%] Built target cairo_mm_msgs_generate_messages_lisp
Built target cairo_mm_msgs_generate_messages_cpp
Built target cairo_mm_msgs_generate_messages_py
[ 95%] Built target cairo_mm_msgs_generate_messages
-- Generating chatter
[100%] Built target read_base_component
-- Configuring done
CMake Warning (dev) in CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "mega2560_Servo" has an INTERFACE_LINK_LIBRARIES property. This
should be preferred as the source of the link interface for this library
but because CMP0022 is not set CMake is ignoring the property and using the
link implementation as the link interface instead.
INTERFACE_LINK_LIBRARIES:
mega2560_CORE;mega2560_Servo
Link implementation:
mega2560_CORE
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) in CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "mega2560_LiquidCrystal" has an INTERFACE_LINK_LIBRARIES property.
This should be preferred as the source of the link interface for this
library but because CMP0022 is not set CMake is ignoring the property and
using the link implementation as the link interface instead.
INTERFACE_LINK_LIBRARIES:
mega2560_CORE;mega2560_LiquidCrystal
Link implementation:
mega2560_CORE
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /home/mypc/cairo_mm_ws/build/arduino_communicator/firmware
[100%] Built target arduino_communicator_firmware
make[3]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
[ 83%] Built target mega2560_CORE
[ 87%] Built target mega2560_LiquidCrystal
[ 91%] Built target mega2560_Servo
[100%] Built target chatter
[100%] Built target arduino_communicator_firmware_chatter
I have referred to the following tutorials and questions:
1) http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup
2)http://answers.ros.org/question/196222/rosserial-fails-to-generate-rosserial_msgs-library/
3) http://answers.ros.org/question/189914/arduino-ide-does-not-find-msg-header/
I run the following commands:
cd Arduino/libraries
rm -rf ros_lib
rosrun rosserial_arduino make_libraries.py .
And I got the following Warning:
*** Warning, failed to generate libraries for the following packages: ***
moveit_ros_planning (missing dependency)
map_msgs
cairo_mm_msgs <-- the custom message
A quick Verify in the Arduino IDE shows:
sketch_feb17a.ino:47:41: fatal error: cairo_mm_msgs/encoder_ticks.h: No such file or directory
compilation terminated.
Yeap, of course, my custom made message is not in ros_lib
library.
Currently, I am using the Arduino 1.5.8 GUI, and my sketchbook directory is ~/Arduino/
I wonder what's wrong and how to make it work?
Any help? thanks in advance.
Asked by whiterose on 2015-02-16 02:51:17 UTC
Comments