Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ def add_launch_arg(name: str, default_value=None):
add_launch_arg("apriltag_detections_topic", "apriltag/detection_array")

decompressor_node = ComposableNode(
package="autoware_image_transport_decompressor", # The package containing the component
plugin="autoware::image_preprocessor::ImageTransportDecompressor", # The registered plugin name
name="decompressor", # Node name within the container
package="autoware_image_transport_decompressor", # The package containing the component
plugin="autoware::image_preprocessor::ImageTransportDecompressor", # The registered plugin name
name="decompressor", # Node name within the container
remappings=[
("decompressor/input/compressed_image", LaunchConfiguration("image_compressed_topic")),
("decompressor/output/raw_image", LaunchConfiguration("image_topic")),
],
parameters=[
{"encoding": "default"}
]
parameters=[{"encoding": "default"}],
)

composable_node = ComposableNode(
Expand Down
1 change: 0 additions & 1 deletion docs/tutorials/mapping_based_calibrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ The image below displays the vehicle within the pointcloud, allowing for a compa
## FAQ

- Why does the calibration fail?

- In most cases, the failure is due to mapping issues. The possible error messages are listed below and should be displayed in the console. For these cases, restart the experiment and drive more stably and slowly.
- Mapping failed. Angle between keyframes is too high.
- Mapping failed. Interpolation error is too high.
Expand Down
3 changes: 0 additions & 3 deletions docs/tutorials/marker_radar_lidar_calibrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,19 +231,16 @@ To evaluate the calibration result, the user can check that the calibrated radar
## FAQ

- Why does the reflector detection not appear on `RViz`?

- Make sure the center of the reflector faces toward the radar sensor, and the height of the reflector matches the radar's.
- Make sure the height of the radar reflector is not larger than the `reflector_max_height` parameter.
- Make sure the radar reflector is not in the background voxel (visualize the topic mentioned before).

- Why does the calibration error seem high?

- Make sure that there are no outliers in the calibration pairs list.
- Make sure that the initial calibration is good enough to match the lidar detection and radar detection correctly.
- Radars like the ARS408 (the one we use in this tutorial) have a resolution of 0.2m. Given that, there is a theoretical limit to how low the calibration error can be. If the radar resolution is low, it will strongly limit the lower bound of the calibration error.

- When can I stop the calibration process?

- It is recommended to stop the calibration when the curve in the cross-validation error has converged.
- With more matched pairs without outliers, the calibration result should improve if the number of pairs increases.

Expand Down
4 changes: 0 additions & 4 deletions docs/tutorials/tag_based_pnp_calibrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,25 +133,21 @@ In the following images we can see how the projection looks using the initial ca
## FAQ

- Why does the tool fail to add calibration pairs?

- One possible reason is that the detections are too close to the previously collected data. In this case, the new detections are deemed redundant, and thus not accepted.
- The timestamps of the lidar and camera are not synchronized. This can be checked with `ros2 topic echo [topic_name] --field header.stamp`. Setting the parameter `use_receive_time` to `True` might help to solve the issue, but is not recommended as a long-term solution.
- The detections are not stable enough. This can happen due to the following reasons:
- The detection rate is not stable: this can happen when the lidar points inside the tag frames are not sufficient for the algorithm to detect them reliably, which usually happens when the tag is either far away from the sensor or outside its high-density zone (when applicable). In these cases, please move the tag to a position where enough points (scan lines) hit the tag. If the user forcefully calibrates under undesirable conditions, the results can get compromised.
- The tag is physically unstable due to wind, mounting issues, or other external factors. Even if the detector functions correctly, these conditions prevent the detection from converging. If this is the case, please eliminate all unwelcome external factors before attempting calibration. Forcefully calibrating under these conditions can compromise the results.

- Why does the UI not launch?

- Check with `ros2 node list` if the relevant nodes have been launched. It is possible that the provided parameters do not match any of the valid arguments among other standard ROS issues.
- If the UI crashes (check the console for details), it is probably due to a bad PySide installation, invalid intrinsic parameters, invalid extrinsic parameters, etc.
- The timestamps of the lidar and camera are not synchronized.

- Why does the reprojection error increase when more data is collected?

- When there are few samples, the model will fit the available data the best it can, even in the presence of noise (over-fitting) or wrong detections. When more data is collected, the error may increase to a certain extent, but that corresponds to the model attempting to fit all the data, this time unable to fit the noise, resulting in a higher error. However, it should reach a more-or-less table peak with about 10-15 pairs (depending on the data collection pattern/sampling).

- Why does the reprojection error seem high?

- The intrinsics may not be accurate, thus limiting the performance of the method.
- The boards are not appropriate (are bent).
- The boards moved too much while calibrating.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<let name="camera_optical_frame" value="$(var camera_name)/camera_optical_link"/>
<let name="rviz_profile" value="$(find-pkg-share tag_based_pnp_calibrator)/rviz/default_profile.rviz"/>

<let name="lidar_model" value="aeva_aeries2" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_front' &quot;)"/>
<let name="lidar_model" value="seyond_falcon" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_front' &quot;)"/>
<let name="lidar_model" value="seyond_falcon" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_rear' &quot;)"/>
<let name="lidar_model" value="seyond_robin_w" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_left' &quot;)"/>
<let name="lidar_model" value="seyond_robin_w" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_right' &quot;)"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="base_frame" default="drs_base_link"/>
<arg name="lost_frame_max_acceleration" default="10.0"/>
<arg name="calibration_skip_keyframes" default="7"/>
<arg name="mapping_registrator" default="ndt" description="ndt or gicp"/>
<arg name="rviz" default="true"/>

<arg name="mapping_min_range" default="7.0" description="Used to drop self reflections"/>
<arg name="mapping_max_range" default="100.0" description="Used to avoid inaccurate points and speed up the process"/>
<arg name="calibration_min_distance_between_frames" default="4.0" description="Min separation between calibration clouds to avoid correlation"/>
<arg name="dense_pointcloud_num_keyframes" default="30" description="Used to compensate the different field of views"/>
<arg name="lidar_calibration_max_frames" default="3" description="Number of pointclouds used for calibration"/>

<arg name="imu_to_front_x" default="0.3334" description="x translation value from IMU origin to front LiDAR origin"/>
<arg name="imu_to_front_y" default="0.0" description="y translation value from IMU origin to front LiDAR origin"/>
<arg name="imu_to_front_z" default="0.0702" description="z translation value from IMU origin to front LiDAR origin"/>
<arg name="imu_to_front_roll" default="0.000" description="roll rotation value from IMU origin to front LiDAR origin"/>
<arg name="imu_to_front_pitch" default="0.000" description="pitch rotation value from IMU origin to front LiDAR origin"/>
<arg name="imu_to_front_yaw" default="0.000" description="yaw rotation value from IMU origin to front LiDAR origin"/>

<let name="calibration_camera_optical_link_frames" value="['']"/>

<let name="calibration_lidar_frames" value="[
lidar_left,
lidar_right,
lidar_rear]"/>

