|
211 | 211 | <body name="base_platform" pos="0 0 0" euler="0 0 0"> |
212 | 212 | <body name="ridgeback_base_link"> |
213 | 213 | <!-- Front SICK TIM571: mounted at x=+0.45m (front bumper), z=0.15m. |
214 | | - 91 beams x 3 deg = 270 deg FOV, sweeping CCW from beam-0 at -135 deg. |
215 | | - quat="0.6533 0.2706 -0.6533 0.2706": beam-0 +Z fires at -135 deg from +X. --> |
| 214 | + 91 beams x 3 deg = 270 deg FOV, sweeping CCW from beam-0 at -135 deg in robot frame. |
| 215 | + Quat rule: site Z axis = beam-0 firing direction. Site X axis must point in world -Z |
| 216 | + so the plugin's Rot(-90,Y) produces a Z-up _ROS frame. |
| 217 | + Formula: R_base = Rot_Z(phi) * Rot_Y(+90 deg), where phi = beam-0 robot-frame angle. |
| 218 | + Front: phi=-135 deg -> R_base = Rot_Z(-135)*Rot_Y(90) -> quat=(0.2706,0.6533,0.2706,-0.6533). |
| 219 | + angle_min=0 in rangefinder user params so the plugin sets _ROS frame X = beam-0 direction. --> |
216 | 220 | <body name="lidar_front_mount" pos="0.45 0 0.15"> |
217 | 221 | <inertial |
218 | 222 | mass="0.25" |
|
224 | 228 | name="lidar_front" |
225 | 229 | size="0.01" |
226 | 230 | pos="0 0 0" |
227 | | - quat="0.6533 0.2706 -0.6533 0.2706" |
| 231 | + quat="0.2706 0.6533 0.2706 -0.6533" |
228 | 232 | /> |
229 | 233 | </replicate> |
230 | 234 | <!-- TIM571 body: dark cylinder, visual-only --> |
|
252 | 256 | </body> |
253 | 257 |
|
254 | 258 | <!-- Rear SICK TIM571: mounted at x=-0.45m (rear bumper), z=0.15m. |
255 | | - 91 beams x 3 deg = 270 deg FOV, sweeping CCW from beam-0 at +45 deg. |
256 | | - quat="0.2706 -0.6533 -0.2706 -0.6533": beam-0 +Z fires at +45 deg from +X. --> |
| 259 | + 91 beams x 3 deg = 270 deg FOV, sweeping CCW from beam-0 at +45 deg in robot frame. |
| 260 | + Rear: phi=+45 deg -> R_base = Rot_Z(45)*Rot_Y(90) -> quat=(0.6533,-0.2706,0.6533,0.2706). |
| 261 | + angle_min=0 in rangefinder user params so the plugin sets _ROS frame X = beam-0 direction. --> |
257 | 262 | <body name="lidar_rear_mount" pos="-0.45 0 0.15"> |
258 | 263 | <inertial |
259 | 264 | mass="0.25" |
|
265 | 270 | name="lidar_rear" |
266 | 271 | size="0.01" |
267 | 272 | pos="0 0 0" |
268 | | - quat="0.2706 -0.6533 -0.2706 -0.6533" |
| 273 | + quat="0.6533 -0.2706 0.6533 0.2706" |
269 | 274 | /> |
270 | 275 | </replicate> |
271 | 276 | <!-- TIM571 body: dark cylinder, visual-only --> |
|
669 | 674 | <framequat objtype="site" objname="imu_site" /> |
670 | 675 | <gyro site="imu_site" /> |
671 | 676 | <accelerometer site="imu_site" /> |
672 | | - <!-- Front TIM571: 270 deg FOV, 3 deg resolution (91 beams), 0.05-25m range --> |
673 | | - <rangefinder |
674 | | - site="lidar_front" |
675 | | - user="0.05 -2.35619 2.35619 0.05236 0.05 25.0" |
676 | | - /> |
677 | | - <!-- Rear TIM571: same specs, mounted facing backward for 360 deg coverage --> |
678 | | - <rangefinder |
679 | | - site="lidar_rear" |
680 | | - user="0.05 -2.35619 2.35619 0.05236 0.05 25.0" |
681 | | - /> |
| 677 | + <!-- Front TIM571: 270 deg FOV, 3 deg resolution (91 beams), 0.05-25m range. |
| 678 | + angle_min=0 so the _ROS frame X axis points at beam-0 (per plugin convention). |
| 679 | + The sweep is 0 to 4.7124 rad (270 deg) in the sensor frame, which maps to |
| 680 | + beam-0 at -135 deg and beam-90 at +135 deg in the robot frame. --> |
| 681 | + <rangefinder site="lidar_front" user="0.05 0.0 4.7124 0.05236 0.05 25.0" /> |
| 682 | + <!-- Rear TIM571: same convention — angle_min=0, frame X points at beam-0 (+45 deg robot frame). --> |
| 683 | + <rangefinder site="lidar_rear" user="0.05 0.0 4.7124 0.05236 0.05 25.0" /> |
682 | 684 | </sensor> |
683 | 685 | </mujoco> |
0 commit comments