Ask Your Question

Revision history [back]

That's an interesting case. Simple solution would to boost::bind to your subscription callback but discard the _1 argument. Something like:

class Node
{
    init(){
        nh.subscribe(boost::bind(&Node::mapCb, this))
    }

    void mapCb(){
        //do stuff
    }
};

That's an interesting case. Simple

You could subscribe to the topic_tools::ShapeShifter msg on the map topic, which would AFAIK not deserialize the message automatically.

Another simple solution would to boost::bind to your subscription callback but discard the _1 argument. Something like:

class Node
{
    init(){
        nh.subscribe(boost::bind(&Node::mapCb, this))
    }

    void mapCb(){
        //do stuff
    }
};

I'm not 100% if this would skip the (de)serialization, or merely prevent the shared object from being created.