<let name="mapping_lidar_frame" value="lidar_front"/>
<let name="mapping_pointcloud" value="/sensing/lidar/front/seyond_points"/>
<let name="detected_objects" value="/perception/object_recognition/detection/objects"/>

<let name="calibration_camera_info_topics" value="['']"/>

<let name="calibration_image_topics" value="[
'']"/>

<let name="calibration_pointcloud_topics" value="[
/sensing/lidar/left/seyond_points,
/sensing/lidar/right/seyond_points,
/sensing/lidar/rear/seyond_points]"/>

<!-- mapping based calibrator -->
<include file="$(find-pkg-share mapping_based_calibrator)/launch/calibrator.launch.xml">
<arg name="ns" value=""/>
<arg name="calibration_service_name" value="calibrate_lidar_lidar"/>

<arg name="rviz" value="$(var rviz)"/>
<arg name="base_frame" value="$(var base_frame)"/>

<arg name="calibration_camera_optical_link_frames" value="$(var calibration_camera_optical_link_frames)"/>
<arg name="calibration_lidar_frames" value="$(var calibration_lidar_frames)"/>
<arg name="mapping_lidar_frame" value="$(var mapping_lidar_frame)"/>

<arg name="mapping_pointcloud" value="$(var mapping_pointcloud)"/>
<arg name="detected_objects" value="$(var detected_objects)"/>

