Skip to content
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(calibration_tools): new api and 2.0 release #148

Merged
merged 55 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
7622989
Merge pull request #1 from tier4/tier4/universe
yabuta Jul 6, 2022
cdfddc0
Merge pull request #25 from tier4/tier4/universe
yabuta Aug 31, 2022
c5c3003
Implementing the new calibration manager
knzo25 Oct 5, 2023
3b9734e
Did some heavy refactoring in the tag-based camera-lidar calibration
knzo25 Oct 5, 2023
563ea19
Fixed spellings in the tag based camera lidar calibrator
knzo25 Oct 5, 2023
6fb5de1
feat: adapter the lidar-lidar 2d to the new API
knzo25 Dec 28, 2023
b9a71da
chore: fixed spellings
knzo25 Dec 28, 2023
79b90a5
feat: adapted the ground plane calibrator to the new api
knzo25 Jan 2, 2024
9059437
feat: applied the changes required for the mapping-based lidar-lidar …
knzo25 Jan 10, 2024
a6c6bdf
fix: fixed non-optional parameters in the launcher configuration ui
knzo25 Jan 11, 2024
3f0f35c
chore: removed unused dummy calibrator
knzo25 Jan 11, 2024
84e364f
feat: partial implementation of the changes for radar-lidar and imple…
knzo25 Jan 12, 2024
f7bab99
feat: partial implementation of the changes for radar-lidar and imple…
knzo25 Jan 12, 2024
9d9c4fa
Merge branch 'tier4/universe' into feature/new_api
knzo25 Jan 12, 2024
1706164
Merge branch 'feature/new_api' of github.com:knzo25/CalibrationTools …
knzo25 Jan 12, 2024
285ec36
fix: fixed the camera-lidar calibrator that was broken due to some ne…
knzo25 Jan 12, 2024
0b845c3
feat: complete implementation for the radar-lidar, partial implementa…
knzo25 Jan 14, 2024
561cb79
chore: attempting to fix CI/CD
knzo25 Jan 15, 2024
8a0c6b3
feat: implemented the new api changes for the sfm calibrator and fixe…
knzo25 Jan 16, 2024
3ab1fbb
feat: base-lidars working on the rdv
knzo25 Jan 16, 2024
1d2344b
feat: sfm calibrator integrated completely in rdv and although untest…
knzo25 Jan 17, 2024
9a3febd
feat: integrated all the sfm methods to the x2
knzo25 Jan 18, 2024
790b363
feat: integrated the camera-lidar into the remaining project/products
knzo25 Jan 18, 2024
352f854
feat: refactored the itneractive ui, integrated it into the new api, …
knzo25 Jan 18, 2024
452737c
chore: deleted the old manager/client and renamed the new calibrators
knzo25 Jan 18, 2024
4ce9f7d
chore: deleted deprecated mesasges
knzo25 Jan 19, 2024
b120273
chore: fixed extra mispells found in ci/cd
knzo25 Jan 19, 2024
79ce646
chore: more spell fixes
knzo25 Jan 19, 2024
025c46e
fix: fixed compile error (eigen vs. opencv)
knzo25 Jan 19, 2024
6d9c30a
chore: applied the fix to another file
knzo25 Jan 19, 2024
5b96f65
chore: fixed dependencies for ci cd
knzo25 Jan 19, 2024
b3f8e90
fix: typo in launcher (thx vivid)
knzo25 Jan 22, 2024
aca6543
fix: forgot to set the initial solution after the refactoring in the …
knzo25 Jan 25, 2024
fc7fb7e
chore: added explanations regarding the coordinate systems
knzo25 Feb 6, 2024
899c593
chore: fixed typo in launcher
knzo25 Feb 6, 2024
b88971b
chore: updated documentation and added missing marker in rviz profile
knzo25 Feb 6, 2024
ca14dce
chore: forgot to ass the mapping base-lidar for the default project
knzo25 Feb 26, 2024
7109aa3
chore: deleted the new part of the service
knzo25 Mar 18, 2024
3f5684b
feat: added the radar lidar calibrator to the default project
knzo25 Mar 19, 2024
a23cea2
chore: replaced all instances of transl -> translation and updated th…
knzo25 Mar 19, 2024
56bd2f0
chore: replaced rot -> rotation and missing transl -> translation
knzo25 Mar 19, 2024
424a726
chore: code explanation
knzo25 Mar 19, 2024
d747ebe
chore: removed redundant pass
knzo25 Mar 19, 2024
0d4bf8b
chore: typo
knzo25 Mar 19, 2024
125d52e
chore: added explanation of a variable in the header file
knzo25 Mar 19, 2024
69188fb
Merge branch 'main' into feature/new_api
knzo25 Mar 19, 2024
93b2949
Merge commit 'beb7fb1' into feature/new_api
knzo25 Mar 19, 2024
e3e7d98
ci(pre-commit): autofix
pre-commit-ci[bot] Mar 19, 2024
f462c28
chore: attempt to fix pep257
knzo25 Apr 2, 2024
c0f9ad5
chore: fixing ci/cd and standalone installation due to changes in aut…
knzo25 Apr 2, 2024
715fee7
chore: more pep stuff
knzo25 Apr 2, 2024
a445808
chore: fized pep
knzo25 Apr 2, 2024
20a5aa7
chore: deleted redundant pass statements
knzo25 Apr 2, 2024
d33e95d
chore: updated old name
knzo25 Apr 3, 2024
45453cf
chore: updated misleading names
knzo25 Apr 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
107 changes: 99 additions & 8 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,108 @@
{
"words": [
"apriltags",
"3dpoints",
"Rodrigues",
"subsampled",
"undistortion",
"uniformingly",
"antialiasing",
"apriltag",
"apriltags",
"arange",
"autoware",
"astype",
"auxiliar",
"axisd",
"beforementioned",
"calib",
"cmap",
"coeffs",
"crossval",
"crossvalidation",
"opencv",
"discretization",
"distro",
"downsampling",
"downsample",
"dtype",
"eigen",
"eulers",
"extrinsics",
"figsize",
"gicp",
"hesai",
"homography",
"hsize",
"icp",
"idless",
"idxs",
"imdecode",
"imread",
"imshow",
"imwrite",
"intrinsics",
"kalman",
"keyframes",
"libceres",
"lidars",
"lidartag",
"lidartags",
"linalg",
"matplotlib",
"matx",
"meshgrid",
"misdetection",
"nanosec",
"neighbours",
"ncols",
"nrows",
"omiya",
"overfits",
"pandar",
"permutate",
"pixmap",
"pnp",
"pointcloud",
"pointclouds",
"polyline",
"prerejective",
"pydot",
"pyplot",
"qcolor",
"quaterniond",
"ransac",
"rclcpp",
"rclpy",
"registrator",
"registrators",
"remappings",
"representer",
"reprojected",
"reprojection",
"rosbag",
"rosidl",
"ruamel",
"rvec",
"tvec",
"rvecs",
"rviz",
"slerp",
"solvepnp",
"sqpnp",
"srvs",
"subsampled",
"subsamples",
"subsampling",
"tvec",
"tvecs",
"nrows",
"ncols",
"crossval"
"undistort",
"undistortion",
"uniformingly",
"velodyne",
"vectord",
"voxel",
"voxels",
"xaxis",
"xlabel",
"xlim",
"yaxis",
"ylabel",
"ylim"
]
}
4 changes: 4 additions & 0 deletions build_depends.repos
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ repositories:
type: git
url: https://github.com/astuff/astuff_sensor_msgs.git
version: 3.2.0
core/autoware_internal_msgs:
type: git
url: https://github.com/autowarefoundation/autoware_internal_msgs.git
version: main
core/common:
type: git
url: https://github.com/autowarefoundation/autoware_common.git
Expand Down
4 changes: 2 additions & 2 deletions common/tier4_calibration_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ament_auto_find_build_dependencies()
rosidl_generate_interfaces(${PROJECT_NAME}
"msg/BoolStamped.msg"
"msg/CalibrationPoints.msg"
"msg/CalibrationResult.msg"
"msg/Files.msg"
"msg/Float32Stamped.msg"
"msg/EstimationResult.msg"
Expand All @@ -25,10 +26,9 @@ rosidl_generate_interfaces(${PROJECT_NAME}
"srv/FilesSrv.srv"
"srv/FilesListSrv.srv"
"srv/CalibrationDatabase.srv"
"srv/ExtrinsicCalibrationManager.srv"
"srv/ExtrinsicCalibrator.srv"
"srv/Frame.srv"
"srv/IntrinsicsOptimizer.srv"
"srv/ExtrinsicCalibrator.srv"
DEPENDENCIES
std_msgs
sensor_msgs
Expand Down
4 changes: 4 additions & 0 deletions common/tier4_calibration_msgs/msg/CalibrationResult.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
geometry_msgs/TransformStamped transform_stamped
bool success
float32 score
std_msgs/String message

This file was deleted.

6 changes: 1 addition & 5 deletions common/tier4_calibration_msgs/srv/ExtrinsicCalibrator.srv
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
geometry_msgs/Pose initial_pose
---
geometry_msgs/Pose result_pose
bool success
float32 score
sensor_msgs/PointCloud2 debug_pointcloud
tier4_calibration_msgs/CalibrationResult[] results
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Tier IV, Inc.
// 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Tier IV, Inc.
// 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.
Expand Down Expand Up @@ -354,7 +354,7 @@ void pcl::JointIterativeClosestPointExtended<PointSource, PointTarget, Scalar>::

++nr_iterations_;

// Update the vizualization of icp convergence
// Update the visualization of icp convergence
// if (update_visualizer_ != 0)
// update_visualizer_(output, source_indices_good, *target_, target_indices_good );

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Tier IV, Inc.
// 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.
Expand Down Expand Up @@ -82,7 +82,7 @@ struct cloud_point_index_idx_triplets
{
return (idx0 < p.idx0) || (idx0 == p.idx0 && idx1 < p.idx1) ||
(idx0 == p.idx0 && idx1 == p.idx1 && idx2 < p.idx2);
} // test brancheless agains branched version with a dataset at some point \ along with some sort
} // test branchless against branched version with a dataset at some point \ along with some sort
// implementations
};

