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

rosserial_arduino with cmake device-specs not found

asked 2022-05-30 22:29:36 -0600

jacksonw gravatar image

updated 2022-08-16 10:20:16 -0600

Mike Scheutzow gravatar image

I am making an Arduino sketch using rosserial_arduino that is dependent on custom message and service definitions. Because of that I am trying to build against my other packages within catkin. The problem I am having is that when I run catkin_make, the build fails with the following error:

avr-g++: error: device-specs/specs-esp8266: No such file or directory

I have downloaded the board definition files for the esp8266 and it shows up in the list of available boards generated by the cmake command print_board_list(). Is there a known way to fix this issue?

If I cannot get the catkin build to work, is it a viable alternative to build my ROS packages separately, then track down the generated message headers and copy them to my arduino workbook, then build the sketch with arduino IDE? Would that allow communication of the message types between arduino and ROS even as the packages containing message definitions are rebuilt, so long as the message definitions are not changed?

Thanks in advance!

system info: - OS: Ubuntu 20.04 in WSL - ROS: Noetic - Packages: rosserial_arduino 0.9.2, avr-gcc 5.4.0 - Microcontroller: Node MCU 1.0

Update June 3: After some more research and trial-and-error, it looks like the problem is the rosserial-arduino cmake toolchain doesn't support the esp8266 uC. The problem I have now is that I can't figure out how to add support for the esp8266 to the cmake/catkin build process. Can anyone point me in the right direction?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-08-16 09:23:48 -0600

arpaterson gravatar image

yes rosserial_arduino presents a toolchain for AVR based arduinos (like atmega16,328,32u4).

system info: - OS: Ubuntu 20.04 in WSL - ROS: Noetic - Packages: rosserial_arduino 0.9.2, avr-gcc 5.4.0 - Microcontroller: Node MCU 1.0

Note 'avr-gcc'.

You will need something else to help you set up a toolchain for an ESP.

Some examples from

  • rosserial_arduino is a port of rosserial_client to AVR arduinos.
  • ros_teensy is a port of rosserial_client to teensys.
  • ...etc.

They are mostly just for conveniently setting up a cmake sub-project as far as I know. Nice because you can build and upload with catkin.

When you use the manual and copy it into your arduino folder, thats one of the steps these do for you, plus adding custom messages.

Another step is setting up the mcu/board hardware, and porting the other arduino libraries to that mcu

It is relatively simple doing it the slightly more manual way as the arduino libraries and board/mcu hardware are all setup for you, through the board manager.. As long as roslib is also happy, then you are in business with arduino on X mcu.

You may want to consider just doing it that way. I'm also interested in the convenient way on anything more powerful than an arduino micro.

edit flag offensive delete link more

Question Tools


Asked: 2022-05-30 22:29:36 -0600

Seen: 58 times

Last updated: Aug 16 '22