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 Z)
+ - 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)
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,
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
- <mesh filename="package://a4wd3/meshes/a4wd3_base_rviz.stl"/>
+ <!-- STL stores millimeter coordinates; URDF expects meters -->
+ <mesh filename="package://a4wd3/meshes/a4wd3_base_rviz.stl" scale="0.001 0.001 0.001"/>
</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"/>
+ <mesh filename="package://a4wd3/meshes/a4wd3_base_rviz.stl" scale="0.001 0.001 0.001"/>
</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; 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. -->
+ => 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). -->
<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.006 -0.028 -0.1125" rpy="0 0 0"/>
+ <origin xyz="-0.00726 -0.07524 0.00915" rpy="-1.5708 0 0"/>
<geometry>
- <mesh filename="package://a4wd3/meshes/rplidar_a2m4_decimated.stl"/>
+ <!-- STL stores millimeter coordinates; URDF expects meters -->
+ <mesh filename="package://a4wd3/meshes/rplidar_a2m4_decimated.stl" scale="0.001 0.001 0.001"/>
</geometry>
<material name="lidar_black">
<color rgba="0.1 0.1 0.1 1.0"/>
</material>
</visual>
<collision>
- <origin xyz="0 0 0" rpy="0 0 0"/>
+ <!-- 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"/>
<geometry>
- <box size="0.136 0.041 0.075"/>
+ <box size="0.079 0.075 0.041"/>
</geometry>
</collision>
</link>