Ask Your Question

how to make a ROS Map a background for rqt gui

asked 2014-09-05 05:50:35 -0500

beginner_alex gravatar image

i'm programming a GUI with QT which should run in RQT and have a ROS MAP as a background. I tried using map_server to launch the map but then i get the warning in QT : it is not safe to use pixmaps outside the GUI. I'm totally confused how to combine ros, qt and rqt together so if there is any example or explanation on this subject i would really appreciate it. thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-09-05 11:18:34 -0500

Dirk Thomas gravatar image

In any Qt application you can only modify UI elements from the Qt event loop.

When integrating with ROS you therefore have to be careful to not touch UI elements from a ROS callback (since it is called from a ROS thread). Whenever possible you should use model / view based UI in Qt because you are free to interact with the model from any thread. Otherwise you commonly do something like the following to perform the UI modification in the Qt event loop:

  • in the ROS callback store the data somewhere and signal a Qt event
  • handle the Qt event and apply the previously received data to the UI

You should find similar patterns in many existing rqt plugins.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2014-09-05 05:50:35 -0500

Seen: 420 times

Last updated: Sep 05 '14