ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

interactivemarker processfeedback callback as a class method

asked 2013-10-04 01:35:12 -0600

Miguel Riem de Oliveira gravatar image

updated 2014-01-28 17:18:08 -0600

ngrennan gravatar image


I wanted to make a class that contains an interactivemarker server

Something like this

Problem is, I want to do this in a class. Thus I need to set the processFeedback callback as a class method.

I cannot compile the instruction

interactive_markers::InteractiveMarkerServer server->setCallback(, &ClassName::processFeedback);


interactive_markers::InteractiveMarkerServer server->setCallback(, &ClassName::processFeedback, this);

A similar issue for ros subscribers and service servers has been solved here

Does anybody know of something similar for interactivemarker servers?



edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-10-04 02:04:26 -0600

Miguel Riem de Oliveira gravatar image

I found the answers starting from here

... and reading a bit more about boost::bind

the solutions is to do:

interactive_markers::InteractiveMarkerServer server->setCallback(, boost::bind(&ClassName::processFeedback, this, _1));



edit flag offensive delete link more


Thank you so much for this answer!

ZiyangLI gravatar image ZiyangLI  ( 2015-02-07 01:23:31 -0600 )edit

How did you write your callback function? I followed that tutorial but for some reason it is just segfaults when the function is called.

vkee gravatar image vkee  ( 2017-10-10 15:18:04 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2013-10-04 01:35:12 -0600

Seen: 665 times

Last updated: Oct 04 '13