10 Replies Latest reply on Nov 4, 2018 1:37 AM by MartyG

    Calibration of D415 in ROS

    shrijan00

      Hi,

      I'm trying to calibrate realsense in a similar fashion as i did for Kinect in ROS using a checkerboard.

      For RGB----->rosrun camera_calibration cameracalibrator.py image:=/camera/color/image_raw camera:=/camera/color --size 8x6 --square 0.0245

      For Depth-->rosrun camera_calibration cameracalibrator.py image:=/camera/color/image_rect_raw camera:=/camera/depth --size 8x6 --square 0.0245

      But everytime i get the error service not found.

      But when i did for kinect it saved .yaml file automatically in .ros folder. I already did the dynamic calibration as mentioned on Intel website. But that calibration file i guess i cannot use .yaml file in ros. So, i was trying to get the same .yaml file for d415 in ROS. Please help.

        • 1. Re: Calibration of D415 in ROS
          MartyG

          On a question on the RealSense GitHub site about getting a .yaml for D415, an Intel support member suggested getting the required information with an SDK program called rs-enumerate-devices, using the '-c' command to retrieve calibration information.

           

          retrieve intrinsic/extrinsic paramters for D415 and SLAM? · Issue #2212 · IntelRealSense/librealsense · GitHub

           

          You can find the program here:

           

          librealsense/tools/enumerate-devices at master · IntelRealSense/librealsense · GitHub

          • 2. Re: Calibration of D415 in ROS
            shrijan00

            Thanks for your reply. I did " rs-enumerate-devices-c" and it spits a bunch of data but how i'm supposed to use it as a .yaml file which should be stored in .ros folder so that whenever i do roslaunch it should open with those calibrated parameters.

            <.yaml file> structure for kinect rgb

            image_width: 640

            image_height: 480

            camera_name: rgb_A00363801098052A

            camera_matrix:

              rows: 3

              cols: 3

              data: [530.0950445860864, 0, 319.1096888360404, 0, 530.7942307482055, 258.5284131925849, 0, 0, 1]

            distortion_model: plumb_bob

            distortion_coefficients:

              rows: 1

              cols: 5

              data: [0.1546400894113827, -0.2660788559134696, -0.003457277779301401, 0.000772531691209882, 0]

            rectification_matrix:

              rows: 3

              cols: 3

              data: [1, 0, 0, 0, 1, 0, 0, 0, 1]

            projection_matrix:

              rows: 3

              cols: 4

              data: [541.6524047851562, 0, 319.5337412438894, 0, 0, 543.201904296875, 257.2761411593092, 0, 0, 0, 1, 0]

            • 3. Re: Calibration of D415 in ROS
              MartyG

              I do not know anything about the workings of yaml files unfortunately.  You can though apparently dump parameters to a yaml file in ROS using the command 'rosparam dump'.

               

              http://wiki.ros.org/rosparam#rosparam_dump

               

              If you want to know more about yaml file creation, a good place to ask may be the RealSense GitHub, where the RealSense engineers and developers are.  You can post there by going to the link below and clicking the 'New Issue' button.

               

              Issues · IntelRealSense/librealsense · GitHub

              • 4. Re: Calibration of D415 in ROS
                shrijan00

                Yep, i already did. Thanks

                • 5. Re: Calibration of D415 in ROS
                  shrijan00

                  Just 1 more thing i already did dynamic calibration. I checked with the depth tool as well. It looks quite ok till 3-4m. So do i need to do custom calibration as well?

                  • 6. Re: Calibration of D415 in ROS
                    MartyG

                    'Custom calibration' describes the calibration process, and 'dynamic calibration' refers to the name of the calibration software (the Dynamic Calibration API).  So if you have used the Dynamic Calibration software then you have already done a custom calibration.

                     

                    It is normal for the depth accuracy to start drifting noticeably after 3 to 4 m.  It is called RMS Error, where depth noise increases over distance.

                    • 7. Re: Calibration of D415 in ROS
                      shrijan00

                      So when i'm launching roslaunch realsense2_camera rs_camera.launch

                      RealSenseD415.png

                      Even though if i type rqt_image_view, i am able to see rgb and depth images but anybody knows about these error. I guess its either because of kernel issue or sdk.

                      • 8. Re: Calibration of D415 in ROS
                        MartyG

                        If you want to use RGBD mode, please try using this launch instruction instead:

                         

                        roslaunch realsense2_camera rs_rgbd.launch

                        • 9. Re: Calibration of D415 in ROS
                          shrijan00

                          Still getting exactly the same error. Is it my SDK version??

                          As it is 2.1.1

                           

                          [ INFO] [1541314444.930161407]: Initializing nodelet with 4 worker threads.

                          [ INFO] [1541314445.229122834]: RealSense ROS v2.1.1

                          [ INFO] [1541314445.229166360]: Running with LibRealSense v2.16.0

                          [ INFO] [1541314445.543935914]: getParameters...

                          [ INFO] [1541314445.581788100]: setupDevice...

                          [ INFO] [1541314445.581816710]: JSON file is not provided

                          [ INFO] [1541314445.581843336]: ROS Node Namespace: camera

                          [ INFO] [1541314445.581864354]: Device Name: Intel RealSense D415

                          [ INFO] [1541314445.581881580]: Device Serial No: 747612060198

                          [ INFO] [1541314445.581896667]: Device FW version: 05.10.06.00

                          [ INFO] [1541314445.581912957]: Device Product ID: 0x0AD3

                          [ INFO] [1541314445.581926870]: Enable PointCloud: Off

                          [ INFO] [1541314445.581939576]: Align Depth: On

                          [ INFO] [1541314445.581947690]: Sync Mode: On

                          [ INFO] [1541314445.581981688]: Device Sensors:

                          [ INFO] [1541314445.582008450]: Stereo Module was found.

                          [ INFO] [1541314445.582033728]: RGB Camera was found.

                          [ INFO] [1541314445.582075357]: (Fisheye, 0) sensor isn't supported by current device! -- Skipping...

                          [ INFO] [1541314445.582093935]: (Gyro, 0) sensor isn't supported by current device! -- Skipping...

                          [ INFO] [1541314445.582108116]: (Accel, 0) sensor isn't supported by current device! -- Skipping...

                          [ INFO] [1541314445.582128072]: setupPublishers...

                          [ INFO] [1541314445.584244426]: Expected frequency for depth = 30.00000

                          [ INFO] [1541314445.602799088]: Expected frequency for infra1 = 30.00000

                          [ INFO] [1541314445.623659386]: Expected frequency for aligned_depth_to_infra1 = 30.00000

                          [ INFO] [1541314445.646079324]: Expected frequency for infra2 = 30.00000

                          [ INFO] [1541314445.668555638]: Expected frequency for aligned_depth_to_infra2 = 30.00000

                          [ INFO] [1541314445.688025726]: Expected frequency for color = 30.00000

                          [ INFO] [1541314445.710157789]: Expected frequency for aligned_depth_to_color = 30.00000

                          [ INFO] [1541314445.734321875]: setupStreams...

                          [ INFO] [1541314445.736313602]: depth stream is enabled - width: 640, height: 480, fps: 30

                          [ INFO] [1541314445.736492025]: infra1 stream is enabled - width: 640, height: 480, fps: 30

                          [ INFO] [1541314445.736701677]: infra2 stream is enabled - width: 640, height: 480, fps: 30

                          04/11 07:54:05,737 WARNING [140007448213376] (backend-v4l2.cpp:1248) Pixel format 36315752-1a66-a242-9065-d01814a likely requires patch for fourcc code RW16!

                          04/11 07:54:05,737 WARNING [140007448213376] (sensor.cpp:338) Unregistered Media formats : [ RW16 ]; Supported: [ ]

                          [ INFO] [1541314445.739493265]: color stream is enabled - width: 640, height: 480, fps: 30

                          [ INFO] [1541314445.818745042]: num_filters: 0

                          [ INFO] [1541314445.818943414]: publishStaticTransforms...

                          [ INFO] [1541314445.820261508]: RealSense Node Is Up!

                          04/11 07:54:05,922 WARNING [140007448213376] (types.cpp:57) start_streaming(...) failed. UVC device is already streaming!

                          04/11 07:54:05,923 WARNING [140007448213376] (types.cpp:57) start_streaming(...) failed. UVC device is already streaming!

                          04/11 07:54:05,923 WARNING [140007448213376] (types.cpp:57) start_streaming(...) failed. UVC device is already streaming!

                          04/11 07:54:05,923 WARNING [140007448213376] (types.cpp:57) start_streaming(...) failed. UVC device is already streaming!

                          04/11 07:54:05,930 ERROR [140007448213376] (types.h:179) xioctl(VIDIOC_S_CTRL) failed Last Error: Numerical result out of range

                          [ERROR] [1541314445.930683298]: Failed. Skip initialization of parameter 26

                          04/11 07:54:05,995 WARNING [140006666454784] (ds5-timestamp.cpp:64) UVC metadata payloads not available. Please refer to installation chapter for details.

                          [ WARN] [1541314446.000993576]: Frame metadata isn't available! (frame_timestamp_domain = RS2_TIMESTAMP_DOMAIN_SYSTEM_TIME)

                          • 10. Re: Calibration of D415 in ROS
                            MartyG

                            Fourcc code errors are difficult to resolve.  It can be hard to solve because past cases of them on this forum typically end up without a clear resolution.  I see you have posted the case on the GitHub too, and that may be the best place for you to get a resolution.

                             

                            There has been a previous case on this forum of fourcc code RW16.  That case was unresolved, but the details may be helpful to you.

                             

                            Re: no realsense device found: realsense D415 camera