moveit / moveit_calibration

Hand-eye calibration tools for robot arms.
BSD 3-Clause "New" or "Revised" License
142 stars 79 forks source link

Rviz crashing while trying to create target #110

Closed VictorGiraud closed 2 years ago

VictorGiraud commented 2 years ago

Rviz crash when I try to create targets.

How to reproduce : roslaunch ur10_moveit_config demo.launch Add the handEyeCalibration of moveit_calibration gui Either click on create target button or add an image topic

The error printed :

[rviz_softmanbot_HP_Z2_Tower_G5_Workstation_104184_6014999650425201243-4] process has died [pid 104204, exit code -11, cmd /opt/ros/noetic/lib/rviz/rviz -d /home/softmanbot/catkin_ws/src/fmauch_universal_robot/ur10_moveit_config/launch/moveit.rviz name:=rviz_softmanbot_HP_Z2_Tower_G5_Workstation_104184_6014999650425201243 log:=/home/softmanbot/.ros/log/e40cab08-a9b9-11ec-9038-99fad0a21714/rviz_softmanbot_HP_Z2_Tower_G5_Workstation_104184_6014999650425201243-4.log]. log file: /home/softmanbot/.ros/log/e40cab08-a9b9-11ec-9038-99fad0a21714/rviz_softmanbot_HP_Z2_Tower_G5_Workstation_104184_6014999650425201243-4*.log

I also cannot find the related log file, as described by other users here https://answers.ros.org/question/53108/cannot-find-log-files/

I tried debugging, it seems to be the call of
board->draw(imagesize, image, separation, borderbits) that crashes (handeye_target_arucco.cpp, line 158)

Ubuntu 20.04 is used with Noetic. Moveit built from sources.

VictorGiraud commented 2 years ago

Found the issue : Opencv version conflict, as described here : https://answers.ros.org/question/289090/how-to-specify-my-own-opencv3-for-cv_bridge/

Couldn't make it work with my opencv source build, so I uninstalled it, build moveit and reinstalled. Seems to work.

vatanaksoytezer commented 2 years ago

@VictorGiraud glad things worked out for you. Would you like to close the issue?

VictorGiraud commented 2 years ago

@VictorGiraud glad things worked out for you. Would you like to close the issue?

I think so, although it might need a fix or a compilation warning, this is some really niche case.

prasuchit commented 2 years ago

Hi,

I have the same issue, but I don't want to mess with my opencv installation since it's connected to so many other things on my workstation. Is there any other fix to this?

Everything else seems fine. I'm able to find the target, collect samples by moving the robot around, but the minute I take the 5th sample, it crashes with the following error:

[rviz_Whisler_196549_2156718789477154300-10] process has died [pid 196622, exit code -11, cmd /opt/ros/noetic/lib/rviz/rviz -d /home/user/catkin_ws/src/fmauch_universal_robot/ur3e_moveit_config/launch/moveit.rviz __name:=rviz_Whisler_196549_2156718789477154300 __log:=/home/user/.ros/log/0a010c50-0775-11ed-b89e-bf81ec93277c/rviz_Whisler_196549_2156718789477154300-10.log].
log file: /home/user/.ros/log/0a010c50-0775-11ed-b89e-bf81ec93277c/rviz_Whisler_196549_2156718789477154300-10*.log

The error is uninformative and so are the logs connected to this. This is my setup: PXL_20220719_155219650 PXL_20220719_155224767 Screenshot from 2022-07-19 11-51-05

On the HandEye Calibration window, I tried using "manipulator" as the planning group, and just to test, "endeffector" as planning group and both fail with the same error. Please help. Thanks in advance.

tylerjw commented 2 years ago

-11 means it is segfaulting. Can you get a stack trace?

prasuchit commented 2 years ago

Hi @tylerjw ,

I tried looking through all the log files to get some clue about this, but there's no file by this name "rviz_Whisler_196549_2156718789477154300-10*.log" that shows up in this error. I tried to generate it multiple times, but in vain.

