-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(marker_radar_lidar_calibrator): marker_radar_lidar_calibrator support for different radar msgs and transformation algorithms #180
Open
vividf
wants to merge
440
commits into
tier4:tier4/universe
Choose a base branch
from
vividf:feature/marker_radar_lidar_calibrator_support_radars_and_transformation_algorithms
base: tier4/universe
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
440 commits
Select commit
Hold shift + click to select a range
3f24568
fix pro tips
vividf c24af40
fix known limitation
vividf fcef24c
fix initial calibration error explanation
vividf 2f0b9f4
add BEV enviroment
vividf 7b2ccfe
add vis image for mapping based
vividf bab15eb
change to svg file
vividf cf135db
fix errors
vividf 5cd13bb
add resolution explaination
vividf 0505594
fix lidar to camera
vividf f913db4
remove last point
vividf 57f8dda
seperate the context
vividf ef62228
remove accurately
vividf b3558ba
remove addtional the
vividf e56ecbf
add link
vividf 23bce5c
fix message to object and add reason of reliably detecting challenge
vividf 3b945d5
fix section 2
vividf a326bb7
improve step 3
vividf 79c9e47
fix calibration camera
vividf b6dfa2b
add docker solution
vividf 9fe1f4a
fix some sentences in mapping_based
vividf 793a581
fix the input parameters
vividf d7a2971
ci(pre-commit): autofix
pre-commit-ci[bot] a7d466b
chore: applied changes from the auto messages migration
knzo25 96688a4
chore: mispells
knzo25 377e88b
chore: another attempt to fix the mispell
knzo25 a0a8ca9
chore: forgot to commit one .repos file
knzo25 cf76bb6
chore: replaced private links for public ones
knzo25 f2e9bb3
chore: fix input
vividf bd4a440
chore: fix the FAQ
vividf cb86959
chore: fix radar purpose
vividf 4872fda
predict to estimate
vividf 0c8965d
chore: fix radar vis image
vividf e013b70
chore: fix foreground extraction
vividf a5bc527
chore: fix radar step 3 explaination
vividf 55f9b0d
chore: fix add_lidar_radar_pair parameter explanation
vividf 7b7f6fc
chore: fix radar Pro tips/recommendations
vividf 7352fd3
chore: fix radar foreground pointcloud
vividf 1e3e98e
chore: replace the pnp lidar pos to correct one
vividf eea8ad0
chore: fix didn't to did not
vividf 1a30887
chore: fix tag pos explanation
vividf 1dcb2c6
chore: remove some text
vividf 435cd2a
chore: fix some sentence of mapping
vividf 9c8b4e3
chore: add radar foreground and background image and explanation
vividf ffcf708
chore: fix parameter desciption
vividf a2e2659
chore: fix larger to exceed
vividf 50a0fdd
chore: fix grammar errors in mapping based calibrator
vividf a95f0a2
chore: fix grammar errors in marker based calibrator
vividf f20ed11
chore: fixed ci/cd
knzo25 4e29908
chore: ci/cd part 2
knzo25 c8b7d00
chore: moved meta package's path
knzo25 aaeaf44
chore: changed private repo to oss one
knzo25 a2625a9
chore: Update calibrators/marker_radar_lidar_calibrator/README.md
vividf 2cfbbf9
chore: fix marker calibrator algorithms explanation
vividf 13f4a47
chore: add calibration process
vividf 371a57b
chore: remove first
vividf 93c2c52
chore: fix grammar
vividf f1c5560
chore: remove finalize
vividf d353ad2
chore: fix Z to z
vividf fdb76ec
chore: specify yaw rotation
vividf 67263aa
chore: fix all of the explanation for output parameters
vividf b281496
chore: change predictable
vividf 000c2cd
chore: remove redundant calibration area
vividf 087fa29
fix pro tips
vividf 8c400b5
chore: change to calibrating
vividf c287aa9
chore: fix more grammar errors
vividf 8802c6c
chore: add more info for the radar foreground image
vividf fde7a10
chore: add explanation for estimation algorithm
vividf 2996aeb
chore: add svd explanation
vividf 5c897fd
chore: fix radar reflector explanation
vividf 5e37f95
chore: remove while
vividf b432423
chore: remove angle
vividf e5ae3ba
chore: fix mapping errors
vividf 806bbac
chore: update calibrators/marker_radar_lidar_calibrator/README.md
vividf 8d3e051
chore: fix grammar
vividf 2d5b949
chore: fix radar pro tips
vividf bd42460
Merge branch 'feature/new_api_documentation' of github.com:tier4/Cali…
vividf ac77d58
chore: update calibrators/tag_based_pnp_calibrator/README.md
vividf d9b2da1
chore: add pnp known issues
vividf 77d9db7
chore: fix grammar error, pnp overall calibration env
vividf 46fc240
chore: fix grammar error: that
vividf 2e2c0fb
chore: fix pnp FAQ
vividf d0dd65d
chore: add the
vividf 311ad40
chore: reflectors's tracks
vividf 4da5b99
chore: build to mount
vividf d128d4a
chore: fix final step
vividf 1a8fcb2
chore: add comma
vividf 8a011a5
fix: fix radar foreground points to object
vividf f32be5c
chore: remove that is
vividf 9e148f0
chore: fix denote as
vividf 6c86225
chore: add explanation for step 4
vividf f54e8eb
chore: fix services
vividf 2eb4dfb
chore: fix radar parallel frame
vividf 15afdf2
chore: fix transformation type
vividf 69cf81c
chore: add unit1
vividf aeda57e
chore: add unit2
vividf b45b9ad
chore: no reflector, person, ...
vividf b0ce8fc
chore: imperfect to inaccuarate
vividf 76db984
chore: fix object_raw
vividf 33b40dc
chore: fix and to or
vividf 4786ae7
chore: fix show like sentence
vividf 80b05d6
chore: fix link, not in comment
vividf 5981b8f
chore: add explanation for radar foreground
vividf 154f2ef
chore: fix add lidar-radar pair
vividf 6c63f90
chore: fix blue point explanation
vividf d60a4f4
chore: explain two radar , one lidar
vividf cfbbf65
chore: line to curve
vividf 99da6e1
chore: change coordinate to frame
vividf 28ee16c
chore: add explanation for ground segmentation in radar-lidar calibrator
vividf 537cb40
chore: add ground segmentation model
vividf 9ffe10c
chore: fixed compilations issues due to changes in universe
knzo25 ead63ae
chore: colcon ignored the tunable tf package since it produces build …
knzo25 afdf2b0
Merge branch 'tier4/universe' into feature/new_api_documentation
knzo25 82cb4ed
chore: attepting to update ci/cd since it seemed old and it was failing
knzo25 79368af
chore: removed galactic from ci/cd since it is unsupported and was st…
knzo25 0773803
chore: fixed missing cpell ignores
knzo25 d66ea14
chore: fix mapping calibrator
vividf cf912c7
fix: fix spell check
vividf 0a43d3a
fix: fix grammar errors
vividf 4032c15
fix: fix mapping section
vividf 8200499
fix: fix errors
vividf 39650ae
fix: fix grammar error
vividf 5c30563
fix: fix parameters spell check
vividf 2c6ec5a
chore: remove the redundant line
vividf cbd7507
chore: fix central to center
vividf aea3a6b
chore: add between sensors
vividf a64af37
chore: fix grids to grid
vividf 8e4f0de
chore: fix transformation type explanation
vividf 4f7a533
chore: fix rigid transformation estimation
vividf a064038
chore: add additional explanation
vividf f63c227
chore: remove processes
vividf 54d8174
chore: change pinpoint to estiamte
vividf beb8971
chore: fix topic name
vividf 5c6bbfc
chore: fix doesn't to does not
vividf 443a4b5
chore: add more explanation to radar parallel frame
vividf b16200b
chore: fix topic
vividf 944dc88
chore: unify radar parallel frame and clarify z component
vividf 3d1724a
Update calibrators/docs/tutorials/marker_radar_lidar_calibrator.md
vividf bcf75b8
Update calibrators/docs/tutorials/tag_based_pnp_calibrator.md
vividf ea430c7
Update calibrators/docs/tutorials/tag_based_pnp_calibrator.md
vividf 973930c
Update calibrators/marker_radar_lidar_calibrator/README.md
vividf b516891
chore: fix grammar error
vividf 1e4e601
chore: fix at which
vividf 61b823f
chore: add in seconds unit
vividf e8a5cba
chore: fix max_no_observation_time
vividf 82ad48e
chore: fix new_hypothesis_distance
vividf 0de1d6d
chore: fix to degrees
vividf be88f11
chore: fix all square issues
vividf dcdf2ed
chore: fix lowercase
vividf 11487a6
chore: ARS408 radars
vividf d3963ac
chore: add missing the
vividf 8bcbc45
chore: fix input_lidar_pointcloud
vividf 285da4b
chore: fix layout
vividf b38fc0c
chore: fix more layout
vividf de54522
chore: fix sentences
vividf f3ffbc4
chore: fix in rviz
vividf 9658988
chore: fix grammar error: of
vividf c0cc40c
chore: move butoon out
vividf 52ac038
chore: radar_foreground_pointcloud
vividf 64c7f29
chore: remove quotation marks
vividf fe76fbb
fix: fix mapping based
vividf f5c8cd2
chore: fix more grammar error
vividf 6dc8fec
Update calibrators/marker_radar_lidar_calibrator/README.md
vividf dd78b0a
chore: fix all rviz
vividf 1d660e7
chore: fix unit
vividf f3d6bda
chore: fix detections
vividf 0127eba
chore: fix ARS
vividf ed14978
chore: fix like below
vividf b24df51
chore: fix uppercase
vividf 9657dac
chore: fix context in mapping
vividf cfb2833
chore: remove some text
vividf db0f07b
chore: fix some grammar
vividf e1f88ca
Update calibrators/mapping_based_calibrator/README.md
vividf c0aebe3
Update calibrators/mapping_based_calibrator/README.md
vividf 328d740
Update calibrators/mapping_based_calibrator/README.md
vividf 9c77661
chore: fix spell error
vividf 0669b01
Update calibrators/mapping_based_calibrator/README.md
vividf 73ff155
chore: fix link
vividf cfe975e
chore: fix known issues grammar
vividf 17822dd
chore: known issues grammar error2
vividf 50f8782
chore: tips for distortion
vividf 9d68e7a
chore: fix all base_link
vividf 11ef573
chore: fix step 2
vividf abc5356
chore: dense_pointcloud_num_keyframes plural fix
vividf 1a6dc00
chore: for developers
vividf 232658f
chore: keyframe markers and the
vividf 07225d6
chore: extracted from
vividf 2a1aa92
chore: remove ()
vividf caf5c96
chore: add pro-tips
vividf f05e4cf
chore: fix step 2 calibration data preparation
vividf 5651786
chore: add processing
vividf 9956c93
chore: fix data selection
vividf 6ab8d87
chore: fix more data selection
vividf c51e411
chore: would be to identical
vividf 3c26117
chore: could get to obtain
vividf 97f5859
fix: fixed dependencies (due to autoware's autoware prefix)
knzo25 ff6c871
chore: moved the sensor calibrator manager outside of the calibrators…
knzo25 1dfc8d7
chore: updated the use of the kalman filter implementation since it w…
knzo25 52416ae
fix: updated the use of the decompressor
knzo25 0e5d80f
chore: adapted to the new way of using lidartag
knzo25 5a7f335
fix: init tf tree visualization (#188)
vividf 48a9072
fix(intrinsic_camera_calibrator): fixed dot board detector (#189)
knzo25 64d6ad0
docs: candidate for the final documentation of the new api
knzo25 3b8a2f0
chore: fixed dead links and spelling
knzo25 61c95dd
chore: fixed missing mispell in a package name
knzo25 6f78049
chore: fixed missing dead link
knzo25 e4bf56b
chore: rebase to documentation branch
vividf 609ca2f
changed the name from radar_parallel to radar_optimization, x2 output…
vividf ecc78a4
integrate with x2, still need to adapt to other
vividf 69c9408
add comment for x2 project
vividf 04381ef
fix spell check
vividf 9767123
fix spell error!
vividf 291a60c
simplify cmake
vividf 946c705
fix the residuals from 4d to 3d
vividf 751ca79
fix variable name and add comment
vividf 965f5c0
fix: fix transformation optimization and add support for radar input …
vividf 80ccf7c
ci(pre-commit): autoupdate (#174)
pre-commit-ci[bot] 0506c2c
chore: remove almost deprecated function
vividf e1d5856
chore: solve conflicts
vividf c407e8c
feat: use template for radar input msg
vividf 4e25990
chore: merge docs branch
vividf 8bc24c5
ci(pre-commit): autofix
pre-commit-ci[bot] f768c20
chore: add option in rdv and x2 launcher
vividf a1acdc7
ci(pre-commit): autoupdate (#176)
pre-commit-ci[bot] 9bdc336
ci(pre-commit): autoupdate (#184)
pre-commit-ci[bot] 8cc7d93
chore: merge tier4/main to feature branch
vividf fba02ff
ci(pre-commit): autofix
pre-commit-ci[bot] 2550426
chore: fix spell error
vividf 5b73c2f
chore: fix directory
vividf cdb0db4
chore: fix docs
vividf 5bf2f5e
chore: fix package dependency
vividf f954bc4
chore: fix default rviz for text markers
vividf 43189c4
chore: remove unused header
vividf 2d0accd
chore: change function name to evaluateCombinations
vividf 0f648c0
chore: change function name to get2DRotationDelta
vividf dfc339d
chore: change variable name
vividf ba05cc4
chore: fix waiting to extract the background model
vividf e5570b8
chore: fix grammar error
vividf c1a1ea3
chore: fix function name and clean code
vividf 9bee4d2
chore: remove unnessary logging
vividf b9e8c9d
chore: fix int to size_t
vividf 12b3562
chore: fix estimateZeroRollTransformation logging
vividf 28fdcf9
chore: add std::size_t
vividf ef70435
chore: NULL to nullptr
vividf 002d87c
chore: declare point type only once
vividf a62aae7
chore: remove class member and declare new structure
vividf b2e2da7
chore: fix description of radar_optimization_frame
vividf 8ab4a0c
chore: remove if condition
vividf 7f7f8e5
chore: fix function name setDelta
vividf b6c3c69
Revert "chore: remove if condition"
vividf db3ab9a
chore: fix bug
vividf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
...s/marker_radar_lidar_calibrator/include/marker_radar_lidar_calibrator/sensor_residual.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright 2024 Tier IV, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef MARKER_RADAR_LIDAR_CALIBRATOR__SENSOR_RESIDUAL_HPP_ | ||
#define MARKER_RADAR_LIDAR_CALIBRATOR__SENSOR_RESIDUAL_HPP_ | ||
|
||
#include <Eigen/Dense> | ||
|
||
namespace marker_radar_lidar_calibrator | ||
{ | ||
|
||
struct SensorResidual | ||
{ | ||
SensorResidual(const Eigen::Vector4d & radar_point, const Eigen::Vector4d & lidar_point) | ||
: radar_point_(radar_point), lidar_point_(lidar_point) | ||
{ | ||
} | ||
|
||
template <class T> | ||
bool operator()(T const * const params, T * s_residuals) const | ||
{ | ||
// parameters: x, y, z, pitch, yaw. | ||
Eigen::Matrix<T, 4, 4> transformation_matrix = Eigen::Matrix<T, 4, 4>::Identity(4, 4); | ||
Eigen::Matrix<T, 3, 3> rotation_matrix; | ||
|
||
transformation_matrix(0, 3) = T(params[0]); | ||
transformation_matrix(1, 3) = T(params[1]); | ||
transformation_matrix(2, 3) = T(params[2]); | ||
|
||
// This rotation matrix is rotate from radar to optimization frames (usually base_link). | ||
// To avoid make sure that the Y axis does not approaches 90 degrees to avoid gimbal lock. | ||
rotation_matrix = (Eigen::AngleAxis<T>(T(params[4]), Eigen::Vector3<T>::UnitZ()) * | ||
Eigen::AngleAxis<T>(T(params[3]), Eigen::Vector3<T>::UnitY()) * | ||
Eigen::AngleAxis<T>(T(0), Eigen::Vector3<T>::UnitX())) | ||
.matrix(); | ||
|
||
transformation_matrix.block(0, 0, 3, 3) = rotation_matrix; | ||
|
||
Eigen::Map<Eigen::Matrix<T, 3, 1>> residuals(s_residuals); | ||
Eigen::Matrix<T, 4, 1> residuals4d = | ||
lidar_point_.cast<T>() - transformation_matrix * radar_point_.cast<T>(); | ||
residuals = residuals4d.block(0, 0, 3, 1); | ||
|
||
return true; | ||
} | ||
|
||
Eigen::Vector4d radar_point_; | ||
Eigen::Vector4d lidar_point_; | ||
}; | ||
|
||
} // namespace marker_radar_lidar_calibrator | ||
|
||
#endif // MARKER_RADAR_LIDAR_CALIBRATOR__SENSOR_RESIDUAL_HPP_ |
66 changes: 66 additions & 0 deletions
66
...radar_lidar_calibrator/include/marker_radar_lidar_calibrator/transformation_estimator.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Copyright 2024 Tier IV, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef MARKER_RADAR_LIDAR_CALIBRATOR__TRANSFORMATION_ESTIMATOR_HPP_ | ||
#define MARKER_RADAR_LIDAR_CALIBRATOR__TRANSFORMATION_ESTIMATOR_HPP_ | ||
|
||
#include <Eigen/Dense> | ||
#include <autoware/universe_utils/geometry/geometry.hpp> | ||
#include <marker_radar_lidar_calibrator/marker_radar_lidar_calibrator.hpp> | ||
#include <marker_radar_lidar_calibrator/types.hpp> | ||
#include <rclcpp/rclcpp.hpp> | ||
#include <tf2_eigen/tf2_eigen.hpp> | ||
|
||
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp> | ||
|
||
#include <ceres/ceres.h> | ||
#include <pcl/pcl_base.h> | ||
#include <pcl/point_types.h> | ||
#include <pcl/registration/transformation_estimation_svd.h> | ||
#include <tf2/convert.h> | ||
|
||
namespace marker_radar_lidar_calibrator | ||
{ | ||
|
||
class TransformationEstimator | ||
{ | ||
public: | ||
TransformationEstimator( | ||
Eigen::Isometry3d initial_radar_to_lidar_eigen, | ||
Eigen::Isometry3d initial_radar_to_radar_optimization_eigen, | ||
Eigen::Isometry3d radar_optimization_to_lidar_eigen); | ||
void setPoints( | ||
pcl::PointCloud<common_types::PointType>::Ptr lidar_points_ocs, | ||
pcl::PointCloud<common_types::PointType>::Ptr radar_points_rcs); | ||
void set2DRotationDelta(double delta_cos, double delta_sin); | ||
void estimateYawOnlyTransformation(); | ||
void estimateSVDTransformation( | ||
ExtrinsicReflectorBasedCalibrator::TransformationType transformation_type); | ||
void estimateZeroRollTransformation(); | ||
Eigen::Isometry3d getTransformation(); | ||
|
||
double delta_cos_; | ||
double delta_sin_; | ||
pcl::PointCloud<common_types::PointType>::Ptr lidar_points_ocs_; | ||
pcl::PointCloud<common_types::PointType>::Ptr radar_points_rcs_; | ||
Eigen::Isometry3d calibrated_radar_to_lidar_transformation_; | ||
|
||
Eigen::Isometry3d initial_radar_to_lidar_eigen_; | ||
Eigen::Isometry3d initial_radar_optimization_to_radar_eigen_; | ||
Eigen::Isometry3d radar_optimization_to_lidar_eigen_; | ||
}; | ||
|
||
} // namespace marker_radar_lidar_calibrator | ||
|
||
#endif // MARKER_RADAR_LIDAR_CALIBRATOR__TRANSFORMATION_ESTIMATOR_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: consts and adequate size types (we did not pay attention before, but we are trying now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one may have several implications across the codebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed in b9e8c9d