feat(2.5d): dua roll/pitch do tu IMU vao TF tren phan cung that

Nguyen tac 2.5D la pose SE(2) con roll/pitch thi DO. Nhung do nghieng do
duoc truoc gio chi den duoc octomap/costmap qua gravity_align_nodelet;
RTAB-Map dat anh depth bang TF phang nen ban do 3D khong duoc bu nghieng.

Cach lam: khai hai khop revolute base_roll_joint / base_pitch_joint, va
base_tilt_tf.py publish /joint_states. robot_state_publisher lo phan TF nen
van la NGUON DUY NHAT cua moi canh - khong tranh chap.

Nghiem thu tren nhanh phan cung (description.launch use_sim:=false):
    base_footprint -> base_roll_link   /tf 392 ban tin
    base_roll_link -> base_link        /tf 392 ban tin
    -> 2 canh, moi canh mot nguon
    TF  roll 5.057 pitch -8.637  vs  IMU bom vao 5.000 / -8.670  -> lech 0.057

⚠️ Chi bat khi use_sim=false. Trong Gazebo giu khop fixed nhu cu: san phang
nen pitch do duoc chi 0.0006 do, khop revolute khong mang lai gi ma Gazebo
lai mo phong vat ly no. Da kiem: URDF sinh ra khi use_sim=true GIONG HET
TUNG BYTE ban truoc thay doi.

Da thu type="floating" truoc do va that bai, hai ly do doc lap:
  1. urdf2sdf huy luon link goc -> gazebo_ros_p3d FATAL, mat /scan va odom
  2. libkdl_parser doi floating thanh fixed -> RSP van phat, thanh hai nguon
Ca hai deu ghi lai trong robot.urdf.xacro de khong ai thu lai.

gravity_align_nodelet them param tilt_from_tf de KHONG bu hai lan; no buoc
theo use_sim trong perception.launch nen hai ben khong the lech nhau.
This commit is contained in:
trung09122002
2026-09-03 09:54:04 +07:00
parent 0100d4c871
commit b0d14d7206
9 changed files with 448 additions and 12 deletions

View File

@@ -17,6 +17,11 @@
-->
<launch>
<!-- Dua do nghieng do tu IMU vao canh TF base_footprint -> base_link.
Mac dinh false. Xem khoi ghi chu trong description.launch. -->
<arg name="tilt_in_tf" default="false"/>
<!-- restaurant | hotel_corridor | hospital | hospital_two_floors
| hospital_three_floors -->
<arg name="world" default="restaurant"/>
@@ -43,6 +48,7 @@
<!-- L0: URDF + TF. use_sim:=true de keo them plugin Gazebo vao URDF. -->
<include file="$(find robot_bringup)/launch/description.launch">
<arg name="tilt_in_tf" value="$(arg tilt_in_tf)"/>
<arg name="use_sim" value="true"/>
<arg name="rviz" value="$(arg rviz)"/>
<!-- Gazebo se publish joint_states banh xe -> tat fake -->