ROBOTIS-GIT / ros2arduino

This library helps the Arduino board communicate with the ROS2 using XRCE-DDS.
Apache License 2.0
219 stars 43 forks source link

ros2 service replier #58

Open amfern opened 3 years ago

amfern commented 3 years ago

Implements ROS2 service

amfern commented 3 years ago

This resolves #51

amfern commented 3 years ago

ping @OpusK, hey can you take a look?

per1234 commented 3 years ago

Regarding this CI failure: https://travis-ci.org/github/ROBOTIS-GIT/ros2arduino/builds/751887104#L405

In file included from /home/travis/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/SafeRingBuffer.h:25:0,
                 from /home/travis/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/Uart.h:23,
                 from /home/travis/.arduino15/packages/arduino/hardware/samd/1.8.11/variants/mkr1000/variant.h:164,
                 from /home/travis/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/Arduino.h:48,
                 from sketch/subscriber.ino.cpp:1:
/home/travis/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:22: error: expected unqualified-id before 'for'
 #define synchronized for (__Guard __guard; __guard.enter(); )
                      ^
/home/travis/arduino_ide/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~
/home/travis/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:44: error: '__guard' does not name a type; did you mean '__Guard'?
 #define synchronized for (__Guard __guard; __guard.enter(); )
                                            ^
/home/travis/arduino_ide/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~
/home/travis/.arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/sync.h:28:61: error: expected unqualified-id before ')' token
 #define synchronized for (__Guard __guard; __guard.enter(); )
                                                             ^
/home/travis/arduino_ide/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
     bool synchronized;
          ^~~~~~~~~~~~
exit status 1

It has been reported here: https://github.com/arduino/ArduinoCore-samd/issues/596 I don't think it is related to the changes made in this pull request in any way. It's simply that the breakage was introduced in the 1.8.11 release of the Arduino SAMD Boards platform on 2020-12-24, which came after the last CI run, but before this PR was submitted. If you compile the ros2arduino code from the master branch with Arduino SAMD Boards 1.8.11 you'll get the same error.

OpusK commented 3 years ago

@amfern Sorry for the late.

Unfortunately, I no longer have administrative rights to this repo...

amfern commented 3 years ago

Thanks for coming back, i learn alot when tinckering with this repo. And i already moved on to micro_ros_arduino