I tried running it in gdb, but then the rviz gui won't open, defeating the whole purpose. I also tried obtaining core dumps as mentioned here, but I don't see any /home/.ros/core files or folders. Kindly help.

tylerjw commented 2 years ago

Here are some better instructions for getting back traces: https://navigation.ros.org/tutorials/docs/get_backtrace.html

The reason you are not getting core dumps is you probably haven't enabled them. You can do that with this command:

ulimit -S -c unlimited
prasuchit commented 2 years ago

@tylerjw , I was finally able to get some backtrace with gdb. This is right after it crashes:

[ INFO] [1658266903.771406838]: handeye calibration gui created. [New Thread 0x7fff8cff9700 (LWP 290226)] [New Thread 0x7fff6b6d4700 (LWP 290228)] [New Thread 0x7fff6aed3700 (LWP 290229)] [New Thread 0x7fff6a6d2700 (LWP 290230)] [New Thread 0x7fff69ed1700 (LWP 290231)] [Thread 0x7fff8cff9700 (LWP 290226) exited] [Thread 0x7fff6aed3700 (LWP 290229) exited] [Thread 0x7fff6a6d2700 (LWP 290230) exited] [Thread 0x7fff99bda700 (LWP 290189) exited] [Thread 0x7fff9a3db700 (LWP 290188) exited] [Thread 0x7fff9cbdc700 (LWP 290187) exited] [Detaching after fork from child process 290268] --Type for more, q to quit, c to continue without paging--<bt

Thread 1 "rviz" received signal SIGSEGV, Segmentation fault. 0x00007fffa0ec70e8 in dtrsm_kernel_LN_SKYLAKEX () from /usr/lib/x86_64-linux-gnu/libblas.so.3 (gdb) bt

0 0x00007fffa0ec70e8 in dtrsm_kernel_LN_SKYLAKEX ()

at /usr/lib/x86_64-linux-gnu/libblas.so.3

1 0x00007fff5a2bf3c1 in cblasdgemv64 ()

at /home/psuresh/.local/lib/python3.8/site-packages/numpy/core/../../numpy.libs/libopenblas64_p-r0-2f7c42d4.3.18.so

2 0x00007fff69560eaa in gemv ()

at /home/psuresh/.local/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-x86_64-linux-gnu.so

3 0x00007fff69561d7d in cblas_matrixproduct ()

at /home/psuresh/.local/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-x86_64-linux-gnu.so

4 0x00007fff69356d28 in PyArray_MatrixProduct2 ()

at /home/psuresh/.local/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-x86_64-linux-gnu.so

5 0x00007fff6935ac8e in array_matrixproduct ()

at /home/psuresh/.local/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-x86_64-linux-gnu.so

6 0x00007ffff114d738 in () at /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0

7 0x00007fff692a4574 in array_implement_array_function ()

at /home/psuresh/.local/lib/python3.8/site-packages/numpy/core/_multiarray_
prasuchit commented 2 years ago

@tylerjw it works now!! :D

This is the problem. The fix mentioned in that comment worked perfectly!

You may close this issue, but I would suggest updating the readme or something. Thanks for all the help! :)

tylerjw commented 2 years ago

Oh, cool.

YikangGui commented 2 years ago

Hi @tylerjw ,

I have the same issue here. The rviz crashed after I selected the image topic. The different thing is my OS is ubuntu18 and it doesn't have buggy library libopenblas. And here is my backtrace with gdb.

[ INFO] [1661477281.364112049]: Set target real dimensions: marker_measured_size 0.200000 marker_measured_separation 0.020000

[tcsetpgrp failed in terminal_inferior: Invalid argument] [New Thread 0x7fff162aa700 (LWP 538)] [New Thread 0x7fff15aa8700 (LWP 540)] [New Thread 0x7fff15ea9700 (LWP 539)]

