Robotics StackExchange | Archived questions

ROS Serial Arduino cstring error

I'm using ROS Noetic on my Ubuntu 20.04 and I wanted to try out a simple Arduino ROS interface example, but unfortunately I ran into errors. I did install the needed libraries as per instructions that I found in this page here:

http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup

I then opened the Blink sketch and when I clicked Verify, it failed with the following error:

>     In file included from /home/joesan/Arduino/libraries/Rosserial_Arduino_Library/src/std_msgs/Time.h:7:0,
>                      from /home/joesan/Arduino/libraries/Rosserial_Arduino_Library/src/ros/node_handle.h:40,
>                      from /home/joesan/Arduino/libraries/Rosserial_Arduino_Library/src/ros.h:38,
>                      from /home/joesan/Arduino/libraries/Rosserial_Arduino_Library/examples/Blink/Blink.pde:6:
>     /home/joesan/Arduino/libraries/Rosserial_Arduino_Library/src/ros/msg.h:40:10:
> fatal error: cstring: No such file or
> directory
>      #include <cstring>
>               ^~~~~~~~~
>     compilation terminated.
>     exit status 1
>     Error compiling for board Arduino Uno.

Any ideas how to get this fixed? I even tried running this:

rosrun rosserial_arduino make_libraries.py .

But even that gave me the same error! It is quite annoying to face this issue for running a simple program. Help please!

Asked by Joesan on 2020-12-24 05:01:04 UTC

Comments

Duplicate: See answers on this quetion #q361930

Asked by sloretz on 2020-12-28 11:13:55 UTC

Answers