This repository supports two functions . Recommended to run on x86 system.
- adapts the caliration from LiDAR To Car BaseLink
- adapts the caliration from LiDAR To Robotic Arm
INPUT DATA
- A set of LiDAR data captured during low-speed linear movement (travel distance: ≥5m, speed: ≤1m/s) on horizontal ground
- A set of LiDAR data captured during constant-speed rotation (angular displacement: ≥45°, speed: ≤1m/s) on horizontal ground
OUPUT RESULT
- LiDAR to BaseLink (Quaterion)
INPUT DATA
- A set of LiDAR data and Robotic Arm Pose traveling along a series of poses
Motion captured with reference to the robotic arm's end-effector frame:
- Significant translational displacements along x, y, and z axes(travel distance: ≥20cm)
- Complete angular rotations about roll, pitch, and yaw axes(angular displacement: ≥20°)
- Post-motion static maintenance: ≥4s stationary state after each movement
OUTPUT RESULT
- Lidar to Robotic Arm Pose (Translation and Quaterion)
This project is developed and tested based on ROS 2 Humble.
Follow the specified content in the official tutorial for your operating system.
You can create a new folder or go into your existing ros2
workspace and execute the following command to clone the code into the workspace.
git clone https://github.com/RoboSense-Robotics/robosense_calibration_extrinsic.git -b main
Execute the following commands in your workspace to compile and install robosense_calibration_extrinsic
colcon build --symlink-install
After compiling and installing, it is recommended to refresh the 'bash profile' in the workspace to ensure that the components function properly
source install/setup.bash
Edit config/lidar_to_base_calib_config.yaml
to set the below parameters:
- LIDAR:
straight_lidar_topic
: Straight LiDAR Topiccircle_lidar_topic
: Circle LiDAR Topiccloud_size
: The threshold of point cloud frames used for calibrationlidar_calibration_file
: Absolute path of LiDAR calibration file ( Lidar_to_Sensor)
- BASE:
lidar_registration_config_file
: Absolute path of NDT registration related parametersanticlockwise
: For Circle data, if LiDAR rotates clockwise, set it to true; If LiDAR rotates counterclockwise, set to falseforward
: For Straight data, if LiDAR is driving forward, set it to true; If LiDAR is reverse straight, set to falsesave_path
: The absolute path used to store the registration process file, if set to '', will not be stored
Edit config/lidar_to_arm_calib_config.yaml
to set the below parameters:
-
LiDAR:
pos_cmd_topic
: Robotic Arm Pose Topiclidar_topic
: LiDAR topicpos_stable_time_thresh
: Pose Stable Frame Threshold (the stable frame num threshold obtained when the Robotic Arm is still, used to determine whether data has been successfully obtained in a still state)pos_ok_time_thresh
: Effective data threshold (the threshold for the times stable data is obtained, When the threshold is reached,the program completes the data collection process and starts the calibration)lidar_calibration_file
: Absolute path of LiDAR calibration file ( Lidar_to_Sensor)
-
BASE:
lidar_registration_config_file
: Absolute path of NDT registration related parametersanticlockwise
: For Circle data, if LiDAR rotates clockwise, set it to true; If LiDAR rotates counterclockwise, set to falseforward
: For Straight data, if LiDAR is driving forward, set it to true; If LiDAR is reverse straight, set to falsesave_path
: The absolute path used to store the registration process file, if set to '', will not be stored
Edit config/default_config/registration_config.yaml
to set the registration parameters
- NDT:
LeafSize
: Parameters of point cloud voxel filteringStepSize
: Iteration Step SizeResolution
: ResolutionMaxIteration
: Max Iteration thresholdEpsilon
: Epsilon threshold
After setting the appropriate topic name and parameters, you can directly run robosense_calibration_extrinsic on the dataset.
-
Collecte Data Activate the lidar driver, control the wheeled mobile robot to move, and collect two sets of lidar data(as shown in the example data diagram below, or download the demo data):
-
A set of LiDAR data captured during low-speed linear movement (travel distance: ≥5m, speed: ≤1m/s) on horizontal ground
-
A set of LiDAR data captured during constant-speed rotation (angular displacement: ≥45°, speed: ≤1m/s) on horizontal ground
-
- Run (need to input the absolute path of
lidar_to_base_calib_config.yaml
)
ros2 run robosense_calibration_extrinsic sensor_to_body_calibration_node "XXX/robosense_calibration_extrinsic/config/lidar_to_base_calib_config.yaml"
- play Straight data
ros2 bag play xxxx.db3 --remap /rs_lidar/points:=/straight/rs_lidar/points # The demo data has already been remapped; no additional conversion is required.
- play Circle data
ros2 bag play xxxx.db3 --remap /rs_lidar/points:=/circle/rs_lidar/points # The demo data has already been remapped; no additional conversion is required.
- Reference
-
Run (need to input the absolute path of
lidar_to_arm_calib_config.yaml
)ros2 run robosense_calibration_extrinsic sensor_to_arm_calibration_node "XXX/robosense_calibration_extrinsic/config/lidar_to_arm_calib_config.yaml"
-
Collecte Data Activate the lidar driver, control the robotic arm to move in different directions:
-
Motion captured with reference to the robotic arm's end-effector frame, the robotic arm's motion trajectory should cover all degrees of freedom (x, y, z, roll, pitch, yaw) as comprehensively as possible(travel distance: ≥20cm, angular displacement: ≥20°).
-
After each movement, keep stationary for 4 seconds.
-
-
Reference