Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

The below describes the calibration method for Beta RapidSense release. This requires some manual work and ensuring the cal.json file is configured and stored in the directory: ~/.config/rapidsense. In the future RapidSense release, the process will include a GUI and be much more user friendly.

Table of Contents

Overview

The current method uses the robot to calibrate the sensors. The robot will need to hold a calibration tag and move through positions with the tag in the sensors field of view during calibration process. The positions will need to be set by the user. A calibration tag will also need to be mounted stationary in the scene in the field of view of the sensors in order for the system to be able to detect if the sensors have shifted out of calibration.

The cal.json file contains all the relevant information to calibrate and run the rapidsense system with multiple cameras.

Calibration Requirements

The requirements for calibration are:

...

  • cal.json file which has all the camera serial_numbers and it’s corresponding robot target positions for calibration which have the Aruco tag on the robot in the sensor field of view

  • A home robot target position with the following naming convention: robotname_home.

  • The calibration robot target positions present in cal.json should be connected on Roadmap to the home target in RPC project in order for the calibration to succeed.

Setup and Running Calibration Process Manually

To easily generate the cal.json file and save it in /etc/rapidsense/cal.json, there is a calibration_generator.py script which prompts the user for all the necessary information and generates the cal.json file. Run the calibration_generator.py script as a sudo user and follow the prompts to create a cal.json file.

...

Info

The following prerequisites should be met before running calibration:

  • All robots should be at their home positions (target names should follow this naming “[robotname]_home”) before starting to calibrate

  • The user should make sure that the robots do not block the static marker when in home positions

  • rapidsense_app and proxy are running

Running Calibration from RapidSense Monitor

In the Settings page of the RapidSense Monitor, there is a button available which will run the calibration service and process. A user will need to make sure that the robot is at the “[robotname]_home” target position before being able to run the process. A warning message will pop up to warn a user to ensure the calibration tag is attached to the robot and that the robot will move once it is confirmed to calibrate.

...

Calibration ASCII Interface

Code Block
'topic': 'Calibrate', 'data': { 'serial_number' : serial_number, 'tcp_pose' : tcp_pose }

...

After successful calibration, the pose of the static marker is found and saved in the file cal.json. GetRapidSenseStatus is set as true for the is_calibrated for the corresponding sensor.

Calibration Checking Functionality

During the calibration process, the static Aruco tag in the scene is found and the image is cached to compare against during system running in order to detect when the sensors may have been shifted out of calibration. When it is detected that a sensor may have been shifted out of calibration, GetRapidSenseStatus is set to false for Is_calibrated for that particular sensor in order to warn the user that the calibration needs to be adjusted and run again.

Check the configuration

After the calibration check of the system is properly configured, use ScanScene command to show obstacles detected by RapidSense. Verify that the detected obstacles match the actual cells. Incorrect orientation of the calibration tag may result in the following.

...

Sample cal.json File for (2) Sensors

Code Block
{
    "calibration": [
        {
            "extrinsics": [
                0.6799281765861674,
                0.2802809975592367,
                -0.6775988772586244,
                0.6467668192828412,
                0.7295545356046743,
                -0.35158241966904175,
                0.5866344469518174,
                -0.7283175603639641,
                -0.07380936334901554,
                -0.8932146044064257,
                -0.44353109067951274,
                0.9372694073404532,
                0.0,
                0.0,
                0.0,
                1.0
            ],
            "serial": "046322250262",
            "marker" : {
                "robot_mounted" : {
                    "id": 6,
                    "length": 0.0097,
                    "robot" : "UR",
                    "cal_target": "target_out69"
                },
                "stationary" : {
                    "id": 8,
                    "length": 0.009,
                    "pose" : [
                        1.0,
                        0.0,
                        0.0,
                        0.0,
                        0.0,
                        1.0,
                        0.0,
                        0.0,
                        0.0,
                        0.0,
                        1.0,
                        0.0,
                        0.0,
                        0.0,
                        0.0,
                        1.0
                    ]
                }
                
            }

        },
        {
            "extrinsics": [
                0.6799281765861674,
                0.2802809975592367,
                -0.6775988772586244,
                0.6467668192828412,
                0.7295545356046743,
                -0.35158241966904175,
                0.5866344469518174,
                -0.7283175603639641,
                -0.07380936334901554,
                -0.8932146044064257,
                -0.44353109067951274,
                0.9372694073404532,
                0.0,
                0.0,
                0.0,
                1.0
            ],
            "serial": "035322250884",
            "marker" : {
                "robot_mounted" : {
                    "id": 6,
                    "length": 0.0097,
                    "robot" : "Fanuc",
                    "cal_target": "_approach_1_1"
                },
                "stationary" : {
                    "id": 7,
                    "length": 0.009,
                    "pose" : [
                        1.0,
                        0.0,
                        0.0,
                        0.0,
                        0.0,
                        1.0,
                        0.0,
                        0.0,
                        0.0,
                        0.0,
                        1.0,
                        0.0,
                        0.0,
                        0.0,
                        0.0,
                        1.0
                    ]
                }
                
            }

        }
        
    ]
}

Demo Video of Calibration

...