Cannot use catkin build with Arduino Nano Every
I am using rosserial to communicate with my Arduino and I configured it to be able to compile directly the program with catkin build
. I followed the tutorial here. It works perfectly with Arduino Uno, but when I switched to Arduino Nano Every, the building crashed. I do not know the board id
of this Arduino. If I use nano
the compilation crashes after some time, if I use nona4809
or every
, it crashes straight (Invalid Arduino board ID (nona4809), aborting.
).
If I compile the program with the Arduino IDE, it works fine. I can get the data with rosserial.
Here is the compilation error message:
make[4]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
avrdude done. Thank you.
make[7]: *** [CMakeFiles/hello-upload.dir/build.make:57: CMakeFiles/hello-upload] Error 1
make[6]: *** [CMakeFiles/Makefile2:110: CMakeFiles/hello-upload.dir/all] Error 2
make[5]: *** [CMakeFiles/Makefile2:117: CMakeFiles/hello-upload.dir/rule] Error 2
make[4]: *** [Makefile:131: hello-upload] Error 2
make[3]: *** [CMakeFiles/sensor_arduino_pkg_firmware_hello-upload.dir/build.make:57: CMakeFiles/sensor_arduino_pkg_firmware_hello-upload] Error 2
make[2]: *** [CMakeFiles/Makefile2:780: CMakeFiles/sensor_arduino_pkg_firmware_hello-upload.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:787: CMakeFiles/sensor_arduino_pkg_firmware_hello-upload.dir/rule] Error 2
make: *** [Makefile:474: sensor_arduino_pkg_firmware_hello-upload] Error 2
cd /home/project/build/sensor_arduino_pkg; catkin build --get-env sensor_arduino_pkg | catkin env -si /usr/bin/make sensor_arduino_pkg_firmware_hello-upload --jobserver-auth=3,4; c
Without error messages, it is a bit hard to understand. My CMakeLists.txt
file is same as the one in the tutorial, besides the BOARD and the file name:
cmake_minimum_required(VERSION 2.8.3)
project(sensor_arduino_pkg)
## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)
include_directories(${ROS_LIB_DIR})
# Remove this if using an Arduino without native USB (eg, other than Leonardo)
add_definitions(-DUSB_CON)
generate_arduino_firmware(hello
SRCS data.cpp ${ROS_LIB_DIR}/time.cpp
BOARD nano
PORT /dev/ttyACM0
)
How can I make work catkin build
with Arduino Nano Every?
Thanks in advance.