Expand All @@ -102,7 +102,7 @@ class VoxelGridTriplets : public VoxelGrid<PointT>
using VoxelGrid<PointT>::min_b_;
using VoxelGrid<PointT>::max_b_;
using VoxelGrid<PointT>::div_b_;
using VoxelGrid<PointT>::divb_mul_;
using VoxelGrid<PointT>::divb_mul_; // cSpell:ignore divb
using VoxelGrid<PointT>::min_points_per_voxel_;
using VoxelGrid<PointT>::save_leaf_layout_;
using VoxelGrid<PointT>::leaf_layout_;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Tier IV, Inc.
// 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.
Expand Down Expand Up @@ -123,6 +123,7 @@ void pcl::VoxelGridTriplets<PointT>::applyFilter(PointCloud & output)
div_b_ = max_b_ - min_b_ + Eigen::Vector4i::Ones();
div_b_[3] = 0;

// cSpell:ignore divb
// Set up the division multiplier
divb_mul_ = Eigen::Vector4i(1, div_b_[0], div_b_[0] * div_b_[1], 0);

Expand Down Expand Up @@ -199,6 +200,8 @@ void pcl::VoxelGridTriplets<PointT>::applyFilter(PointCloud & output)
}
}

// cSpell:ignore spreadsort
// cSpell:ignore rightshift
// Second pass: sort the index_vector vector using value representing target cell as index
// in effect all points belonging to the same output cell will be next to each other
// auto rightshift_func = [](const cloud_point_index_idx_triplets &x, const unsigned offset) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Tier IV, Inc.
// 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Tier IV, Inc.
// 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.
Expand Down
19 changes: 19 additions & 0 deletions common/tier4_calibration_views/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_calibration_views)

