Coder Social home page Coder Social logo

Comments (11)

routiful avatar routiful commented on June 26, 2024

Hi :)

I tested it and get below information in terminal and image

[ INFO] [1528186673.507284245]: Stiching 12 images
[ INFO:0] Initialize OpenCL runtime...
[ INFO:0] Successfully initialized OpenCL cache directory: /home/darby/.cache/opencv/3.3.1-dev/opencl_cache/
[ INFO:0] Preparing OpenCL cache configuration for context: NVIDIA_Corporation--GeForce_GTX_970M--375_66
[ INFO] [1528186674.486975693]: Finished Stiching
[ INFO] [1528186674.487486044]: Publishing Completed Panorama
[ INFO] [1528186674.487518750]: Angle: 6.291084
[ INFO] [1528186674.487536742]: Last Angle: 5.920647

Have you installed graphic driver properly? if not, please check it.

And try to use rqt_image_view not rqt_image_view image:=/turtlebot3_panorama/panorama

Thanks
Darby

from turtlebot3_applications.

florianspy avatar florianspy commented on June 26, 2024

My terminal generates the following output
encoding: bgr8
is_bigendian:
[ INFO] [1528203564.997826581]: Stiching 12 images
[ INFO:0] Initialize OpenCL runtime...
[ INFO] [1528203567.362583864]: Finished Stiching
[ INFO] [1528203567.362639221]: Publishing Completed Panorama
[ INFO] [1528203567.362655736]: Angle: 6.317739
[ INFO] [1528203567.362664930]: Last Angle: 5.889652

And starting rqt_image_view i get the picture as shown below (for the camera) and the error does not occur (OpenCV Error: Unknown error code -10 (Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/grfmt_base.cpp, line 140)
grafik

Nevertheless when i select /turtlebot3_panorama/panorama still i get the grey image as shown below
grafik

from turtlebot3_applications.

routiful avatar routiful commented on June 26, 2024

The panorama msg is goint to publish when it is finished stiching.

For example,

encoding: bgr8
is_bigendian:
[ INFO] [1528203564.997826581]: Stiching 12 images
[ INFO:0] Initialize OpenCL runtime...
[ INFO] [1528203567.362583864]: Finished Stiching
[ INFO] [1528203567.362639221]: Publishing Completed Panorama **HERE!**
[ INFO] [1528203567.362655736]: Angle: 6.317739
[ INFO] [1528203567.362664930]: Last Angle: 5.889652

So, you are supposed to open rqt_image_view before it is finished

from turtlebot3_applications.

florianspy avatar florianspy commented on June 26, 2024

Great now it works as expected thank you alot for your help and at least a picture is shown.
But it looks like that only about 45 degree of the panorama picture so the last part of the pictures get published.
Here are the commands i used
rosservice call turtlebot3_panorama/take_pano 0 360.0 45.0 0.3
And the output of panorama terminal
[ INFO] [1528357470.118679294]: Stiching 7 images
[ INFO:0] Initialize OpenCL runtime...
[ INFO] [1528357470.660252892]: Finished Stiching
[ INFO] [1528357470.660438282]: Publishing Completed Panorama
[ INFO] [1528357470.660458469]: Angle: 6.310041
[ INFO] [1528357470.660470675]: Last Angle: 6.006015

and the image produced:
image

Furthermore if via rqt_image_view the panorama image is selected during the snapshot period it seems to crash the process and i get an empty picture again.
The same happens if i looked at the panorama picture and later on want to take a new one with rqt_image_view still open.
Furthermore when i look at compressed and panorama i sometimes get two totally different views
panorama
compressed

In all cases /turtlebot3_panorama/panorama/compressedDepth and /turtlebot3_panorama/panorama/theora remain grey in rqt_image_view

from turtlebot3_applications.

routiful avatar routiful commented on June 26, 2024

Yes, It's weird. I will debug and test it. If you find what is wrong, please let me know what was problem.

Thanks

from turtlebot3_applications.

routiful avatar routiful commented on June 26, 2024

Hi :)

Panorama example is depend on OpenCV library.
I debugged turtlebot3_panorama node. But I couldn't find any problems.

So I tried more bigger angle to get stitched pano img. Then, I got almost 360 degree image.
For example,

$ rosservice call turtlebot3_panorama/take_pano 0 420.0 30.0 0.3

I assume this is caused by algorithm in OpenCV. I will look into this later.

Thanks

from turtlebot3_applications.

florianspy avatar florianspy commented on June 26, 2024

I tried your command but now i get a blank picture in rqt_image_view again
and the following output in the terminal where i am running rqt_image_view:
[ERROR] [1528965654.481582318]: /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/loadsave.cpp:711: error: (-215) !buf.empty() && buf.isContinuous() in function imdecode_

[ERROR] [1528965657.476861379]: Tried to advertise a service that is already advertised in this node [/rqt_gui_cpp_node_7366/compressed/set_parameters]
OpenCV Error: Assertion failed (!buf.empty() && buf.isContinuous()) in imdecode_, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/loadsave.cpp, line 711
[ERROR] [1528965661.494552942]: /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/loadsave.cpp:711: error: (-215) !buf.empty() && buf.isContinuous() in function imdecode_

