ROSIntegration icon indicating copy to clipboard operation
ROSIntegration copied to clipboard

Trigger implementation issues

Open brean opened this issue 1 year ago • 2 comments

I updated to the current ROSIntegration and noticed that this commit introduces an issue that makes it impossible to compile anymore: https://github.com/code-iai/ROSIntegration/commit/26c6f3fceca013b4204689078d1ed5d02d722585

The issue is that BCON_NEW is not allowed without parameter for the Linux implementation of libbson. However the needed parameter for success and message are added later in line 41 of StdSrvsTriggerResponseConverter.cpp

(see also https://github.com/ros/ros_comm_msgs/blob/kinetic-devel/std_srvs/srv/Trigger.srv )

I think instead of BCON_NEW we need something like BSON_INITIALIZER but I am not familiar enough with libbson to get this working, so maybe someone else can take a look?

My workaround for now is to comment it out and not use Trigger...

I also had to updated rapidjson to the latest master from https://github.com/Tencent/rapidjson to get it running with current Linux Ubuntu 22.04 (but that's another issue/independent of bcon)

brean avatar Jan 14 '24 00:01 brean

Hello @brean ,

I myself have not yet updated to the latest version, however I can help you fix this problem on your own fork for now. In the one file you mentioned, you can replace the line *BSONRequest = BCON_NEW(); with *BSONRequest = bson_new(); I did not write that piece of code, but my suggested fix is how I typically work with the libbson library for this plugin. Let me know if this works.

tsender avatar Jan 25 '24 16:01 tsender

Hello @brean ,

I myself have not yet updated to the latest version, however I can help you fix this problem on your own fork for now. In the one file you mentioned, you can replace the line *BSONRequest = BCON_NEW(); with *BSONRequest = bson_new(); I did not write that piece of code, but my suggested fix is how I typically work with the libbson library for this plugin. Let me know if this works.

I was facing the same issue. Replacing it with bson_new() works. Thanks!

adarshjamuaar avatar Jan 29 '24 19:01 adarshjamuaar