find_package(ament_cmake REQUIRED)
find_package(ament_cmake_python REQUIRED)
find_package(rclpy REQUIRED)
find_package(autoware_cmake REQUIRED)

autoware_package()
ament_python_install_package(${PROJECT_NAME})

install(PROGRAMS
scripts/image_view_node.py
DESTINATION lib/${PROJECT_NAME}
)

ament_export_dependencies(ament_cmake)
ament_export_dependencies(ament_cmake_python)
ament_package()
29 changes: 29 additions & 0 deletions common/tier4_calibration_views/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>tier4_calibration_views</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="kenzo.lobos@tier4.jp">Kenzo Lobos Tsunekawa</maintainer>
<license>TODO: License declaration</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
<buildtool_depend>ament_cmake_python</buildtool_depend>

<build_depend>autoware_cmake</build_depend>

<exec_depend>python3-matplotlib</exec_depend>
<exec_depend>python3-pyside2.qtquick</exec_depend>
<exec_depend>python3-transforms3d</exec_depend>
<exec_depend>rclpy</exec_depend>
<exec_depend>ros2_numpy</exec_depend>
<exec_depend>ros2launch</exec_depend>
<exec_depend>tier4_calibration_msgs</exec_depend>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>python3-pytest</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
53 changes: 53 additions & 0 deletions common/tier4_calibration_views/scripts/image_view_node.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env python3

# 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.

import logging
import os
import signal
import sys

from PySide2.QtWidgets import QApplication
import rclpy
from tier4_calibration_views.image_view_ros_interface import ImageViewRosInterface
from tier4_calibration_views.image_view_ui import ImageViewUI


def main(args=None):
os.environ["QT_QPA_PLATFORM_PLUGIN_PATH"] = ""
app = QApplication(sys.argv)

rclpy.init(args=args)

try:
signal.signal(signal.SIGINT, sigint_handler)

ros_interface = ImageViewRosInterface()
ex = ImageViewUI(ros_interface) # noqa: F841

ros_interface.spin()

sys.exit(app.exec_())
except (KeyboardInterrupt, SystemExit):
logging.info("Received sigint. Quitting...")
rclpy.shutdown()


def sigint_handler(*args):
QApplication.quit()


if __name__ == "__main__":
main()
Empty file.
Loading
Loading