Call rviz func() in C++ Node | save_image deprecated
Closed this issue · 2 comments
-
Press on File -> Save Image
Terminal output
this function is deprecated, use QScreen::grabWindow() instead. Defaulting to primary screen.
I want to use this method in my C++ Node, to make a Screenshot from the current scene. Is this possible ? -
Is it possible to trigger the saving of an rviz config File inside a C++ Node with a spefic filename?
Your environment
- OS Version: Ubuntu 20.04
- ROS Distro: Noetic
- RViz, Qt, OGRE, OpenGl version as printed by rviz:
[ INFO] [1643727526.391935339]: rviz version 1.14.11
[ INFO] [1643727526.391968462]: compiled against Qt version 5.12.8
[ INFO] [1643727526.391975936]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1643727526.398815514]: Forcing OpenGl version 0.
[ INFO] [1643727526.976363851]: Stereo is NOT SUPPORTED
[ INFO] [1643727526.976417022]: OpenGL device: NVIDIA GeForce RTX 2060/PCIe/SSE2
[ INFO] [1643727526.976430608]: OpenGl version: 4.6 (GLSL 4.6).
- Press on File -> Save Image
this function is deprecated, use QScreen::grabWindow() instead. Defaulting to primary screen.
This is just a warning. Screenshot still works.
I want to use this method in my C++ Node, to make a Screenshot from the current scene. Is this possible?
No, you cannot trigger that function in rviz from outside.
- Is it possible to trigger the saving of an rviz config File inside a C++ Node with a spefic filename?
Yes, the corresponding service is called save_config
:
$ rosservice info /rviz/save_config
Node: /rviz
URI: rosrpc://ares:37369
Type: rviz/SendFilePath
Args: path
Thank you for the information. I close the issue.