<arg name="calibration_camera_info_topics" value="$(var calibration_camera_info_topics)"/>
<arg name="calibration_image_topics" value="$(var calibration_image_topics)"/>
<arg name="calibration_pointcloud_topics" value="$(var calibration_pointcloud_topics)"/>

<arg name="mapping_registrator" value="$(var mapping_registrator)"/>
<arg name="lost_frame_max_acceleration" value="$(var lost_frame_max_acceleration)"/>
<arg name="calibration_skip_keyframes" value="$(var calibration_skip_keyframes)"/>

<arg name="mapping_min_range" value="$(var mapping_min_range)"/>
<arg name="mapping_max_range" value="$(var mapping_max_range)"/>
<arg name="calibration_min_distance_between_frames" value="$(var calibration_min_distance_between_frames)"/>
<arg name="dense_pointcloud_num_keyframes" value="$(var dense_pointcloud_num_keyframes)"/>
<arg name="lidar_calibration_max_frames" value="$(var lidar_calibration_max_frames)"/>
</include>

<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="extrinsic_publisher"
args="--frame-id base_link --child-frame-id drs_base_link --x 0.6895 --y 0.0 --z 1.6785 --yaw 0.000 --pitch 0.000, --roll 0.000"
/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="extrinsic_publisher"
args="--frame-id drs_base_link --child-frame-id lidar_front --x $(var imu_to_front_x) --y $(var imu_to_front_y) --z $(var imu_to_front_z) --yaw $(var imu_to_front_yaw) --pitch $(var imu_to_front_pitch), --roll $(var imu_to_front_roll)"
/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="extrinsic_publisher"
args="--frame-id drs_base_link --child-frame-id lidar_left --x 0.000 --y 0.560 --z -0.0532 --yaw 1.5708 --pitch 0.000, --roll 0.000"
/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="extrinsic_publisher"
args="--frame-id drs_base_link --child-frame-id lidar_right --x 0.000 --y -0.560 --z -0.0532 --yaw -1.5708 --pitch 0.000, --roll 0.000"
/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="extrinsic_publisher"
args="--frame-id drs_base_link --child-frame-id lidar_rear --x -0.2994 --y 0.0 --z 0.0373 --yaw 3.14 --pitch 0.000, --roll 0.000"
/>
</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<launch>
<arg name="camera_name" default="camera0">
<choice value="camera0"/>
<choice value="camera1"/>
<choice value="camera2"/>
<choice value="camera3"/>
<choice value="camera4"/>
<choice value="camera5"/>
<choice value="camera6"/>
<choice value="camera7"/>
</arg>

<arg name="view_only_ui" default="true" description="By default we use a minimal UI"/>
<arg name="calibration_pairs" default="14" description="Number of lidar-image pairs for the calibration to converge"/>
<arg name="calibration_pairs_min_distance" default="0.3" description="Minimum allowed between a new detection and current pairs"/>

<!-- we do not use the standard image_raw name to avoid naming conflicts -->
<let name="image_decompressed_topic" value="/sensing/camera/$(var camera_name)/image_raw/decompressed"/>
<let name="image_compressed_topic" value="/sensing/camera/$(var camera_name)/image_raw/compressed"/>

