void TopicPublisherROS::setEnabled(bool to_enable)
{  
    if( !_node && to_enable)
    {
        _node = RosManager::getNode();
    }
    enabled_ = (to_enable && _node);

    if(enabled_)
    {
        filterDialog();
        if( !_tf_publisher)
        {
            _tf_publisher = std::unique_ptr<tf::TransformBroadcaster>( new tf::TransformBroadcaster );
        }
        _previous_play_index = std::numeric_limits<int>::max();
    }
    else{
        _node.reset();
        _publishers.clear();
    }
}
Esempio n. 2
0
void dirFilterCb(Widget w, XtPointer client_data, XtPointer calldata)
{
 filterDialog((FileWindowRec *) client_data);
}