xdspacelab / openvslam

OpenVSLAM: A Versatile Visual SLAM Framework
https://openvslam.readthedocs.io/
2.97k stars 868 forks source link

Using with Fisheye Stereo Camera #503

Closed KUTuaNithid closed 3 years ago

KUTuaNithid commented 3 years ago

Hello, I'm trying to use openvslam with Fish eye stereo camera, but I found this error. Could you help me please ?

nithid@nithid-IdeaPad-Gaming-3-15IMH05:~/OpenVSLAM/openvslam_nithid/ros/1/src/openvslam/src$ rosrun openvslam run_slam -c elp_stereo.yaml -v orb_vocab.dbow2 --debug
[2020-12-15 23:15:39.654] [D] CONSTRUCT: config
[2020-12-15 23:15:39.654] [I] config file loaded: elp_stereo.yaml
[2020-12-15 23:15:39.654] [D] load camera model type
[2020-12-15 23:15:39.655] [D] load camera model parameters
[2020-12-15 23:15:39.655] [D] CONSTRUCT: camera::base
[2020-12-15 23:15:39.655] [D] CONSTRUCT: camera::fisheye
[2020-12-15 23:15:39.655] [D] compute image bounds
[2020-12-15 23:15:39.655] [D] load ORB parameters
[2020-12-15 23:15:39.655] [D] load tracking parameters
[2020-12-15 23:15:39.655] [D] load depth threshold
[2020-12-15 23:15:39.655] [D] load depthmap factor
[2020-12-15 23:15:39.655] [D] CONSTRUCT: system
  ___               __   _____ _      _   __  __ 
 / _ \ _ __  ___ _ _\ \ / / __| |    /_\ |  \/  |
| (_) | '_ \/ -_) ' \\ V /\__ \ |__ / _ \| |\/| |
 \___/| .__/\___|_||_|\_/ |___/____/_/ \_\_|  |_|
      |_|                                        

Copyright (C) 2019,
National Institute of Advanced Industrial Science and Technology (AIST)
All rights reserved.

This is free software,
and you are welcome to redistribute it under certain conditions.
See the LICENSE file.

Camera Configuration:
- name: elp stereo
- setup: Stereo
- fps: 40
- cols: 1280
- rows: 960
- color: Gray
- model: Fisheye
  - fx: 412.473
  - fy: 424.588
  - cx: 691.585
  - cy: 463.169
  - k1: 0
  - k2: 0
  - k3: 0
  - k4: 0
  - min x: 0
  - max x: 1280
  - min y: 0
  - max y: 960
ORB Configuration:
- number of keypoints: 1000
- scale factor: 1.2
- number of levels: 8
- initial fast threshold: 20
- minimum fast threshold: 7
Stereo Configuration:
- true baseline: 0.0159586
- true depth threshold: 0.558552
- depth threshold factor: 35

[2020-12-15 23:15:39.655] [I] loading ORB vocabulary: orb_vocab.dbow2
[2020-12-15 23:15:40.035] [D] CONSTRUCT: data::camera_database
[2020-12-15 23:15:40.035] [D] CONSTRUCT: data::map_database
[2020-12-15 23:15:40.035] [D] CONSTRUCT: data::bow_database
[2020-12-15 23:15:40.036] [D] CONSTRUCT: publish::frame_publisher
[2020-12-15 23:15:40.036] [D] CONSTRUCT: publish::map_publisher
[2020-12-15 23:15:40.036] [D] CONSTRUCT: module::initializer
[2020-12-15 23:15:40.036] [D] CONSTRUCT: module::relocalizer
[2020-12-15 23:15:40.036] [D] CONSTRUCT: tracking_module
[2020-12-15 23:15:40.036] [D] CONSTRUCT: mapping_module
[2020-12-15 23:15:40.036] [D] CONSTRUCT: global_optimization_module
[2020-12-15 23:15:40.071] [I] startup SLAM system
[2020-12-15 23:15:40.072] [I] start mapping module
[2020-12-15 23:15:40.073] [I] start global optimization module
OpenCV Error: Sizes of input arguments do not match (The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array') in arithm_op, file /home/nithid/OpenVSLAM/opencv-3.4.0/modules/core/src/arithm.cpp, line 659
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/nithid/OpenVSLAM/opencv-3.4.0/modules/core/src/arithm.cpp:659: error: (-209) The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array' in function arithm_op

*** Aborted at 1608048940 (unix time) try "date -d @1608048940" if you are using GNU date ***
PC: @     0x7f4e9c5f9f47 gsignal
*** SIGABRT (@0x3e800007454) received by PID 29780 (TID 0x7f4ea130e480) from PID 29780; stack trace: ***
    @     0x7f4e9e1ac8a0 (unknown)
    @     0x7f4e9c5f9f47 gsignal
    @     0x7f4e9c5fb8b1 abort
    @     0x7f4e9cc50957 (unknown)
    @     0x7f4e9cc56ae6 (unknown)
    @     0x7f4e9cc56b21 std::terminate()
    @     0x7f4e9cc56d54 __cxa_throw
    @     0x7f4e9fb3fa92 cv::error()
    @     0x7f4e9fb3fbef cv::error()
    @     0x7f4e9f8e40dc cv::arithm_op()
    @     0x7f4e9f8e5429 cv::subtract()
    @     0x7f4e9fa1765c cv::MatOp::augAssignSubtract()
    @     0x7f4e9de4d1db openvslam::match::stereo::compute_subpixel_disparity()
    @     0x7f4e9de4ea04 openvslam::match::stereo::compute()
    @     0x7f4e9ddf62c2 openvslam::data::frame::frame()
    @     0x7f4e9ddc5ab5 openvslam::tracking_module::track_stereo_image()
    @     0x7f4e9ddb7f04 openvslam::system::feed_stereo_frame()
    @     0x55e196ad84d0 openvslam_ros::stereo::callback()
    @     0x55e196ae2158 boost::detail::function::void_function_obj_invoker9<>::invoke()
    @     0x55e196af195e message_filters::CallbackHelper9T<>::call()
    @     0x55e196aede7d message_filters::sync_policies::ApproximateTime<>::publishCandidate()
    @     0x55e196aef478 message_filters::sync_policies::ApproximateTime<>::process()
    @     0x55e196af0ff0 message_filters::sync_policies::ApproximateTime<>::add<>()
    @     0x55e196ae30fe image_transport::SubscriberFilter::cb()
    @     0x7f4e5bbe21eb image_transport::RawSubscriber::internalCallback()
    @     0x7f4e9eff405e boost::detail::function::void_function_obj_invoker1<>::invoke()
    @     0x7f4e5bbe64c1 ros::SubscriptionCallbackHelperT<>::call()
    @     0x7f4e9eb52fa2 ros::SubscriptionQueue::call()
    @     0x7f4e9eafd8a9 ros::CallbackQueue::callOneCB()
    @     0x7f4e9eaff61b ros::CallbackQueue::callAvailable()
    @     0x7f4e9eb56b49 ros::SingleThreadedSpinner::spin()
    @     0x7f4e9eb3f42b ros::spin()
Aborted (core dumped)
KUTuaNithid commented 3 years ago

Added Camera.color_order: "RGB" to config file and problem has gone