<let name="camera_info_topic" value="/sensing/camera/$(var camera_name)/camera_info"/>

<let name="lidar_frame" value="lidar_front" if="$(eval &quot;'$(var camera_name)' == 'camera0' &quot;)"/>
<let name="lidar_frame" value="lidar_front" if="$(eval &quot;'$(var camera_name)' == 'camera1' &quot;)"/>
<let name="lidar_frame" value="lidar_right" if="$(eval &quot;'$(var camera_name)' == 'camera2' &quot;)"/>
<let name="lidar_frame" value="lidar_right" if="$(eval &quot;'$(var camera_name)' == 'camera3' &quot;)"/>
<let name="lidar_frame" value="lidar_rear" if="$(eval &quot;'$(var camera_name)' == 'camera4' &quot;)"/>
<let name="lidar_frame" value="lidar_rear" if="$(eval &quot;'$(var camera_name)' == 'camera5' &quot;)"/>
<let name="lidar_frame" value="lidar_left" if="$(eval &quot;'$(var camera_name)' == 'camera6' &quot;)"/>
<let name="lidar_frame" value="lidar_left" if="$(eval &quot;'$(var camera_name)' == 'camera7' &quot;)"/>

<let name="pointcloud_topic" value="/sensing/lidar/front/seyond_points" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_front' &quot;)"/>
<let name="pointcloud_topic" value="/sensing/lidar/rear/seyond_points" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_rear' &quot;)"/>
<let name="pointcloud_topic" value="/sensing/lidar/left/seyond_points" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_left' &quot;)"/>
<let name="pointcloud_topic" value="/sensing/lidar/right/seyond_points" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_right' &quot;)"/>

<let name="camera_frame" value="$(var camera_name)/camera_link"/>
<let name="camera_optical_frame" value="$(var camera_name)/camera_optical_link"/>
<let name="rviz_profile" value="$(find-pkg-share tag_based_pnp_calibrator)/rviz/default_profile.rviz"/>

<let name="lidar_model" value="seyond_falcon" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_front' &quot;)"/>
<let name="lidar_model" value="seyond_falcon" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_rear' &quot;)"/>
<let name="lidar_model" value="seyond_robin_w" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_left' &quot;)"/>
<let name="lidar_model" value="seyond_robin_w" if="$(eval &quot;'$(var lidar_frame)' == 'lidar_right' &quot;)"/>

<let name="use_rectified_image" value="false"/>

<group>
<!-- tag based calibrator -->
<include file="$(find-pkg-share tag_based_pnp_calibrator)/launch/calibrator.launch.xml">
<arg name="image_compressed_topic" value="$(var image_compressed_topic)"/>
<arg name="image_topic" value="$(var image_decompressed_topic)"/>
<arg name="camera_info_topic" value="$(var camera_info_topic)"/>
<arg name="pointcloud_topic" value="$(var pointcloud_topic)"/>
<arg name="pointcloud_topic_ex" value="$(var camera_info_topic)"/>
<arg name="lidar_model" value="$(var lidar_model)"/>
<arg name="calibration_service_name" value="calibrate_camera_lidar"/>

<arg name="use_rectified_image" value="$(var use_rectified_image)"/>
<arg name="calibration_pairs" value="$(var calibration_pairs)"/>
<arg name="calibration_pairs_min_distance" value="$(var calibration_pairs_min_distance)"/>
</include>

<!-- interactive calibrator -->
<node pkg="interactive_camera_lidar_calibrator" exec="interactive_calibrator" name="interactive_calibrator" output="screen" if="$(eval &quot;'$(var view_only_ui)' == 'false' &quot;)">
<remap from="pointcloud" to="$(var pointcloud_topic)"/>
<remap from="image" to="$(var image_compressed_topic)"/>
<remap from="camera_info" to="$(var camera_info_topic)"/>
<remap from="calibration_points_input" to="calibration_points"/>

