Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Build issues when using message_filter: placeholder "_1" was not declared in this scope #7

Open
chaoli2 opened this issue Jul 3, 2018 · 6 comments

Comments

@chaoli2
Copy link

chaoli2 commented Jul 3, 2018

I encounter some build issues. Below is my code and log. What is the error that I made? Thanks.

message_filters::Subscriber<sensor_msgs::msg::Image> camSub(node.get(), "/camera/color/image_raw");
message_filters::Subscriber<object_msgs::msg::Objects> objSub(node.get(), "/movidius_ncs_stream/classified_objects");
message_filters::TimeSynchronizer<sensor_msgs::msg::Image, object_msgs::msg::Objects> sync(camSub, objSub, 10);
sync.registerCallback(std::bind(&showImage, _1, _2)); 

error

@chaoli2
Copy link
Author

chaoli2 commented Jul 4, 2018

I google this problem and follow the suggestion that replace "_1" with "std::placeholders::_1", and then got another issue from message_fiters:
error2

@LLB8
Copy link

LLB8 commented Aug 8, 2018

HI,

Did you solve your problem ?

@chaoli2
Copy link
Author

chaoli2 commented Aug 9, 2018

@LLB8
I got another piece of example code from maintainer to help me work around this issue. I suggest maintainer update README to avoid same issues @gaoethan

@tzven0
Copy link

tzven0 commented Mar 4, 2019

Hello,
can someone please tell me how to fix this issue?
Thx in advance!

@spam-12345
Copy link

I have the same problem...

1 similar comment
@wl3207601
Copy link

I have the same problem...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants