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

How to use a Arduino Due in a CMake-based package using rosserial-arduino?

asked 2018-05-03 06:28:55 -0600

I prefer using the CMake-based approach for packages using rosserial-arduino as not requiring the Arduino IDE has quite a few advantages. For the older Arduino boards, specifying the board type is as simple as typing it somewhere in the CMakeLists.txt, e.g. (example from here):

generate_arduino_firmware(controller
  SRCS controller.cpp ../lib/AFMotor.cpp ${ROS_LIB_DIR}/time.cpp
  BOARD uno
  PORT /dev/ttyUSB0
)

It appears to be a bit more complicated for the Due however, as that one is special and not a "classical" avr device (see location-of-boards-txt-for-an-arduino-due-sam-board on stackoverflow for instance).

My question is: Is it possible to "painlessly" compile and flash firmware for the Due using a CMake setup, or is it required to manually copy and setup the boards.txt for that one somewhere?

edit retag flag offensive close merge delete

Comments

Just found http://answers.ros.org/question/22551... ,which pretty much is the same question, but asked 2 years ago. No really useful answer, though.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2018-05-14 13:35:55 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-05-14 17:16:37 -0600

I opened an issue on the rosserial github regarding this (see rosserial #370). Unfortunately, at this point in time, the Due is not supported. Adding it would mean integrating a newer fork of arduino-cmake.

edit flag offensive delete link more
0

answered 2018-05-03 09:00:00 -0600

There is a platform named PlatformIO (that I've been using within VSCode), where you can use all needed libraries without building a CMakeLists.txt. There you can choose between different boards, including Arduino, and use a great structure. The whole interface provided by the PlatformIO is much better than Arduino IDE, you can try out it and reply me.

edit flag offensive delete link more

Comments

Thanks for the tip, but what I'm interested in is using a CMakeLists.txt and being able to invoke the build and flashing process using catkin without installing anything else or having to use a GUI. Not sure PlatformIO fits that bill :)

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2018-05-03 14:17:04 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2018-05-03 06:28:55 -0600

Seen: 739 times

Last updated: May 14 '18