Thread 1 "rviz" received signal SIGSEGV, Segmentation fault. 0x00007fff8f294d33 in cv::warpPerspective(cv::_InputArray const&, cv::_OutputArray const&, cv::InputArray const&, cv::Size, int, int, cv::Scalar_ const&) () from /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.3.2 (gdb) bt

0 0x00007fff8f294d33 in cv::warpPerspective(cv::_InputArray const&, cv::_OutputArray const&, cv::InputArray const&, cv::Size, int, int, cv::Scalar_ const&) ()

at /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.3.2

1 0x00007fff5795d49e in cv::aruco::_extractBits(cv::InputArray const&, std::vector<cv::Point, std::allocator<cv::Point_ > > const&, int, int, int, double, double) () at /usr/local/lib/libopencv_aruco.so.406

2 0x00007fff5795ea62 in cv::aruco::_identifyOneCandidate(cv::Ptr const&, cv::InputArray const&, std::vector<cv::Point, std::allocator<cv::Point_ > > const&, int&, cv::Ptr const&, int&, float) () at /usr/local/lib/libopencv_aruco.so.406

3 0x00007fff5795f0a3 in std::_Function_handler<void (cv::Range const&), cv::aruco::_identifyCandidates(cv::InputArray const&, std::vector<cv::Mat, std::allocator > const&, std::vector<std::vector<std::vector<cv::Point, std::allocator<cv::Point > >, std::allocator<std::vector<cv::Point, std::allocator<cv::Point > > > >, std::allocator<std::vector<std::vector<cv::Point, std::allocator<cv::Point > >, std::allocator<std::vector<cv::Point, std::allocator<cv::Point > > > > > >&, std::vector<std::vector<std::vector<cv::Point, std::allocator<cv::Point > >, std::allocator<std::vector<cv::Point, std::allocator<cv::Point > > > >, std::allocator<std::vector<std::vector<cv::Point, std::allocator<cv::Point > >, std::allocator<std::vector<cv::Point, std::allocator<cv::Point > > > > > >&, cv::Ptr const&, std::vector<std::vector<cv::Point, std::allocator<cv::Point > >, std::allocator<std::vector<cv::Point, std::allocator<cv::Point > > > >&, std::vector<std::vector<cv::Point, std::allocator<cv::Point > >, std::allocator<std::vector<cv::Point, std::allocator<cv::Point_ > > > >&, std::vector<int, std::allocator >&, cv::Ptr const&, cv::_OutputArray const&)::{lambda(cv::Range const&)#1}>::_M_invoke(std::_Any_data const&, cv::Range const&) () at /usr/local/lib/libopencv_aruco.so.406

4 0x00007fff8f7f61da in () at /usr/lib/x86_64-linux-gnu/libopencv_core.so.3.2

5 0x00007fff8c80ab46 in () at /usr/lib/x86_64-linux-gnu/libtbb.so.2

6 0x00007fff8c807790 in () at /usr/lib/x86_64-linux-gnu/libtbb.so.2

7 0x00007fff8f7f7000 in cv::parallelfor(cv::Range const&, cv::ParallelLoopBody const&, double) () at /usr/lib/x86_64-linux-gnu/libopencv_core.so.3.2

8 0x00007fff5795d12c in cv::parallelfor(cv::Range const&, std::function<void (cv::Range const&)>, double) [clone .constprop.431] () at /usr/local/lib/libopencv_aruco.so.406

9 0x00007fff5796a441 in cv::aruco::ArucoDetector::detectMarkers(cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&) ()

at /usr/local/lib/libopencv_aruco.so.406

Any advice would be appreciated!

Vaibhav1196 commented 1 year ago

Hey did anyone solve this issue by any chance ?

prasuchit commented 1 year ago

@Vaibhav1196 , check my comment above:

https://github.com/ros-planning/moveit_calibration/issues/110#issuecomment-1189612576

Vaibhav1196 commented 1 year ago

@prasuchit I tried that solution to upgrade openblas to 0.3.9, unfortunately rviz keeps crashing as soon as i give the image topic :(