Also i get this output in the panorama terminal:
OpenCV Error: Unknown error code -10 (Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/grfmt_base.cpp, line 140
[ERROR] [1528965659.286818488]: /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/grfmt_base.cpp:140: error: (-10) Raw image encoder error: Empty JPEG image (DNL not supported) in function throwOnEror
[ERROR] [1528965659.286990502]: [theora] Failed to create encoding context

When i run the command rosservice call turtlebot3_panorama/take_pano 0 180.0 30.0 0.3
status: 0 i get no error in the panorama terminal
but in the rqt_view terminal i get the following output
rqt_image_view
OpenCV Error: Assertion failed (!buf.empty() && buf.isContinuous()) in imdecode_, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/loadsave.cpp, line 711
[ERROR] [1528966062.759299492]: /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/loadsave.cpp:711: error: (-215) !buf.empty() && buf.isContinuous() in function imdecode_
and in rqt_image_view the panorama picture remains blank

When i then restart rqt_image_view and run the command turtlebot3_panorama/take_pano 0 180.0 30.0 0.3 again i get no errors in either of the windows and the picture of 180 degree is shown.

When i then restart rqt_image_view and run the command rosservice call turtlebot3_panorama/take_pano 0 420.0 30.0 0.3 i get no errors in either of the windows but the picture is still not 360 degree

It seems like everything only works smoothly when you quit
roslaunch turtlebot3_panorama panorama.launch after each run
and launch it again and start rqt_image_view afterwards
rosservice call turtlebot3_panorama/take_pano 0 420.0 30.0 0.3
Also i think rqt_view has to be open before rosservice call turtlebot3_panorama/take_pano 0 420.0 30.0 0.3 gets send on another terminal but roslaunch turtlebot3_panorama panorama.launch has to be launched before.
But even then i sometimes just get grey images in rqt_image_view even so no error is show in any terminal when i then run rosservice call turtlebot3_panorama/take_pano 0 360.0 30.0 0.3 again with camera/rgb/image_raw selected it works
But when i run another round with rosservice call turtlebot3_panorama/take_pano 0 360.0 30.0 0.3 i never get a new picture of the panorama also no errors are shown in any terminal
Further remark:
when selecting the panorama picture in rqt_image_view during the process of snapshot taking it seems to crash the process resulting in: at the end of panorama programm
[ INFO] [1528970263.286862092]: Stiching 12 images
[ INFO] [1528970269.967378861]: Finished Stiching
[ERROR] [1528970269.967413585]: Compressed Depth Image Transport - Compression requires single-channel 32bit-floating point or 16bit raw depth images (input format is: bgr8).
OpenCV Error: Unknown error code -10 (Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/grfmt_base.cpp, line 140
[ERROR] [1528970269.967481032]: /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/grfmt_base.cpp:140: error: (-10) Raw image encoder error: Empty JPEG image (DNL not supported) in function throwOnEror
[ERROR] [1528970269.968408150]: [theora] Failed to create encoding context

The error in the rqt_view terminal:
OpenCV Error: Assertion failed (!buf.empty() && buf.isContinuous()) in imdecode_, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/loadsave.cpp, line 711
[ERROR] [1528970593.464889213]: /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgcodecs/src/loadsave.cpp:711: error: (-215) !buf.empty() && buf.isContinuous() in function imdecode_

Seems to occure when i try to access an not available image

Further remark it also seems to help if in rqt_view no image is selected during the capture process
but even this does not slove the problem that sometimes no picture gets published even so no error occured

from turtlebot3_applications.

routiful avatar routiful commented on June 26, 2024

Thank you for your digging stuff :)

I tested panorama node following you commented.

First, the stitched image is published after last snap. You can check it in panorama.cpp
Second, Therefore, You have to open rqt_image_view before last snap.
Third, Although I didn't re-open panorama launch file, I can start another process using rosservice
Fourth, I can get a 360 degree image to use below commands

$ rosservice call turtlebot3_panorama/take_pano 0 420.0 30.0 0.3 

The OpenCV Error as you shown is caused by different development environments between you and me. Which do you used graphic card in your PC?

from turtlebot3_applications.

florianspy avatar florianspy commented on June 26, 2024

Thank you alot for your reply.
This is the graphic card i use:
lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GM107 [GeForce GTX 745] (rev a2)
And this is the opencv version i use:
libopencv-video2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision Video analysis library

One additional remark:even so turtlebot3_panorama/take_pano 0 360.0 30.0 0.3 was run sometimes only 6 pictures get stiched shouldn't it always be 12?

from turtlebot3_applications.

routiful avatar routiful commented on June 26, 2024

Thanks you for your information.
I will search similar problems and how to work panorama library in OpenCV.
Moreover, how about ask your question to ROS Answer? It might be get more quickly responses what you want.

from turtlebot3_applications.

robotpilot avatar robotpilot commented on June 26, 2024

This issue has been closed as there weren't recent activities. Please feel free to reopen this thread if there's any opinion to throw. Thanks.

from turtlebot3_applications.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.