RobotWebTools / rclnodejs

Node.js version of ROS 2.0 client
https://docs.ros.org/en/humble/Concepts/Basic/About-Client-Libraries.html?highlight=rclnodejs#community-maintained
Apache License 2.0
312 stars 70 forks source link

rcl lifecycle api changes in post-foxy rolling distro #781

Closed wayneparrott closed 3 years ago

wayneparrott commented 3 years ago

CI builds are failing on all 3 platforms due to an api change in the rcl lifecycle api.

See: https://github.com/ros2/rclcpp/issues/1506 https://github.com/ros2/rcl/pull/882

> rclnodejs@0.18.1 install /Users/distiller/RobotWebTools/rclnodejs
> node-gyp rebuild
...
  CXX(target) Release/obj.target/rclnodejs/src/rcl_bindings.o
../src/rcl_bindings.cpp:563:27: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare]
  if (type < RCL_ROS_TIME && type > RCL_STEADY_TIME) {
      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

CXX(target) Release/obj.target/rclnodejs/src/rcl_handle.o
  CXX(target) Release/obj.target/rclnodejs/src/rcl_lifecycle_bindings.o
../src/rcl_lifecycle_bindings.cpp:79:28: error: no matching function for call to 'rcl_lifecycle_state_machine_init'
                           rcl_lifecycle_state_machine_init(
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/macros.hpp:30:49: note: expanded from macro 'THROW_ERROR_IF_NOT_EQUAL'
  CHECK_OP_AND_THROW_ERROR_IF_NOT_TRUE(!=, lhs, rhs, message)
                                                ^~~
../src/macros.hpp:22:16: note: expanded from macro 'CHECK_OP_AND_THROW_ERROR_IF_NOT_TRUE'
    if (lhs op rhs) {                                               \
               ^~~
/Users/distiller/ros2_install/ros2-osx/include/rcl_lifecycle/rcl_lifecycle.h:244:1: note: candidate function not viable: requires 9 arguments, but 10 were provided
rcl_lifecycle_state_machine_init(
^
../src/rcl_lifecycle_bindings.cpp:88:25: error: no matching function for call to 'rcl_lifecycle_state_machine_fini'
        rcl_ret_t ret = rcl_lifecycle_state_machine_fini(
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/distiller/ros2_install/ros2-osx/include/rcl_lifecycle/rcl_lifecycle.h:278:1: note: candidate function not viable: requires 2 arguments, but 3 were provided
rcl_lifecycle_state_machine_fini(
^
2 errors generated.
minggangw commented 3 years ago

Hi, @wayneparrott if you meet any difficulties, I'd like to help.