[ros-users] [Discourse.ros.org] [General] Send Data In Publisher Through QT Button

tomerY ros.discourse at gmail.com
Tue Sep 12 10:22:25 UTC 2017



Hi friends,

I have seen some online guides on how to link between QT GUI and ros with 'publisher'.

all the guides are using   ros::init

int main(int argc, char **argv)
{
  ros::init(argc, argv,"envoyeur"); 
}

but I need to send some data to ros, when I am clicking a button.
and in the functions of the button i cant use argc, argv.

in the mainWindow.cpp:
void MainWindow::on_savePositionButton_clicked()
{
   //When I'm clicking here, i need to send some data with publisher.
}

Someone can help me please ? 

THANK YOU!





---
[Visit Topic](https://discourse.ros.org/t/send-data-in-publisher-through-qt-button/2624/1) or reply to this email to respond.




More information about the ros-users mailing list