ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I think it would be a great feature even though Gazebo is meant for that task. Sometimes Gazebo is just too cumbersome to invoke when some simple graphical primitives in Rviz could do the job just fine.
One hacky solution is to run a screen grab node http://wiki.ros.org/screengrab_ros and position the rviz window just so, though it would be very brittle and hard to automate with launch files.
Another route that will be very crude is to draw images using OpenCV and then it is easy to publish them, some minimal 3D can be done using projectPoints.
2 | No.2 Revision |
I think it would be a great feature even though Gazebo is meant for that task. Sometimes Gazebo is just too cumbersome to invoke when some simple graphical primitives in Rviz could do the job just fine.
It looks like the rviz default plugin camera_display.cpp is the best starting point for modification for grab a rendered view and publish it. The panel display ought to be replaced by render-to-texture, and ogre writeContentsToFile() could be used instead of the less easily done copying of pixel data from the frame buffer and then putting it inside a cv::Mat container (which then could be converted to an Image with cv_bridge), or putting the pixel the data inside a sensor_msgs::Image directly.
Old suggestions:
One hacky solution is to run a screen grab node http://wiki.ros.org/screengrab_ros and position the rviz window just so, though it would be very brittle and hard to automate with launch files.
Another route that will be very crude is to draw images using OpenCV and then it is easy to publish them, some minimal 3D can be done using projectPoints.
3 | No.3 Revision |
I think it would be a great feature even though Gazebo is meant for that task. Sometimes Gazebo is just too cumbersome to invoke when some simple graphical primitives in Rviz could do the job just fine.
It looks like the rviz default plugin camera_display.cpp camera_display https://github.com/ros-visualization/rviz/blob/indigo-devel/src/rviz/default_plugin/camera_display.cpp is the best starting point for modification for grab a rendered view and publish it. The panel display ought to be replaced by render-to-texture, and ogre writeContentsToFile() could be used instead of the less easily done copying of pixel data from the frame buffer and then putting it inside a cv::Mat container (which then could be converted to an Image with cv_bridge), or putting the pixel the data inside a sensor_msgs::Image directly.
Old suggestions:
One hacky solution is to run a screen grab node http://wiki.ros.org/screengrab_ros and position the rviz window just so, though it would be very brittle and hard to automate with launch files.
Another route that will be very crude is to draw images using OpenCV and then it is easy to publish them, some minimal 3D can be done using projectPoints.
4 | No.4 Revision |
I think it would be a great feature even though Gazebo is meant for that task. Sometimes Gazebo is just too cumbersome to invoke when some simple graphical primitives in Rviz could do the job just fine.
It looks like the rviz default plugin camera_display https://github.com/ros-visualization/rviz/blob/indigo-devel/src/rviz/default_plugin/camera_display.cpp is the best starting point for modification for grab a rendered view and publish it. The panel display ought to be replaced by render-to-texture, and ogre writeContentsToFile() could be used instead of the less easily done copying of pixel data from the frame buffer and then putting it inside a cv::Mat container (which then could be converted to an Image with cv_bridge), or putting the pixel the data inside a sensor_msgs::Image directly.
It looks like someone may have done this with https://github.com/uml-robotics/rviz_camera_stream, but the code isn't up to date enough to build from catkin.
Old suggestions:
One hacky solution is to run a screen grab node http://wiki.ros.org/screengrab_ros and position the rviz window just so, though it would be very brittle and hard to automate with launch files.
Another route that will be very crude is to draw images using OpenCV and then it is easy to publish them, some minimal 3D can be done using projectPoints.
5 | No.5 Revision |
I think it would be https://github.com/lucasw/rviz_camera_stream is in a great feature even though Gazebo is meant for that task. Sometimes Gazebo is just too cumbersome to invoke when some simple graphical primitives crude state but can presently publish an image rendered in Rviz could do the job just fine. rviz (it builds in jade at least, but likely works in hydro and indigo).
It looks like Because it was based on the rviz default camera plugin camera_display https://github.com/ros-visualization/rviz/blob/indigo-devel/src/rviz/default_plugin/camera_display.cpp (from camera_display.cpp) it is the best starting point for modification for grab a rendered view and publish it. The panel display ought to be replaced by render-to-texture, and ogre writeContentsToFile() could be used instead of the less easily done copying of pixel data from the frame buffer and then putting it inside a cv::Mat container (which then could be converted to an Image with cv_bridge), or putting the pixel the data inside a sensor_msgs::Image directly.somewhat odd:
It looks like someone may have done this with https://github.com/uml-robotics/rviz_camera_stream, but the code isn't up to date enough to build from catkin.Eventually those oddities will be cleaned up.
Old suggestions:
One hacky solution is to run a screen grab node http://wiki.ros.org/screengrab_ros and position the rviz window just so, though it would be very brittle and hard to automate with launch files.
Another route that will be very crude is to draw images using OpenCV and then it is easy to publish them, some minimal 3D can be done using projectPoints.
6 | No.6 Revision |
https://github.com/lucasw/rviz_camera_stream is in a crude state but can presently publish an image rendered in rviz (it builds in jade at least, but likely works in hydro and indigo). indigo, and following the fork back leads to a pre-catkin version).
Because it was based on the rviz camera plugin (from camera_display.cpp) it is somewhat odd:
Eventually those oddities will be cleaned up.
Old suggestions:
One hacky solution is to run a screen grab node http://wiki.ros.org/screengrab_ros and position the rviz window just so, though it would be very brittle and hard to automate with launch files.
7 | No.7 Revision |
https://github.com/lucasw/rviz_camera_stream is in a crude state but can presently publish rviz_camera_stream publishes an image rendered in rviz (it rviz. It builds in jade at least, but likely works in hydro and indigo, and following the fork back leads to a pre-catkin version). version.
Because it was based on the rviz camera plugin (from camera_display.cpp) it is somewhat odd:
The input camera_info topic and
output image topicEventually those oddities will be cleaned up.are set in the rviz plugin gui.
Old suggestions:suggestion:
One hacky solution is to run a screen grab node http://wiki.ros.org/screengrab_ros and position the rviz window just so, though it would be very brittle and hard to automate with launch files.
8 | No.8 Revision |
rviz_camera_stream publishes an image rendered in rviz. It builds in jade at least, but likely works in hydro and indigo, and following the fork back leads to a pre-catkin version.
It needs an input camera_info to get camera intrinsics and resolution. The distortion coefficients are ignored, but a image_proc like node that implements http://code.opencv.org/issues/1387 could address that downstream. (Do gazebo cameras support distortion yet?)yet? http://gazebosim.org/tutorials?tut=camera_distortion says version 5.0 does)
The input camera_info topic and output image topic are set in the rviz plugin gui.
Old suggestion:
One hacky solution is to run a screen grab node http://wiki.ros.org/screengrab_ros and position the rviz window just so, though it would be very brittle and hard to automate with launch files.