Trying out rosserial_arduino with platform io

asked 2020-10-11 19:25:40 -0600

l33 gravatar image

Hi,

trying out

http://wiki.ros.org/rosserial_arduino...

Anyone using rosserial_ardunio with https://platformio.org/ on ubnutu 20.04. noetic

The problem is that the ros_lib/ros/msg.h file that ROS puts in the Arduino directory uses <cstring>, the C++ version of <string.h>. Arduino does not recognise that for some reason.

rosrun rosserial_arduino make_libraries.py .

creates a library directory for me ....yay!

compiling .pio/build/uno/lib1ba/ros_lib/time.cpp.o In file included from lib/ros_lib/std_msgs/Time.h:7:0, from lib/ros_lib/ros/node_handle.h:40, from lib/ros_lib/ros.h:38, from src/main.cpp:2: lib/ros_lib/ros/msg.h:40:19: fatal error: cstring: No such file or directory compilation terminated. *** [.pio/build/uno/src/main.cpp.o] Error 1

is the code generated by rosrun rosserial_arduino make_libraries.py . too old or too new , or some compiler mismatch?

edit retag flag offensive close merge delete

Comments

Hi,

trying out

http://wiki.ros.org/rosserial_arduino...

Anyone using rosserial_ardunio with https://platformio.org/ on ubnutu 20.04. noetic

The problem is that the ros_lib/ros/msg.h file that ROS puts in the Arduino directory uses <cstring>, the C++ version of <string.h>. Arduino does not recognise that for some reason.

rosrun rosserial_arduino make_libraries.py .

creates a library directory for me ....yay!

compiling .pio/build/uno/lib1ba/ros_lib/time.cpp.o In file included from lib/ros_lib/std_msgs/Time.h:7:0, from lib/ros_lib/ros/node_handle.h:40, from lib/ros_lib/ros.h:38, from src/main.cpp:2: lib/ros_lib/ros/msg.h:40:19: fatal error: cstring: No such file or directory compilation terminated. *** [.pio/build/uno/src/main.cpp.o] Error 1

is the code generated by rosrun rosserial_arduino make_libraries.py . too old or too new , or some compiler mismatch?

l33 gravatar image l33  ( 2020-10-11 19:26:08 -0600 )edit
1

Hello

I had the same issue, to fixe it a used a previous version of the "rosserial_ardunio" io library and now it's working for me

(in platformio.ini): lib_deps =

 # Import "Rosserial Arduino Library" library from platformio.org
 # cf https://platformio.org/lib/show/1634/Rosserial%20Arduino%20Library/installation
  # RECOMMENDED
 # Accept new functionality in a backwards compatible manner and patches
 frankjoshua/Rosserial Arduino Library @ ^0.7.9
 # Accept only backwards compatible bug fixes
 # (any version with the same major and minor versions, and an equal or greater patch version)
 frankjoshua/Rosserial Arduino Library @ ~0.7.9
 # The exact version
 frankjoshua/Rosserial Arduino Library @ 0.7.9
brag00n gravatar image brag00n  ( 2020-12-11 08:24:19 -0600 )edit