]> defiant.homedns.org Git - a4wd3.git/commitdiff
Revert "urdf scale correction"
authorErik Andresen <erik@vontaene.de>
Sun, 11 Oct 2026 19:04:41 +0000 (21:04 +0200)
committerErik Andresen <erik@vontaene.de>
Sun, 11 Oct 2026 19:04:41 +0000 (21:04 +0200)
This reverts commit ce9bc4bca50cf6f8112fb4c338bbbec9b3330e3d.

urdf/a4wd3.urdf

index 8464e417fd4d54bf6e3dd4e90bc9a9f5102cd335..cf67184547235a07a5446d6338227281f1d28661 100644 (file)
@@ -3,8 +3,7 @@
      Sources:
        - /home/erik/a4wd3-git/launch/a4wd3_launch.py static transforms (tf_base_scan, tf_base_imu)
        - A4WD3-Wheeled.stp (user CAD, true scale: overall width 437.0 mm matches measurement)
-       - rplidar-a2m4-r1.stl (Slamtec official model; flat-panel lidar, scan axis = mesh Y,
-         window face at mesh y_min; verified by slice analysis, not mesh Z)
+       - rplidar-a2m4-r1.stl (Slamtec official model; flat-panel lidar, scan axis = mesh Z)
      Frame conventions:
        LIVE base_link (as published by hw_node.cpp odom TF): x = forward, y = left, z = up,
        ORIGIN AT WHEELBASE CENTER / AXLE HEIGHT (z=0 at axle plane; ground ~79 mm below,
@@ -34,8 +33,7 @@
     <visual>
       <origin xyz="0 0 0" rpy="0 0 0"/>
       <geometry>
-        <!-- STL stores millimeter coordinates; URDF expects meters -->
-        <mesh filename="package://a4wd3/meshes/a4wd3_base_rviz.stl" scale="0.001 0.001 0.001"/>
+        <mesh filename="package://a4wd3/meshes/a4wd3_base_rviz.stl"/>
       </geometry>
       <material name="chassis_grey">
         <color rgba="0.45 0.45 0.45 1.0"/>
     <collision>
       <origin xyz="0 0 0" rpy="0 0 0"/>
       <geometry>
-        <mesh filename="package://a4wd3/meshes/a4wd3_base_rviz.stl" scale="0.001 0.001 0.001"/>
+        <mesh filename="package://a4wd3/meshes/a4wd3_base_rviz.stl"/>
       </geometry>
     </collision>
   </link>
 
   <!-- RP-LIDAR A2M4 (r1), flat panel. Launch tf_base_scan VERBATIM:
        t=(+0.08125, +0.07425, 0) m, yaw = pi (live base_link frame).
-       => 81.25 mm forward, 74.25 mm left, at axle height.
-       MESH GEOMETRY (verified by slice analysis 2026-10-11): the body is a cylinder
-       with its AXIS ALONG MESH Y (slices perp to Y: ~75 mm circles; perp to X/Z: ellipses).
-       The window slit channel is at the y_min end (mesh y 13..22, face at y=8.2),
-       so the beam exits axially from the y_min end -> that end must face UP.
-       Visual transform: Rx(-90 deg) maps mesh -Y -> laser +z (scan axis up),
-       origin offset puts the scan-face center (mesh 7.26, 9.15, 75.24 mm) at the
-       laser frame origin. Body then spans laser z -0.040..+0.001 m (unit hangs
-       below the frame, window end on top). -->
+       => 81.25 mm forward, 74.25 mm left, at axle height; scan plane ~74 mm above axles
+       (~153 mm above floor). Visual origin offset puts the mesh's scan plane
+       (mesh z=+0.1125, body axis at mesh x=-0.006, y=+0.028) onto the laser frame origin. -->
   <joint name="base_to_laser" type="fixed">
     <parent link="base_link"/>
     <child link="laser"/>
       <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0002"/>
     </inertial>
     <visual>
-      <origin xyz="-0.00726 -0.07524 0.00915" rpy="-1.5708 0 0"/>
+      <origin xyz="0.006 -0.028 -0.1125" rpy="0 0 0"/>
       <geometry>
-        <!-- STL stores millimeter coordinates; URDF expects meters -->
-        <mesh filename="package://a4wd3/meshes/rplidar_a2m4_decimated.stl" scale="0.001 0.001 0.001"/>
+        <mesh filename="package://a4wd3/meshes/rplidar_a2m4_decimated.stl"/>
       </geometry>
       <material name="lidar_black">
         <color rgba="0.1 0.1 0.1 1.0"/>
       </material>
     </visual>
     <collision>
-      <!-- body only (excl. bracket arm): mesh 79 x 40.8 x 75 mm, axis along mesh Y;
-           center transformed into the laser frame by the same Rx(-90)+offset as the visual -->
-      <origin xyz="-0.0113 -0.0002 -0.0195" rpy="0 0 0"/>
+      <origin xyz="0 0 0" rpy="0 0 0"/>
       <geometry>
-        <box size="0.079 0.075 0.041"/>
+        <box size="0.136 0.041 0.075"/>
       </geometry>
     </collision>
   </link>