<param name="camera_frame" value="$(var camera_frame)"/>
<param name="use_calibration_api" value="false"/>
<param name="can_publish_tf" value="false"/>
</node>

<!-- camera view -->
<node pkg="tier4_calibration_views" exec="image_view_node.py" name="image_view_node_py" output="screen" if="$(eval &quot;'$(var view_only_ui)' == 'true' &quot;)">
<remap from="pointcloud" to="$(var pointcloud_topic)"/>
<remap from="image" to="$(var image_compressed_topic)"/>
<remap from="camera_info" to="$(var camera_info_topic)"/>
<remap from="calibration_points_input" to="calibration_points"/>
</node>

<!-- create a placeholder lidar frame to make the rviz profile generic -->
<node pkg="tf2_ros" exec="static_transform_publisher" name="tf_broadcaster" output="screen" args="0 0 0 0 0 0 $(var lidar_frame) lidar_frame"/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="tf_broadcaster"
output="screen"
args="--frame-id $(var lidar_frame) --child-frame-id base_link --x 0.0 --y 0.0 --z -2.0 --yaw 0.0 --roll 0.0 --pitch 0.0"
/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="tf_broadcaster"
output="screen"
args="--frame-id $(var lidar_frame) --child-frame-id $(var camera_frame) --x 0.0 --y 0.0 --z 0.0 --yaw 0.0 --roll 0.0 --pitch 0.0"
if="$(eval &quot;'$(var lidar_frame)' == 'lidar_front' &quot;)"
/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="tf_broadcaster"
output="screen"
args="--frame-id $(var lidar_frame) --child-frame-id $(var camera_frame) --x 0.0 --y 0.0 --z 0.0 --yaw 0.523599 --roll 0.0 --pitch 0.523599"
if="$(eval &quot;'$(var camera_name)' == 'camera2' &quot;)"
/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="tf_broadcaster"
output="screen"
args="--frame-id $(var lidar_frame) --child-frame-id $(var camera_frame) --x 0.0 --y 0.0 --z 0.0 --yaw -0.523599 --roll 0.0 --pitch 0.523599"
if="$(eval &quot;'$(var camera_name)' == 'camera3' &quot;)"
/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="tf_broadcaster"
output="screen"
args="--frame-id $(var lidar_frame) --child-frame-id $(var camera_frame) --x 0.0 --y 0.0 --z 0.0 --yaw 0.0 --roll 0.0 --pitch 0.0"
if="$(eval &quot;'$(var lidar_frame)' == 'lidar_rear' &quot;)"
/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="tf_broadcaster"
output="screen"
args="--frame-id $(var lidar_frame) --child-frame-id $(var camera_frame) --x 0.0 --y 0.0 --z 0.0 --yaw 0.523599 --roll 0.0 --pitch 0.523599"
if="$(eval &quot;'$(var camera_name)' == 'camera6' &quot;)"
/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="tf_broadcaster"
output="screen"
args="--frame-id $(var lidar_frame) --child-frame-id $(var camera_frame) --x 0.0 --y 0.0 --z 0.0 --yaw -0.523599 --roll 0.0 --pitch 0.523599"
if="$(eval &quot;'$(var camera_name)' == 'camera7' &quot;)"
/>
<node
pkg="tf2_ros"
exec="static_transform_publisher"
name="tf_broadcaster"
output="screen"
args="--frame-id $(var camera_frame) --child-frame-id $(var camera_optical_frame) --x 0.0 --y 0.0 --z 0.0 --qx 0.5 --qy -0.5 --qz 0.5 --qw -0.5"
/>

<!-- remap the pointcloud topic to make the rviz profile generic -->
<node pkg="rviz2" exec="rviz2" name="rviz2" output="screen" args="-d $(var rviz_profile)">
<remap from="pointcloud_topic_placeholder" to="$(var pointcloud_topic)"/>
</node>
</group>
</launch>
Loading
Loading